ST1 (multiple structures)
Store multiple single-element structures from one, two, three, or four registers
This instruction stores elements to memory from one, two, three, or four
SIMD&FP registers, without interleaving. Every element of each register is stored.
Depending on the settings in the CPACR_EL1,
CPTR_EL2, and CPTR_EL3 registers,
and the current Security state and Exception level,
an attempt to execute the instruction might be trapped.
If PSTATE.DIT is 1, the timing of this instruction is insensitive to the value of the data being loaded or stored.
It has encodings from 2 classes:
No offset
and
Post-index
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
x
x
1
x
0
1
1
ST1 { <Vt>.<T> }, [<Xn|SP>]
1
0
0
ST1 { <Vt>.<T>, <Vt2>.<T> }, [<Xn|SP>]
0
1
0
ST1 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T> }, [<Xn|SP>]
0
0
0
ST1 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T>, <Vt4>.<T> }, [<Xn|SP>]
constant integer t = UInt(Rt);
constant integer n = UInt(Rn);
constant integer m = integer UNKNOWN;
constant boolean wback = FALSE;
constant boolean nontemporal = FALSE;
constant boolean tagchecked = wback || n != 31;
0
0
0
1
1
0
0
1
0
0
x
x
1
x
1
1
1
1
1
0
1
1
ST1 { <Vt>.<T> }, [<Xn|SP>], <imm>
N
N
N
N
N
0
1
1
ST1 { <Vt>.<T> }, [<Xn|SP>], <Xm>
1
1
1
1
1
1
0
0
ST1 { <Vt>.<T>, <Vt2>.<T> }, [<Xn|SP>], <imm>
N
N
N
N
N
1
0
0
ST1 { <Vt>.<T>, <Vt2>.<T> }, [<Xn|SP>], <Xm>
1
1
1
1
1
0
1
0
ST1 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T> }, [<Xn|SP>], <imm>
N
N
N
N
N
0
1
0
ST1 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T> }, [<Xn|SP>], <Xm>
1
1
1
1
1
0
0
0
ST1 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T>, <Vt4>.<T> }, [<Xn|SP>], <imm>
N
N
N
N
N
0
0
0
ST1 { <Vt>.<T>, <Vt2>.<T>, <Vt3>.<T>, <Vt4>.<T> }, [<Xn|SP>], <Xm>
constant integer t = UInt(Rt);
constant integer n = UInt(Rn);
constant integer m = UInt(Rm);
constant boolean wback = TRUE;
constant boolean nontemporal = FALSE;
constant boolean tagchecked = wback || n != 31;
<Vt>
Is the name of the first or only SIMD&FP register to be transferred, encoded in the "Rt" field.
<T>
Is an arrangement specifier,
size
Q
<T>
00
0
8B
00
1
16B
01
0
4H
01
1
8H
10
0
2S
10
1
4S
11
0
1D
11
1
2D
<Xn|SP>
Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field.
<Vt2>
Is the name of the second SIMD&FP register to be transferred, encoded as "Rt" plus 1 modulo 32.
<Vt3>
Is the name of the third SIMD&FP register to be transferred, encoded as "Rt" plus 2 modulo 32.
<Vt4>
Is the name of the fourth SIMD&FP register to be transferred, encoded as "Rt" plus 3 modulo 32.
<imm>
For the one register, immediate offset variant: is the post-index immediate offset,
<imm>
For the two registers, immediate offset variant: is the post-index immediate offset,
<imm>
For the three registers, immediate offset variant: is the post-index immediate offset,
<imm>
For the four registers, immediate offset variant: is the post-index immediate offset,
<Xm>
Is the 64-bit name of the general-purpose post-index register, excluding XZR, encoded in the "Rm" field.
constant integer datasize = 64 << UInt(Q);
constant integer esize = 8 << UInt(size);
constant integer elements = datasize DIV esize;
integer rpt; // number of iterations
constant integer selem = 1; // structure elements
case opcode of
when '0010' rpt = 4; // LD/ST1 (4 registers)
when '0110' rpt = 3; // LD/ST1 (3 registers)
when '1010' rpt = 2; // LD/ST1 (2 registers)
when '0111' rpt = 1; // LD/ST1 (1 register)
otherwise UNDEFINED;
CheckFPAdvSIMDEnabled64();
bits(64) address;
bits(64) eaddr;
bits(64) offs;
bits(datasize) rval;
integer tt;
constant integer ebytes = esize DIV 8;
constant boolean privileged = PSTATE.EL != EL0;
constant AccessDescriptor accdesc = CreateAccDescASIMD(MemOp_STORE, nontemporal, tagchecked,
privileged);
if n == 31 then
CheckSPAlignment();
address = SP[];
else
address = X[n, 64];
offs = Zeros(64);
for r = 0 to rpt-1
for e = 0 to elements-1
tt = (t + r) MOD 32;
for s = 0 to selem-1
rval = V[tt, datasize];
eaddr = AddressIncrement(address, offs, accdesc);
Mem[eaddr, ebytes, accdesc] = Elem[rval, e, esize];
offs = offs + ebytes;
tt = (tt + 1) MOD 32;
if wback then
if m != 31 then
offs = X[m, 64];
address = AddressAdd(address, offs, accdesc);
if n == 31 then
SP[] = address;
else
X[n, 64] = address;