← Home

SPSel: Stack Pointer Select

Purpose

Allows the Stack Pointer to be selected between SP_EL0 and SP_ELx.

Configuration

There are no configuration notes.

Attributes

SPSel is a 64-bit register.

Field descriptions

6362616059585756555453525150494847464544434241403938373635343332
313029282726252423222120191817161514131211109876543210
RES0
RES0SP

Bits [63:1]

Reserved, RES0.

SP, bit [0]

Stack pointer to use. Possible values of this bit are:

SPMeaning
0b0

Use SP_EL0 at all Exception levels.

0b1

Use SP_ELx for Exception level ELx.

When FEAT_NMI is implemented and SCTLR_ELx.SPINTMASK is 1, if execution is at ELx, an IRQ or FIQ interrupt that is targeted to ELx is masked regardless of any denotion of Superpriority.

The reset behavior of this field is:

Accessing SPSel

Accesses to this register use the following encodings in the System register encoding space:

MRS <Xt>, SPSel

op0op1CRnCRmop2
0b110b0000b01000b00100b000

if PSTATE.EL == EL0 then UNDEFINED; elsif PSTATE.EL == EL1 then X[t, 64] = Zeros(63):PSTATE.SP; elsif PSTATE.EL == EL2 then X[t, 64] = Zeros(63):PSTATE.SP; elsif PSTATE.EL == EL3 then X[t, 64] = Zeros(63):PSTATE.SP;

MSR SPSel, <Xt>

op0op1CRnCRmop2
0b110b0000b01000b00100b000

if PSTATE.EL == EL0 then UNDEFINED; elsif PSTATE.EL == EL1 then PSTATE.SP = X[t, 64]<0>; elsif PSTATE.EL == EL2 then PSTATE.SP = X[t, 64]<0>; elsif PSTATE.EL == EL3 then PSTATE.SP = X[t, 64]<0>;

MSR SPSel, #<imm>

op0op1CRnop2
0b000b0000b01000b101