<?xml version="1.0" ?><?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-2026 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="MRS_br" title="MRS (Banked register) -- AArch32" type="instruction">
  <docvars>
    <docvar key="instr-class" value="general"/>
    <docvar key="mnemonic" value="MRS"/>
  </docvars>
  <heading>MRS (Banked register)</heading>
  <desc>
    <brief>
      <para>Move Banked or Special register to general-purpose register</para>
    </brief>
    <authored>
      <para>Move to Register from Banked or Special register moves the
value from the Banked general-purpose register or <xref linkend="ARMARM_CHDDAABB">Saved Program Status Registers (SPSRs)</xref> of the specified
mode, or the value of <xref linkend="ARMARM_BEIJHFCF">ELR_hyp</xref>,
to a general-purpose register.</para>
      <para><instruction>MRS</instruction> (Banked register) is <arm-defined-word>UNPREDICTABLE</arm-defined-word> if executed in User
mode.</para>
      <para>When EL3 is using AArch64, if an MRS (Banked register) instruction that is executed in a Secure EL1 mode would access SPSR_mon, SP_mon, or LR_mon, it is trapped to EL3.</para>
      <para>The effect of using an <instruction>MRS</instruction> (Banked
register) instruction with a register argument that is not valid
for the current mode is <arm-defined-word>UNPREDICTABLE</arm-defined-word>.
For more information see <xref linkend="ARMARM_CHDFDJDA">Usage restrictions on the Banked register transfer instructions</xref>.</para>
    </authored>
    <encodingnotes>
      <para>For more information about the <arm-defined-word>CONSTRAINED UNPREDICTABLE</arm-defined-word> behavior of this instruction, see <xref linkend="ARMARM_CJAEGDJC">Architectural Constraints on UNPREDICTABLE behaviors</xref>.</para>
    </encodingnotes>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <classesintro count="2">
      <txt>It has encodings from the following instruction sets:</txt>
      <txt> A32 (</txt>
      <a href="#iclass_a1">A1</a>
      <txt>)</txt>
      <txt> and </txt>
      <txt> T32 (</txt>
      <a href="#iclass_t1">T1</a>
      <txt>)</txt>
      <txt>.</txt>
    </classesintro>
    <iclass name="A1" oneof="2" id="iclass_a1" no_encodings="1" isa="A32">
      <docvars>
        <docvar key="armarmheading" value="A1"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="A32"/>
        <docvar key="mnemonic" value="MRS"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="32" psname="A32.dp.dpmisc.movsr_reg.MRS_br_A1_AS" tworows="1">
        <box hibit="31" width="4" name="cond" usename="1" settings="4" constraint="!= 1111">
          <c colspan="4">!= 1111</c>
        </box>
        <box hibit="27" width="2" settings="2">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="25" width="3" settings="3">
          <c>0</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="22" width="1" name="R" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="21" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="20" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="19" width="4" name="M1" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="15" width="4" name="Rd" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="11" width="2" settings="2">
          <c>(0)</c>
          <c>(0)</c>
        </box>
        <box hibit="9" name="B" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="8" width="1" name="M" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="7" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="6" width="3" settings="3">
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="3" width="4" name="Rn" usename="1" settings="4" psbits="xxxx">
          <c>(0)</c>
          <c>(0)</c>
          <c>(0)</c>
          <c>(0)</c>
        </box>
      </regdiagram>
      <encoding name="MRS_br_A1_AS" oneofinclass="1" oneof="2" label="">
        <docvars>
          <docvar key="armarmheading" value="A1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A32"/>
          <docvar key="mnemonic" value="MRS"/>
        </docvars>
        <asmtemplate><text>MRS{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="c__5">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}  </text><a hover="Is the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="Rd">&lt;Rd&gt;</a><text>, </text><a hover="Is the name of the banked register to be transferred to or from, " link="banked_reg_option">&lt;banked_reg&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A32.dp.dpmisc.movsr_reg.MRS_br_A1_AS" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">let d : integer = UInt(Rd);
let read_spsr : boolean = (R == '1');
if d == 15 then UnpredictableProcedure(); end;
let SYSm : bits(5) = M::M1;</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="T1" oneof="2" id="iclass_t1" no_encodings="1" isa="T32">
      <docvars>
        <docvar key="armarmheading" value="T1"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="T32"/>
        <docvar key="mnemonic" value="MRS"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="16x2" psname="T32.w.bcrtrl.mrs_bank.MRS_br_T1_AS">
        <box hibit="31" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="28" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="26" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="25" width="4" settings="4">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="21" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="20" width="1" name="R" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="19" width="4" name="M1" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="15" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="14" width="3" settings="3">
          <c>0</c>
          <c>(0)</c>
          <c>0</c>
        </box>
        <box hibit="11" width="4" name="Rd" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="7" width="2" settings="2">
          <c>(0)</c>
          <c>(0)</c>
        </box>
        <box hibit="5" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="4" width="1" name="M" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="3" width="4" settings="4">
          <c>(0)</c>
          <c>(0)</c>
          <c>(0)</c>
          <c>(0)</c>
        </box>
      </regdiagram>
      <encoding name="MRS_br_T1_AS" oneofinclass="1" oneof="2" label="">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic" value="MRS"/>
        </docvars>
        <asmtemplate><text>MRS{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="c__5">&lt;c&gt;</a><text>}{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="qw_option">&lt;q&gt;</a><text>}  </text><a hover="Is the general-purpose destination register, encoded in the &quot;Rd&quot; field." link="Rd">&lt;Rd&gt;</a><text>, </text><a hover="Is the name of the banked register to be transferred to or from, " link="banked_reg_option">&lt;banked_reg&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="T32.w.bcrtrl.mrs_bank.MRS_br_T1_AS" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">let d : integer = UInt(Rd);
let read_spsr : boolean = (R == '1');
// Armv8-A removes UNPREDICTABLE for R13
if d == 15 then UnpredictableProcedure(); end;
let SYSm : bits(5) = M::M1;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="MRS_br_A1_AS, MRS_br_T1_AS" symboldefcount="1">
      <symbol link="c__5">&lt;c&gt;</symbol>
      <account encodedin="cond">
        <intro>
          <para>See <xref linkend="Babbefhf">Standard assembler syntax fields</xref>.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MRS_br_A1_AS, MRS_br_T1_AS" symboldefcount="1">
      <symbol link="qw_option">&lt;q&gt;</symbol>
      <account encodedin="">
        <intro>
          <para>See <xref linkend="Babbefhf">Standard assembler syntax fields</xref>.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MRS_br_A1_AS, MRS_br_T1_AS" symboldefcount="1">
      <symbol link="Rd">&lt;Rd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the general-purpose destination register, encoded in the &quot;Rd&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MRS_br_A1_AS, MRS_br_T1_AS" symboldefcount="1">
      <symbol link="banked_reg_option">&lt;banked_reg&gt;</symbol>
      <definition encodedin="(R :: M :: M1)">
        <intro>Is the name of the banked register to be transferred to or from, </intro>
        <table class="valuetable">
          <tgroup cols="4">
            <thead>
              <row>
                <entry class="bitfield">R</entry>
                <entry class="bitfield">M</entry>
                <entry class="bitfield">M1</entry>
                <entry class="symbol">&lt;banked_reg&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0000</entry>
                <entry class="symbol">R8_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0001</entry>
                <entry class="symbol">R9_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0010</entry>
                <entry class="symbol">R10_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0011</entry>
                <entry class="symbol">R11_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0100</entry>
                <entry class="symbol">R12_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0101</entry>
                <entry class="symbol">SP_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0110</entry>
                <entry class="symbol">LR_usr</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0111</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1000</entry>
                <entry class="symbol">R8_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1001</entry>
                <entry class="symbol">R9_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1010</entry>
                <entry class="symbol">R10_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1011</entry>
                <entry class="symbol">R11_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1100</entry>
                <entry class="symbol">R12_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1101</entry>
                <entry class="symbol">SP_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1110</entry>
                <entry class="symbol">LR_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1111</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0000</entry>
                <entry class="symbol">LR_irq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0001</entry>
                <entry class="symbol">SP_irq</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0010</entry>
                <entry class="symbol">LR_svc</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0011</entry>
                <entry class="symbol">SP_svc</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0100</entry>
                <entry class="symbol">LR_abt</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0101</entry>
                <entry class="symbol">SP_abt</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0110</entry>
                <entry class="symbol">LR_und</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0111</entry>
                <entry class="symbol">SP_und</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">10xx</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1100</entry>
                <entry class="symbol">LR_mon</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1101</entry>
                <entry class="symbol">SP_mon</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1110</entry>
                <entry class="symbol">ELR_hyp</entry>
              </row>
              <row>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1111</entry>
                <entry class="symbol">SP_hyp</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">0xxx</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">10xx</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">110x</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1110</entry>
                <entry class="symbol">SPSR_fiq</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0</entry>
                <entry class="bitfield">1111</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0000</entry>
                <entry class="symbol">SPSR_irq</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0001</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0010</entry>
                <entry class="symbol">SPSR_svc</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0011</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0100</entry>
                <entry class="symbol">SPSR_abt</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0101</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0110</entry>
                <entry class="symbol">SPSR_und</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">0111</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">10xx</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1100</entry>
                <entry class="symbol">SPSR_mon</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1101</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1110</entry>
                <entry class="symbol">SPSR_hyp</entry>
              </row>
              <row>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1</entry>
                <entry class="bitfield">1111</entry>
                <entry class="symbol">UNPREDICTABLE</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A32.dp.dpmisc.movsr_reg.MRS_br_A1_AS" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">if <a link="func_ConditionPassed_0" file="shared_pseudocode.xml">ConditionPassed</a>() then
    EncodingSpecificOperations();
    if <a link="global_PSTATE" file="shared_pseudocode.xml">PSTATE</a>.EL == <a link="global_EL0" file="shared_pseudocode.xml">EL0</a> then
        let c : <a link="type_Constraint" file="shared_pseudocode.xml">Constraint</a> = ConstrainUnpredictable(<a link="enum_Unpredictable_BankedRegister" file="shared_pseudocode.xml">Unpredictable_BankedRegister</a>);
        case c of
            when <a link="enum_Constraint_UNDEF" file="shared_pseudocode.xml">Constraint_UNDEF</a> =&gt;
                Undefined();
            when <a link="enum_Constraint_NOP" file="shared_pseudocode.xml">Constraint_NOP</a> =&gt;
                <a link="func_ExecuteAsNOP_0" file="shared_pseudocode.xml">ExecuteAsNOP</a>();
            when <a link="enum_Constraint_UNKNOWN" file="shared_pseudocode.xml">Constraint_UNKNOWN</a> =&gt;
                <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = ARBITRARY : bits(32);
        end;
    else
        let mode : bits(5) = <a link="global_PSTATE" file="shared_pseudocode.xml">PSTATE</a>.M;
        if read_spsr then
            // Check for CONSTRAINED UNPREDICTABLE cases
            var valid : boolean;
            var c : <a link="type_Constraint" file="shared_pseudocode.xml">Constraint</a> = <a link="enum_Constraint_NONE" file="shared_pseudocode.xml">Constraint_NONE</a>;
            (valid, c)   = <a link="func_SPSRaccessValid_2" file="shared_pseudocode.xml">SPSRaccessValid</a>(SYSm, mode);

            if valid then
                case SYSm of
                    when '01110' =&gt; <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_fiq()[31:0];
                    when '10000' =&gt; <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_irq()[31:0];
                    when '10010' =&gt; <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_svc()[31:0];
                    when '10100' =&gt; <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_abt()[31:0];
                    when '10110' =&gt; <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_und()[31:0];
                    when '11100' =&gt;
                        if !<a link="func_ELUsingAArch32_1" file="shared_pseudocode.xml">ELUsingAArch32</a>(<a link="global_EL3" file="shared_pseudocode.xml">EL3</a>) then <a link="func_AArch64_MonitorModeTrap_0" file="shared_pseudocode.xml">AArch64_MonitorModeTrap</a>(); end;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_mon();
                    when '11110' =&gt; <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = SPSR_hyp()[31:0];
                end;
            else
                case c of
                    when <a link="enum_Constraint_UNDEF" file="shared_pseudocode.xml">Constraint_UNDEF</a> =&gt;
                        Undefined();
                    when <a link="enum_Constraint_NOP" file="shared_pseudocode.xml">Constraint_NOP</a> =&gt;
                        <a link="func_ExecuteAsNOP_0" file="shared_pseudocode.xml">ExecuteAsNOP</a>();
                    when <a link="enum_Constraint_UNKNOWN" file="shared_pseudocode.xml">Constraint_UNKNOWN</a> =&gt;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = ARBITRARY : bits(32);
                    when <a link="enum_Constraint_ANYREG" file="shared_pseudocode.xml">Constraint_ANYREG</a> =&gt;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="func_ReadAnyAllocatedSPSR_0" file="shared_pseudocode.xml">ReadAnyAllocatedSPSR</a>();
                end;
            end;
        else
            // Check for CONSTRAINED UNPREDICTABLE cases
            var valid : boolean;
            var c : <a link="type_Constraint" file="shared_pseudocode.xml">Constraint</a> = <a link="enum_Constraint_NONE" file="shared_pseudocode.xml">Constraint_NONE</a>;
            (valid, c)   = <a link="func_BankedRegisterAccessValid_2" file="shared_pseudocode.xml">BankedRegisterAccessValid</a>(SYSm, mode);

            if valid then
                case SYSm of
                    when '00xxx' =&gt;                        // Access the User mode registers
                        let m : integer = UInt(SYSm[2:0]) + 8;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_User" file="shared_pseudocode.xml">M32_User</a>);
                    when '01xxx' =&gt;                        // Access the FIQ mode registers
                        let m : integer = UInt(SYSm[2:0]) + 8;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_FIQ" file="shared_pseudocode.xml">M32_FIQ</a>);
                    when '1000x' =&gt;                        // Access the IRQ mode registers
                        // LR when SYSm[0] == 0, otherwise SP
                        let m : integer = 14 - UInt(SYSm[0]);
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_IRQ" file="shared_pseudocode.xml">M32_IRQ</a>);
                    when '1001x' =&gt;                        // Access the Supervisor mode registers
                        // LR when SYSm[0] == 0, otherwise SP
                        let m : integer = 14 - UInt(SYSm[0]);
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_Svc" file="shared_pseudocode.xml">M32_Svc</a>);
                    when '1010x' =&gt;                         // Access the Abort mode registers
                        // LR when SYSm[0] == 0, otherwise SP
                        let m : integer = 14 - UInt(SYSm[0]);
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_Abort" file="shared_pseudocode.xml">M32_Abort</a>);
                    when '1011x' =&gt;                         // Access the Undefined mode registers
                        // LR when SYSm[0] == 0, otherwise SP
                        let m : integer = 14 - UInt(SYSm[0]);
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_Undef" file="shared_pseudocode.xml">M32_Undef</a>);
                    when '1110x' =&gt;                        // Access Monitor registers
                        if !<a link="func_ELUsingAArch32_1" file="shared_pseudocode.xml">ELUsingAArch32</a>(<a link="global_EL3" file="shared_pseudocode.xml">EL3</a>) then <a link="func_AArch64_MonitorModeTrap_0" file="shared_pseudocode.xml">AArch64_MonitorModeTrap</a>(); end;
                        // LR when SYSm[0] == 0, otherwise SP
                        let m : integer = 14 - UInt(SYSm[0]);
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(m,<a link="global_M32_Monitor" file="shared_pseudocode.xml">M32_Monitor</a>);
                    when '11110' =&gt;                        // Access ELR_hyp register
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = ELR_hyp();
                    when '11111' =&gt;                        // Access SP_hyp register
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="accessor_Rmode_2" file="shared_pseudocode.xml">Rmode</a>(13,<a link="global_M32_Hyp" file="shared_pseudocode.xml">M32_Hyp</a>);
                end;
            else
                case c of
                    when <a link="enum_Constraint_UNDEF" file="shared_pseudocode.xml">Constraint_UNDEF</a> =&gt;
                        Undefined();
                    when <a link="enum_Constraint_NOP" file="shared_pseudocode.xml">Constraint_NOP</a> =&gt;
                        <a link="func_ExecuteAsNOP_0" file="shared_pseudocode.xml">ExecuteAsNOP</a>();
                    when <a link="enum_Constraint_UNKNOWN" file="shared_pseudocode.xml">Constraint_UNKNOWN</a> =&gt;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = ARBITRARY :bits(32);
                    when <a link="enum_Constraint_ANYREG" file="shared_pseudocode.xml">Constraint_ANYREG</a> =&gt;
                        <a link="accessor_R_1" file="shared_pseudocode.xml">R</a>(d) = <a link="func_ReadAnyAllocatedRegister_0" file="shared_pseudocode.xml">ReadAnyAllocatedRegister</a>();
                end;
            end;
        end;
    end;
end;</pstext></ps>
  </ps_section>
  <constrained_unpredictables ps_block="Operation">
    <cu_case>
      <cu_cause>
        <pstext mayhavelinks="1">PSTATE.EL == EL0</pstext></cu_cause>
      <cu_type constraint="Constraint_UNDEF"/>
      <cu_type constraint="Constraint_NOP"/>
    </cu_case>
  </constrained_unpredictables>
  <timestamp>2026-03-26 20:27:25</timestamp>
  <commit_id>2026-03_rel</commit_id>
</instructionsection>