gcsss1

Guarded Control Stack Switch Stack 1

GCSSS1 <Xt>

First step to switch the GCS pointer.

Details

First step of a two-instruction sequence to switch the Guarded Control Stack pointer. This privileged instruction validates and begins the GCS pointer switch operation using the value in the source register. It is available when FEAT_GCS is implemented and requires EL1 or higher. The instruction does not affect condition flags.

Pseudocode Operation

if FEAT_GCS == '0' then
  UNDEFINED
else if PSTATE.EL == EL0 then
  UNDEFINED
else
  GCSSwitchStack1(X[t])

Example

GCSSS1 x3

Encoding

Binary Layout
1101010100
0
01
011
0111
0111
010
Rt
 
Format System
Opcode 0xD50B7740
Extension FEAT_GCS (Security)

Operands

  • Xt
    New Stack Ptr

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0xD50B7740 GCSSS1 <Xt> A64 1101010100 | 0 | 01 | 011 | 0111 | 0111 | 010 | Rt

Description

Guarded Control Stack Switch Stack 1 validates that the stack being switched to contains a Valid cap entry, stores an In-progress cap entry to the stack that is being switched to, and sets the current Guarded control stack pointer to the stack that is being switched to. If the instruction generates a synchronous Data Abort exception, Watchpoint exception, GPC exception, or GCS Data Check exception, the value of GCSPR_ELx for the current Exception level is restored to the value held in the register before the instruction was executed.