# move to/from vec2/3/4 See Basic idea: mv operations where either the src or dest is specifically marked as having SUBVL apply to it, but, crucially, the *other* argument does *not*. mv.srcvec r3, r4.vec2 mv.destvec r2.vec4, r5 TODO: evaluate whether this will fit with [[mv.swizzle]] involved as well (yes it probably will) * M=0 is mv.srcvec * M=1 is mv.destvec mv.srcvec (leaving out elwidths and chop): for i in range(VL): regs[rd+i] = regs[rs+i*SUBVL] mv.destvec (leaving out elwidths and chop): for i in range(VL): regs[rd+i*SUBVL] = regs[rs+i] ## Twin Predication, saturation, swizzle, and elwidth overrides Note that mv is a twin-predicated operation, and is swizzlable. This implies that from the vec2, vec3 or vec4, 1 to 8 bytes may be selected and re-ordered (XYZW), mixed with 0 and 1 constants, skipped by way of twin predicate pack and unpack, and a huge amount besides. Also saturation can be applied to individual elements, including the elements within a vec2/3/4. # mv.zip and unzip | 0.5 |6.10|11.15|16..20|21..25|26.....30|31| name | |-----|----|-----|------|------|---------|--|--------------| | 19 | RT | RC | RB/0 | RA/0 | XO[5:9] |Rc| mv.zip | | 19 | RT | RC | RS/0 | RA/0 | XO[5:9] |Rc| mv.unzip | these are specialist operations that zip or unzip to/from multiple regs to/from one vector including vec2/3/4 mv.zip, RA=0, RB=0 for i in range(VL): regs[rt+i] = regs[rc+i] mv.zip, RA=0, RB!=0 for i in range(VL): regs[rt+i*2 ] = regs[rb+i] regs[rt+i*2+1] = regs[rc+i] mv.zip, RA!=0, RB!=0 for i in range(VL): regs[rt+i*3 ] = regs[rb+i] regs[rt+i*3+1] = regs[rc+i] regs[rt+i*3+2] = regs[ra+i]