gcspopm

Guarded Control Stack Pop

GCSPOPM

Pops the value from the Guarded Control Stack into LR.

Details

Pops a value from the Guarded Control Stack (GCS) and loads it into the Link Register (LR/X30). This privileged instruction is available when FEAT_GCS is implemented and requires EL1 or higher. The instruction does not affect the condition flags but may generate a GCS exception if the stack underflows.

Pseudocode Operation

if FEAT_GCS == '0' then
  UNDEFINED
else if PSTATE.EL == EL0 then
  UNDEFINED
else
  X[30] ← GCSPop()
  PC ← X[30]

Example

GCSPOPM

Encoding

Binary Layout
1101010100
1
01
011
0111
0111
001
Rt
 
Format System
Opcode 0xD52B7720
Extension FEAT_GCS (Security)

Operands

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0xD52B7720 GCSPOPM {<Xt>} A64 1101010100 | 1 | 01 | 011 | 0111 | 0111 | 001 | Rt

Description

Guarded Control Stack Pop loads the 64-bit doubleword that is pointed to by the current Guarded control stack pointer, writes it to the destination register, and increments the current Guarded control stack pointer register by the size of a Guarded control stack procedure return record.