-[[!tag standards]]
+[[!tag oldstandards]]
+
+**OBSOLETE**, see [[openpower/sv/3d_vector_ops]]
# Vector Operations Extension to SV
| ------------------ | ------ | ---- | ---- | ----- | -- | ------ |
| CORDIC.x.t vd, vs1, rs2 | vec2 | vec2 | scal | 2 | any | src2 ignores SUBVL |
-
SUBVL must be set to 2 and applies to vd and vs. SUBVL is *ignored* on beta. vd and vs must be marked as vectors.
VL may be applied. beta as a scalar is ok (applies across all vectors vd and vs). Predication is also ok (single predication) sourced from vd. Use of swizzle is also ok.
-Non vector args vd, vs, or SUBVL != 2 are reserved encodings.
+Non vector args vd, vs are reserved encodings.
CORDIC is an extremely general-purpose algorithm useful for a huge number
of diverse purposes. In its full form it does however require quite a
SUBVL must be set to 3, and all regs must be vectors. VL nonzero produces multiple results in vd.
+| Instr | result | src1 | src2 | SUBVL | VL |
+| ------------------ | ------ | ---- | ---- | ----- | -- |
+| VCROSS vd, vs1, vs2 | vec3 | vec3 | vec3 | 3 | any |
+
The resulting components are, in order:
x[1] * y[2] - y[1] * x[2]
## Vector dot product
-
* VDOT rd, vs1, vs2
Computes the dot product of two vectors. Internal accuracy must be
* SUBVL=2,3,4 vs1 and vs2 set as vectors, multiple results are generated. When VL is set, only the first (unpredicated) SUBVector is used to create a result, if rd is scalar (standard behaviour for single predication). Otherwise, if rd is a vector, multiple scalar results are calculated (i.e. SUBVL is always ignored for rd). Swizzling may be applied.
* When rd=scalar, SUBVL=1 and vs1=vec, vs2=vec, one scalar result is generated from the entire src vectors. Predication is allowed on the src vectors.
+
+| Instr | result | src1 | src2 | SUBVL | VL |
+| ------------------ | ------ | ---- | ---- | ----- | -- |
+| VDOT rd, vs1, vs2 | scal | vec | vec | 2-4 | any |
+| VDOT rd, vs1, vs2 | scal | vec | vec | 1 | any |
+
Pseudocode in python:
from operator import mul