Load Register Signed Byte (register) via alternate base determines the base register to be used, derives an address from the base register and an offset register, loads a byte from memory, sign-extends it, and writes the result to the destination register. The offset register can optionally be shifted and extended. The base register used by this operation depends on PSTATE.C64: if PSTATE.C64 is 1, the base register is a 64-bit general-purpose register; if PSTATE.C64 is 0, the base register is a capability general-purpose register. For information about memory accesses, see Load/Store addressing modes.
It has encodings from 2 classes: Doubleword and Word
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | Rm | sign | 1 | sz | S | 0 | 1 | Rn | Rt | ||||||||||||
L | opc |
LDRSB <Xt>, [<Cn|CSP>, <R><m>, <extend>] // (PSTATE.C64 == '0')
LDRSB <Xt>, [<Xn|SP>, <R><m>, <extend>] // (PSTATE.C64 == '1')
integer t = UInt(Rt); integer n = UInt(Rn); integer m = UInt(Rm); integer scale = 0; ExtendType extend_type = DecodeRegExtend(sign:'1':sz); integer shift = if S == '1' then scale else 0; integer regsize = 64;
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | Rm | sign | 1 | sz | S | 0 | 1 | Rn | Rt | ||||||||||||
L | opc |
LDRSB <Wt>, [<Cn|CSP>, <R><m>, <extend>] // (PSTATE.C64 == '0')
LDRSB <Wt>, [<Xn|SP>, <R><m>, <extend>] // (PSTATE.C64 == '1')
integer t = UInt(Rt); integer n = UInt(Rn); integer m = UInt(Rm); integer scale = 0; ExtendType extend_type = DecodeRegExtend(sign:'1':sz); integer shift = if S == '1' then scale else 0; integer regsize = 32;
<Wt> |
Is the 32-bit name of the general-purpose register to be transferred, encoded in the "Rt" field. |
<Xt> |
Is the 64-bit name of the general-purpose register to be transferred, encoded in the "Rt" field. |
<Xn|SP> |
Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field. |
<Cn|CSP> |
Is the capability name of the base register or stack pointer, encoded in the "Rn" field. |
<R> |
Is a width specifier,
encoded in
sz:
|
<m> |
Is the number [0-30] of the source general-purpose register or the name ZR (31), encoded in the "Rm" field. |
<extend> |
Is the index extend and shift specifier,
encoded in
sign:sz:
|
CheckCapabilitiesEnabled(); bits(64) offset = ExtendReg(m, extend_type, shift); VirtualAddress base = AltBaseReg[n]; integer datasize = 8 << scale; bits(64) addr = VAddress(base) + offset; VACheckAddress(base, addr, datasize DIV 8, CAP_PERM_LOAD, AccType_NORMAL); bits(datasize) data = Mem[addr, datasize DIV 8, AccType_NORMAL]; X[t] = SignExtend(data, regsize);
Internal version only: isa v32.13, AdvSIMD v29.04, pseudocode morello-2022-01_rc2, capabilities morello-2022-01_rc2 ; Build timestamp: 2022-01-11T11:23
Copyright © 2010-2022 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.