<?xml-stylesheet type="text/xsl" encoding="UTF-8" href="iform.xsl" version="1.0"?>
<!DOCTYPE instructionsection PUBLIC "-//ARM//DTD instructionsection //EN" "iform-p.dtd">
<!-- Copyright (c) 2010-2025 Arm Limited or its affiliates. All rights reserved. -->
<!-- This document is Non-Confidential. This document may only be used and distributed in accordance with the terms of the agreement entered into by Arm and the party that Arm delivered this document to. -->
<instructionsection id="STRB_reg" title="STRB (register) -- A64" type="instruction">
  <docvars>
    <docvar key="datatype" value="32"/>
    <docvar key="instr-class" value="general"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="STRB"/>
    <docvar key="offset-type" value="off-reg"/>
  </docvars>
  <heading>STRB (register)</heading>
  <desc>
    <brief>
      <para>Store register byte (register)</para>
    </brief>
    <authored>
      <para>This instruction calculates an
address from a base register value and an offset register value,
and stores a byte from a 32-bit register
to the calculated address.
For information about addressing modes, see
<xref linkend="ARMARM_CHDIIIBB">Load/Store addressing modes</xref>.</para>
      <para>The instruction uses an offset addressing mode, that calculates
the address used for the memory access from a base register value
and an offset register value. The offset can be optionally shifted
and extended.</para>
    </authored>
  </desc>
  <operationalnotes>
    <operationalnote>
      <operationalnote_content>
        <para>This instruction is a data-independent-time instruction as described in <xref linkend="ARMARM_BEICCDDAB3">About PSTATE.DIT</xref>.</para>
      </operationalnote_content>
    </operationalnote>
  </operationalnotes>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="32-bit" oneof="1" id="iclass_32_bit" no_encodings="2" isa="A64">
      <docvars>
        <docvar key="datatype" value="32"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="STRB"/>
        <docvar key="offset-type" value="off-reg"/>
      </docvars>
      <iclassintro count="2"/>
      <regdiagram form="32" psname="A64.ldst.ldst_regoff.STRB_32B_ldst_regoff" tworows="1">
        <box hibit="31" width="2" name="size" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="29" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="26" name="VR" usename="1" settings="1" psbits="x">
          <c>0</c>
        </box>
        <box hibit="25" width="2" settings="2">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="23" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="21" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="20" width="5" name="Rm" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="15" width="3" name="option" usename="1">
          <c colspan="3"/>
        </box>
        <box hibit="12" width="1" name="S" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="11" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="9" width="5" name="Rn" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="4" width="5" name="Rt" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="STRB_32B_ldst_regoff" oneofinclass="2" oneof="2" label="Extended register" bitdiffs="option != 011">
        <docvars>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A64"/>
          <docvar key="offset-type" value="off-reg"/>
          <docvar key="datatype" value="32"/>
          <docvar key="datatype-reguse" value="32-ext-reg"/>
          <docvar key="reguse" value="ext-reg"/>
          <docvar key="mnemonic" value="STRB"/>
        </docvars>
        <box hibit="15" width="3" name="option">
          <c>Z</c>
          <c>N</c>
          <c>N</c>
        </box>
        <asmtemplate><text>STRB  </text><a hover="Is the 32-bit name of the general-purpose register to be transferred, encoded in the &quot;Rt&quot; field." link="WtOrWZR__4">&lt;Wt&gt;</a><text>, [</text><a hover="Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field." link="XnSP_option">&lt;Xn|SP&gt;</a><text>, (</text><a hover="When option&lt;0&gt; is set to 0, is the 32-bit name of the general-purpose index register, encoded in the &quot;Rm&quot; field." link="WmOrWZR">&lt;Wm&gt;</a><text>|</text><a hover="When option&lt;0&gt; is set to 1, is the 64-bit name of the general-purpose index register, encoded in the &quot;Rm&quot; field." link="XmOrXZR__2">&lt;Xm&gt;</a><text>), </text><a hover="Is the index extend specifier, " link="extend_option">&lt;extend&gt;</a><text> {</text><a hover="Is the index shift amount, it must be #0, encoded in &quot;S&quot; as 0 if omitted, or as 1 if present." link="amount">&lt;amount&gt;</a><text>}]</text></asmtemplate>
      </encoding>
      <encoding name="STRB_32BL_ldst_regoff" oneofinclass="2" oneof="2" label="Shifted register" bitdiffs="option == 011">
        <docvars>
          <docvar key="datatype" value="32"/>
          <docvar key="datatype-reguse" value="32-shifted-reg"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A64"/>
          <docvar key="offset-type" value="off-reg"/>
          <docvar key="reguse" value="shifted-reg"/>
          <docvar key="mnemonic" value="STRB"/>
        </docvars>
        <box hibit="15" width="3" name="option">
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <asmtemplate><text>STRB  </text><a hover="Is the 32-bit name of the general-purpose register to be transferred, encoded in the &quot;Rt&quot; field." link="WtOrWZR__4">&lt;Wt&gt;</a><text>, [</text><a hover="Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the &quot;Rn&quot; field." link="XnSP_option">&lt;Xn|SP&gt;</a><text>, </text><a hover="When option&lt;0&gt; is set to 1, is the 64-bit name of the general-purpose index register, encoded in the &quot;Rm&quot; field." link="XmOrXZR__2">&lt;Xm&gt;</a><text>{, LSL </text><a hover="Is the index shift amount, it must be #0, encoded in &quot;S&quot; as 0 if omitted, or as 1 if present." link="amount">&lt;amount&gt;</a><text>}]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.ldst.ldst_regoff.STRB_32B_ldst_regoff" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if option[1] == '0' then EndOfDecode(Decode_UNDEF); end;         // sub-word index
let extend_type : ExtendType = DecodeRegExtend(option);
let shift : integer{} = 0;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="STRB_32B_ldst_regoff, STRB_32BL_ldst_regoff" symboldefcount="1">
      <symbol link="WtOrWZR__4">&lt;Wt&gt;</symbol>
      <account encodedin="Rt">
        <intro>
          <para>Is the 32-bit name of the general-purpose register to be transferred, encoded in the "Rt" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STRB_32B_ldst_regoff, STRB_32BL_ldst_regoff" symboldefcount="1">
      <symbol link="XnSP_option">&lt;Xn|SP&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STRB_32B_ldst_regoff" symboldefcount="1">
      <symbol link="WmOrWZR">&lt;Wm&gt;</symbol>
      <account encodedin="Rm">
        <intro>
          <para>When <field>option&lt;0&gt;</field> is set to 0, is the 32-bit name of the general-purpose index register, encoded in the "Rm" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STRB_32B_ldst_regoff, STRB_32BL_ldst_regoff" symboldefcount="1">
      <symbol link="XmOrXZR__2">&lt;Xm&gt;</symbol>
      <account encodedin="Rm">
        <intro>
          <para>When <field>option&lt;0&gt;</field> is set to 1, is the 64-bit name of the general-purpose index register, encoded in the "Rm" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="STRB_32B_ldst_regoff" symboldefcount="1">
      <symbol link="extend_option">&lt;extend&gt;</symbol>
      <definition encodedin="option">
        <intro>Is the index extend specifier, </intro>
        <table class="valuetable">
          <tgroup cols="2">
            <thead>
              <row>
                <entry class="bitfield">option</entry>
                <entry class="symbol">&lt;extend&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">010</entry>
                <entry class="symbol">UXTW</entry>
              </row>
              <row>
                <entry class="bitfield">110</entry>
                <entry class="symbol">SXTW</entry>
              </row>
              <row>
                <entry class="bitfield">111</entry>
                <entry class="symbol">SXTX</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="STRB_32B_ldst_regoff, STRB_32BL_ldst_regoff" symboldefcount="1">
      <symbol link="amount">&lt;amount&gt;</symbol>
      <account encodedin="S">
        <intro>
          <para>Is the index shift amount, it must be <value>#0</value>, encoded in "S" as 0 if omitted, or as 1 if present.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.ldst.ldst_regoff.STRB_32B_ldst_regoff" sections="1" secttype="Shared Decode">
      <pstext mayhavelinks="1" section="Postdecode" rep_section="postdecode">let t : integer{} = UInt(Rt);
let n : integer{} = UInt(Rn);
let m : integer{} = UInt(Rm);
let nontemporal : boolean = FALSE;
let tagchecked : boolean = TRUE;</pstext></ps>
  </ps_section>
  <ps_section howmany="1">
    <ps name="A64.ldst.ldst_regoff.STRB_32B_ldst_regoff" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">let offset : bits(64) = ExtendReg{}(m, extend_type, shift);
var address : bits(64);

let privileged : boolean = PSTATE.EL != EL0;
let accdesc : AccessDescriptor = CreateAccDescGPR(MemOp_STORE, nontemporal, privileged,
                                                  tagchecked, t);

if n == 31 then
    CheckSPAlignment();
    address = SP{64}();
else
    address = X{64}(n);
end;

address = AddressAdd(address, offset, accdesc);

Mem{8}(address, accdesc) = X{8}(t);</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
