gcsstr

Guarded Control Stack Store

GCSSTR <Xt>, [<Xn|SP>]

Stores a value to the GCS (Control Flow Integrity).

Pseudocode Operation

No pseudocode available.

Encoding

Binary Layout
11011001000111110
31:15
000
14:12
11
11:10
Rn
9:5
Rt
4:0
 
Format Load/Store
Opcode 0xD91F0C00
Extension FEAT_GCS

Related

More in FEAT_GCS

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0xD91F0C00 GCSSTR <Xt>, [<Xn|SP>] A64 11011001000111110 | 000 | 11 | Rn | Rt

Description

Guarded Control Stack Store stores a doubleword from a register to memory. The address that is used for the store is calculated from a base register.

Operation

bits(64) address;
bits(64) data;

bits(2) effective_el = PSTATE.EL;

if effective_el == PSTATE.EL then
    CheckGCSSTREnabled();

AccessDescriptor accdesc = CreateAccDescGCS(effective_el, MemOp_STORE);

if n == 31 then
    CheckSPAlignment();
    address = SP[];
else
    address = X[n, 64];

data = X[t, 64];
Mem[address, 8, accdesc] = data;