strbt

Store Register Byte Unprivileged

STRBT<c> <Rt>, [<Rn>, #+/-<imm>]

Stores a byte using User Mode permissions.

Details

Stores a byte (8 bits) to memory using User Mode access permissions, ignoring the current privilege level. The T suffix indicates unprivileged (User mode) access is enforced. No condition flags are affected. This is an A32 instruction.

Pseudocode Operation

address ← Rn + (if U then imm12 else -imm12); Mem[address, 1] ← Rt[7:0];

Example

STRBT r3, [r1, #+/-#16]

Encoding

Binary Layout
cond
010
0
U
1
1
0
Rn
Rt
imm12
 
Format Load/Store
Opcode 0x04600000
Extension A32 (Base)

Operands

  • Rt
    Transfer general-purpose register (load/store)
  • Rn
    First source / base general-purpose register
  • imm
    Signed immediate value

Reference (Arm AArch32 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0x04600000 STRBT{<c>}{<q>} <Rt>, [<Rn>] {, #{+/-}<imm>} A32 cond | 010 | 0 | U | 1 | 1 | 0 | Rn | Rt | imm12
0x06600000 STRBT{<c>}{<q>} <Rt>, [<Rn>], {+/-}<Rm>{, <shift>} A32 cond | 011 | 0 | U | 1 | 1 | 0 | Rn | Rt | imm5 | stype | 0 | Rm
0xF8000E00 STRBT{<c>}{<q>} <Rt>, [<Rn> {, #{+}<imm>}] T32 111110000 | 00 | 0 | Rn | Rt | 1110 | imm8

Description

Store Register Byte Unprivileged stores a byte from a register to memory. For information about memory accesses see Memory accesses. The memory access is restricted as if the PE were running in User mode. This makes no difference if the PE is actually running in User mode. STRBT is unpredictable in Hyp mode. The T32 instruction uses an offset addressing mode, that calculates the address used for the memory access from a base register value and an immediate offset, and leaves the base register unchanged. The A32 instruction uses a post-indexed addressing mode, that uses a base register value as the address for the memory access, and calculates a new address from a base register value and an offset and writes it back to the base register. The offset can be an immediate value or an optionally-shifted register value.

Operation

if ConditionPassed() then
    EncodingSpecificOperations();
    if PSTATE.EL == EL2 then UNPREDICTABLE;               // Hyp mode
    offset = if register_form then Shift(R[m], shift_t, shift_n, PSTATE.C) else imm32;
    offset_addr = if add then (R[n] + offset) else (R[n] - offset);
    address = if postindex then R[n] else offset_addr;
    MemU_unpriv[address,1] = R[t]<7:0>;
    if postindex then R[n] = offset_addr;