zip1
SVE Zip 1
ZIP1 <Zd>.<T>, <Zn>.<T>, <Zm>.<T>
Interleaves elements from the lower halves.
Details
Interleaves elements from the lower halves of two SVE vectors, placing odd-indexed elements from Zn and even-indexed elements from Zm into alternating positions in Zd. This is a data-permutation instruction that does not modify condition flags. Execution is restricted to AArch64 with the SVE extension enabled.
Pseudocode Operation
for i = 0 to VL/esize-1 step 2
Zd[i, esize] ← Zn[i/2, esize]
Zd[i+1, esize] ← Zm[i/2, esize]
Example
ZIP1 z0.s.T, z1.s.T, z2.s.T
Encoding
Binary Layout
00000101
size
1
Zm
011
00
0
Zn
Zd
Operands
-
Zd
Destination scalable vector register (SVE) -
Zn
First source scalable vector register (SVE) -
Zm
Second source scalable vector register (SVE)
Reference (Arm A64 ISA)
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x0E003800 | ZIP1 <Vd>.<T>, <Vn>.<T>, <Vm>.<T> | A64 | 0 | Q | 001110 | size | 0 | Rm | 0 | 0 | 1110 | Rn | Rd | ||
| 0x05204000 | ZIP1 <Pd>.<T>, <Pn>.<T>, <Pm>.<T> | A64 | 00000101 | size | 10 | Pm | 010 | 0 | 0 | 0 | 0 | Pn | 0 | Pd | ||
| 0x05206000 | ZIP1 <Zd>.<T>, <Zn>.<T>, <Zm>.<T> | A64 | 00000101 | size | 1 | Zm | 011 | 00 | 0 | Zn | Zd | ||
| 0x05A00000 | ZIP1 <Zd>.Q, <Zn>.Q, <Zm>.Q | A64 | 00000101101 | Zm | 000 | 0 | 0 | 0 | Zn | Zd |
Description
Interleave alternating elements from the lowest or highest halves of the first and second source vectors and place in elements of the destination vector. This instruction is unpredicated.
The 128-bit element variant requires that the Effective SVE vector length is at least 256 bits. ID_AA64ZFR0_EL1.F64MM indicates whether the 128-bit element variant is implemented. The 128-bit element variant is illegal when executed in Streaming SVE mode, unless FEAT_SME_FA64 is implemented and enabled.
Operation
if esize < 128 then CheckSVEEnabled(); else CheckNonStreamingSVEEnabled();
constant integer VL = CurrentVL;
if VL < esize * 2 then UNDEFINED;
constant integer pairs = VL DIV (esize * 2);
bits(VL) operand1 = Z[n, VL];
bits(VL) operand2 = Z[m, VL];
bits(VL) result = Zeros(VL);
integer base = part * pairs;
for p = 0 to pairs-1
Elem[result, 2*p+0, esize] = Elem[operand1, base+p, esize];
Elem[result, 2*p+1, esize] = Elem[operand2, base+p, esize];
Z[d, VL] = result;