<?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="MOV_rr" title="MOV, MOVS (register-shifted register) -- AArch32" type="instruction">
  <docvars>
    <docvar key="instr-class" value="general"/>
  </docvars>
  <heading>MOV, MOVS (register-shifted register)</heading>
  <desc>
    <brief>
      <para>Move (register-shifted register)</para>
    </brief>
    <authored>
      <para>Move (register-shifted register) copies a register-shifted register
value to the destination register. It can optionally update the
condition flags based on the value.</para>
    </authored>
    <encodingnotes>
      <para>Related encodings: In encoding T1, for an <field>op</field> field value that is not described above, see <xref linkend="ARMARM_T32.encoding_index.dpint16_2l">Data-processing (two low registers)</xref>.</para>
      <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>
  <operationalnotes>
    <operationalnote>
      <operationalnote_content>
        <para>This instruction is a data-independent-time instruction as described in <xref linkend="ARMARM_BEIIDCEG">About the DIT bit</xref>.</para>
      </operationalnote_content>
    </operationalnote>
  </operationalnotes>
  <alias_list howmany="8">
    <alias_list_intro>This instruction is used by the aliases </alias_list_intro>
    <aliasref aliaspageid="ASRS_MOV_rr" aliasfile="asrs_mov_rr.xml" hover="Arithmetic Shift Right, setting flags (register)" punct=", ">
      <text>ASRS (register)</text>
      <aliaspref labels="A1 Flag setting">S == '1' &amp;&amp; stype == '10'</aliaspref>
      <aliaspref labels="T1 Arithmetic shift right">op == '0100' &amp;&amp; !InITBlock()</aliaspref>
      <aliaspref labels="T2 Flag setting">stype == '10' &amp;&amp; S == '1'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="ASR_MOV_rr" aliasfile="asr_mov_rr.xml" hover="Arithmetic Shift Right (register)" punct=", ">
      <text>ASR (register)</text>
      <aliaspref labels="A1 Not flag setting">S == '0' &amp;&amp; stype == '10'</aliaspref>
      <aliaspref labels="T1 Arithmetic shift right">op == '0100' &amp;&amp; InITBlock()</aliaspref>
      <aliaspref labels="T2 Not flag setting">stype == '10' &amp;&amp; S == '0'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="LSLS_MOV_rr" aliasfile="lsls_mov_rr.xml" hover="Logical Shift Left, setting flags (register)" punct=", ">
      <text>LSLS (register)</text>
      <aliaspref labels="A1 Flag setting">S == '1' &amp;&amp; stype == '00'</aliaspref>
      <aliaspref labels="T1 Logical shift left">op == '0010' &amp;&amp; !InITBlock()</aliaspref>
      <aliaspref labels="T2 Flag setting">stype == '00' &amp;&amp; S == '1'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="LSL_MOV_rr" aliasfile="lsl_mov_rr.xml" hover="Logical Shift Left (register)" punct=", ">
      <text>LSL (register)</text>
      <aliaspref labels="A1 Not flag setting">S == '0' &amp;&amp; stype == '00'</aliaspref>
      <aliaspref labels="T1 Logical shift left">op == '0010' &amp;&amp; InITBlock()</aliaspref>
      <aliaspref labels="T2 Not flag setting">stype == '00' &amp;&amp; S == '0'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="LSRS_MOV_rr" aliasfile="lsrs_mov_rr.xml" hover="Logical Shift Right, setting flags (register)" punct=", ">
      <text>LSRS (register)</text>
      <aliaspref labels="A1 Flag setting">S == '1' &amp;&amp; stype == '01'</aliaspref>
      <aliaspref labels="T1 Logical shift right">op == '0011' &amp;&amp; !InITBlock()</aliaspref>
      <aliaspref labels="T2 Flag setting">stype == '01' &amp;&amp; S == '1'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="LSR_MOV_rr" aliasfile="lsr_mov_rr.xml" hover="Logical Shift Right (register)" punct=", ">
      <text>LSR (register)</text>
      <aliaspref labels="A1 Not flag setting">S == '0' &amp;&amp; stype == '01'</aliaspref>
      <aliaspref labels="T1 Logical shift right">op == '0011' &amp;&amp; InITBlock()</aliaspref>
      <aliaspref labels="T2 Not flag setting">stype == '01' &amp;&amp; S == '0'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="RORS_MOV_rr" aliasfile="rors_mov_rr.xml" hover="Rotate Right, setting flags (register)" punct=" and ">
      <text>RORS (register)</text>
      <aliaspref labels="A1 Flag setting">S == '1' &amp;&amp; stype == '11'</aliaspref>
      <aliaspref labels="T1 Rotate right">op == '0111' &amp;&amp; !InITBlock()</aliaspref>
      <aliaspref labels="T2 Flag setting">stype == '11' &amp;&amp; S == '1'</aliaspref>
    </aliasref>
    <aliasref aliaspageid="ROR_MOV_rr" aliasfile="ror_mov_rr.xml" hover="Rotate Right (register)" punct=".">
      <text>ROR (register)</text>
      <aliaspref labels="A1 Not flag setting">S == '0' &amp;&amp; stype == '11'</aliaspref>
      <aliaspref labels="T1 Rotate right">op == '0111' &amp;&amp; InITBlock()</aliaspref>
      <aliaspref labels="T2 Not flag setting">stype == '11' &amp;&amp; S == '0'</aliaspref>
    </aliasref>
    <alias_list_outro>
      <text>  See </text>
      <aliastablelink/>
      <text> below for details of when each alias is preferred.</text>
    </alias_list_outro>
  </alias_list>
  <classes>
    <classesintro count="3">
      <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> and </txt>
      <a href="#iclass_t2">T2</a>
      <txt>)</txt>
      <txt>.</txt>
    </classesintro>
    <iclass name="A1" oneof="3" id="iclass_a1" no_encodings="2" isa="A32">
      <docvars>
        <docvar key="armarmheading" value="A1"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="A32"/>
      </docvars>
      <iclassintro count="2"/>
      <regdiagram form="32" psname="A32.dp.dpregrs.logic3reg_regsh.MOVS_rr_A1" 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="5" settings="5">
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="22" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="20" width="1" name="S" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="19" width="4" name="Rn" usename="1" settings="4" psbits="xxxx">
          <c>(0)</c>
          <c>(0)</c>
          <c>(0)</c>
          <c>(0)</c>
        </box>
        <box hibit="15" width="4" name="Rd" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="11" width="4" name="Rs" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="7" width="1" settings="1">
          <c>0</c>
        </box>
        <box hibit="6" width="2" name="stype" usename="1">
          <c colspan="2"/>
        </box>
        <box hibit="4" width="1" settings="1">
          <c>1</c>
        </box>
        <box hibit="3" width="4" name="Rm" usename="1">
          <c colspan="4"/>
        </box>
      </regdiagram>
      <encoding name="MOVS_rr_A1" oneofinclass="2" oneof="8" label="Flag setting" bitdiffs="S == 1">
        <docvars>
          <docvar key="armarmheading" value="A1"/>
          <docvar key="cond-setting" value="s"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A32"/>
          <docvar key="mnemonic" value="MOVS"/>
        </docvars>
        <box hibit="20" width="1" name="S">
          <c>1</c>
        </box>
        <asmtemplate><text>MOVS{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 general-purpose source register, encoded in the &quot;Rm&quot; field." link="Rm__2">&lt;Rm&gt;</a><text>, </text><a hover="Is the type of shift to be applied to the second source register, " link="shift_option__5">&lt;shift&gt;</a><text> </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <encoding name="MOV_rr_A1" oneofinclass="2" oneof="8" label="Not flag setting" bitdiffs="S == 0">
        <docvars>
          <docvar key="armarmheading" value="A1"/>
          <docvar key="cond-setting" value="no-s"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A32"/>
          <docvar key="mnemonic" value="MOV"/>
        </docvars>
        <box hibit="20" width="1" name="S">
          <c>0</c>
        </box>
        <asmtemplate><text>MOV{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 general-purpose source register, encoded in the &quot;Rm&quot; field." link="Rm__2">&lt;Rm&gt;</a><text>, </text><a hover="Is the type of shift to be applied to the second source register, " link="shift_option__5">&lt;shift&gt;</a><text> </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A32.dp.dpregrs.logic3reg_regsh.MOVS_rr_A1" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">let d : integer = UInt(Rd);
let m : integer = UInt(Rm);
let s : integer = UInt(Rs);
let setflags : boolean = (S == '1');
let shift_t : <a link="SRType" file="shared_pseudocode.xml" hover="type SRType">SRType</a> = DecodeRegShift(stype);
if d == 15 || m == 15 || s == 15 then UnpredictableProcedure(); end;</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="T1" oneof="3" id="iclass_t1" no_encodings="4" isa="T32">
      <docvars>
        <docvar key="armarmheading" value="T1"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="T32"/>
        <docvar key="mnemonic" value="MOV"/>
      </docvars>
      <iclassintro count="4"/>
      <regdiagram form="16" psname="T32.n.dpint16_2l.MOV_rr_T1_ASR" tworows="1">
        <box hibit="15" width="6" settings="6">
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="9" width="4" name="op" usename="1" settings="1" psbits="xxxx">
          <c>0</c>
          <c>x</c>
          <c>x</c>
          <c>x</c>
        </box>
        <box hibit="5" width="3" name="Rs" usename="1">
          <c colspan="3"/>
        </box>
        <box hibit="2" width="3" name="Rdm" usename="1">
          <c colspan="3"/>
        </box>
      </regdiagram>
      <encoding name="MOV_rr_T1_ASR" oneofinclass="4" oneof="8" label="Arithmetic shift right" bitdiffs="op == 0100">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic-shift-type" value="MOV-asr"/>
          <docvar key="shift-type" value="asr"/>
          <docvar key="mnemonic" value="MOV"/>
        </docvars>
        <box hibit="9" width="4" name="op">
          <c/>
          <c>1</c>
          <c>0</c>
          <c>0</c>
        </box>
        <asmtemplate comment="InITBlock()"><text>MOV</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, ASR </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
        <asmtemplate comment="Outside IT block"><text>MOVS{</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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, ASR </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <encoding name="MOV_rr_T1_LSL" oneofinclass="4" oneof="8" label="Logical shift left" bitdiffs="op == 0010">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic-shift-type" value="MOV-lsl"/>
          <docvar key="shift-type" value="lsl"/>
          <docvar key="mnemonic" value="MOV"/>
        </docvars>
        <box hibit="9" width="4" name="op">
          <c/>
          <c>0</c>
          <c>1</c>
          <c>0</c>
        </box>
        <asmtemplate comment="InITBlock()"><text>MOV</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, LSL </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
        <asmtemplate comment="Outside IT block"><text>MOVS{</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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, LSL </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <encoding name="MOV_rr_T1_LSR" oneofinclass="4" oneof="8" label="Logical shift right" bitdiffs="op == 0011">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic-shift-type" value="MOV-lsr"/>
          <docvar key="shift-type" value="lsr"/>
          <docvar key="mnemonic" value="MOV"/>
        </docvars>
        <box hibit="9" width="4" name="op">
          <c/>
          <c>0</c>
          <c>1</c>
          <c>1</c>
        </box>
        <asmtemplate comment="InITBlock()"><text>MOV</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, LSR </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
        <asmtemplate comment="Outside IT block"><text>MOVS{</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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, LSR </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <encoding name="MOV_rr_T1_ROR" oneofinclass="4" oneof="8" label="Rotate right" bitdiffs="op == 0111">
        <docvars>
          <docvar key="armarmheading" value="T1"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic-shift-type" value="MOV-ror"/>
          <docvar key="shift-type" value="ror"/>
          <docvar key="mnemonic" value="MOV"/>
        </docvars>
        <box hibit="9" width="4" name="op">
          <c/>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <asmtemplate comment="InITBlock()"><text>MOV</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, ROR </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
        <asmtemplate comment="Outside IT block"><text>MOVS{</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 source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, </text><a hover="Is the general-purpose source register and the destination register, encoded in the &quot;Rdm&quot; field." link="Rdm">&lt;Rdm&gt;</a><text>, ROR </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="T32.n.dpint16_2l.MOV_rr_T1_ASR" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if ! op IN {'0010', '0011', '0100', '0111'} then See("Related encodings"); end;
let d : integer = UInt(Rdm);
let m : integer = UInt(Rdm);
let s : integer = UInt(Rs);
let setflags : boolean = !InITBlock();
let shift_t : <a link="SRType" file="shared_pseudocode.xml" hover="type SRType">SRType</a> = DecodeRegShift(op[2]::op[0]);</pstext></ps>
      </ps_section>
    </iclass>
    <iclass name="T2" oneof="3" id="iclass_t2" no_encodings="2" isa="T32">
      <docvars>
        <docvar key="armarmheading" value="T2"/>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="T32"/>
      </docvars>
      <iclassintro count="2"/>
      <regdiagram form="16x2" psname="T32.w.reg.shiftr.MOVS_rr_T2">
        <box hibit="31" width="9" settings="9">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="22" width="2" name="stype" usename="1">
          <c colspan="2"/>
        </box>
        <box hibit="20" width="1" name="S" usename="1">
          <c colspan="1"/>
        </box>
        <box hibit="19" width="4" name="Rm" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="15" width="4" settings="4">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="11" width="4" name="Rd" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="7" width="4" settings="4">
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="3" width="4" name="Rs" usename="1">
          <c colspan="4"/>
        </box>
      </regdiagram>
      <encoding name="MOVS_rr_T2" oneofinclass="2" oneof="8" label="Flag setting" bitdiffs="S == 1">
        <docvars>
          <docvar key="armarmheading" value="T2"/>
          <docvar key="cond-setting" value="s"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic" value="MOVS"/>
        </docvars>
        <box hibit="20" width="1" name="S">
          <c>1</c>
        </box>
        <asmtemplate><text>MOVS{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 general-purpose source register, encoded in the &quot;Rm&quot; field." link="Rm__2">&lt;Rm&gt;</a><text>, </text><a hover="Is the type of shift to be applied to the second source register, " link="shift_option__5">&lt;shift&gt;</a><text> </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
        <asmtemplate comment="Outside IT block, and &lt;Rd&gt;, &lt;Rm&gt;, &lt;shift&gt;, &lt;Rs&gt; can be represented in T1"><text>MOVS.W  </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 general-purpose source register, encoded in the &quot;Rm&quot; field." link="Rm__2">&lt;Rm&gt;</a><text>, </text><a hover="Is the type of shift to be applied to the second source register, " link="shift_option__5">&lt;shift&gt;</a><text> </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <encoding name="MOV_rr_T2" oneofinclass="2" oneof="8" label="Not flag setting" bitdiffs="S == 0">
        <docvars>
          <docvar key="armarmheading" value="T2"/>
          <docvar key="cond-setting" value="no-s"/>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="T32"/>
          <docvar key="mnemonic" value="MOV"/>
        </docvars>
        <box hibit="20" width="1" name="S">
          <c>0</c>
        </box>
        <asmtemplate><text>MOV{</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&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 general-purpose source register, encoded in the &quot;Rm&quot; field." link="Rm__2">&lt;Rm&gt;</a><text>, </text><a hover="Is the type of shift to be applied to the second source register, " link="shift_option__5">&lt;shift&gt;</a><text> </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
        <asmtemplate comment="Inside IT block, and &lt;Rd&gt;, &lt;Rm&gt;, &lt;shift&gt;, &lt;Rs&gt; can be represented in T1"><text>MOV</text><a hover="See x[Standard assembler syntax fields](Babbefhf)." link="cond__2">&lt;c&gt;</a><text>.W  </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 general-purpose source register, encoded in the &quot;Rm&quot; field." link="Rm__2">&lt;Rm&gt;</a><text>, </text><a hover="Is the type of shift to be applied to the second source register, " link="shift_option__5">&lt;shift&gt;</a><text> </text><a hover="Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the &quot;Rs&quot; field." link="Rs__2">&lt;Rs&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="T32.w.reg.shiftr.MOVS_rr_T2" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">let d : integer = UInt(Rd);
let m : integer = UInt(Rm);
let s : integer = UInt(Rs);
let setflags : boolean = (S == '1');
let shift_t : <a link="SRType" file="shared_pseudocode.xml" hover="type SRType">SRType</a> = DecodeRegShift(stype);
// Armv8-A removes UNPREDICTABLE for R13
if d == 15 || m == 15 || s == 15 then UnpredictableProcedure(); end;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="MOVS_rr_A1, MOV_rr_A1, MOV_rr_T1_ASR, MOV_rr_T1_LSL, MOV_rr_T1_LSR, MOV_rr_T1_ROR, MOVS_rr_T2, MOV_rr_T2, T2B_MOV_rr_T2" symboldefcount="1">
      <symbol link="cond__2">&lt;c&gt;</symbol>
      <account encodedin="cond">
        <intro>
          <para>See <xref linkend="Babbefhf">Standard assembler syntax fields</xref>.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOVS_rr_A1, MOV_rr_A1, MOV_rr_T1_ASR, T1B_MOV_rr_T1_ASR, MOV_rr_T1_LSL, T1B_MOV_rr_T1_LSL, MOV_rr_T1_LSR, T1B_MOV_rr_T1_LSR, MOV_rr_T1_ROR, T1B_MOV_rr_T1_ROR, MOVS_rr_T2, MOV_rr_T2" 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="MOVS_rr_A1, MOV_rr_A1, MOVS_rr_T2, T2B_MOVS_rr_T2, MOV_rr_T2, T2B_MOV_rr_T2" symboldefcount="1">
      <symbol link="Rd">&lt;Rd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the general-purpose destination register, encoded in the "Rd" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOVS_rr_A1, MOV_rr_A1, MOVS_rr_T2, T2B_MOVS_rr_T2, MOV_rr_T2, T2B_MOV_rr_T2" symboldefcount="1">
      <symbol link="Rm__2">&lt;Rm&gt;</symbol>
      <account encodedin="Rm">
        <intro>
          <para>Is the general-purpose source register, encoded in the "Rm" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOVS_rr_A1, MOV_rr_A1, MOVS_rr_T2, T2B_MOVS_rr_T2, MOV_rr_T2, T2B_MOV_rr_T2" symboldefcount="1">
      <symbol link="shift_option__5">&lt;shift&gt;</symbol>
      <definition encodedin="stype">
        <intro>Is the type of shift to be applied to the second source register, </intro>
        <table class="valuetable">
          <tgroup cols="2">
            <thead>
              <row>
                <entry class="bitfield">stype</entry>
                <entry class="symbol">&lt;shift&gt;</entry>
              </row>
            </thead>
            <tbody>
              <row>
                <entry class="bitfield">00</entry>
                <entry class="symbol">LSL</entry>
              </row>
              <row>
                <entry class="bitfield">01</entry>
                <entry class="symbol">LSR</entry>
              </row>
              <row>
                <entry class="bitfield">10</entry>
                <entry class="symbol">ASR</entry>
              </row>
              <row>
                <entry class="bitfield">11</entry>
                <entry class="symbol">ROR</entry>
              </row>
            </tbody>
          </tgroup>
        </table>
      </definition>
    </explanation>
    <explanation enclist="MOVS_rr_A1, MOV_rr_A1, MOV_rr_T1_ASR, T1B_MOV_rr_T1_ASR, MOV_rr_T1_LSL, T1B_MOV_rr_T1_LSL, MOV_rr_T1_LSR, T1B_MOV_rr_T1_LSR, MOV_rr_T1_ROR, T1B_MOV_rr_T1_ROR, MOVS_rr_T2, T2B_MOVS_rr_T2, MOV_rr_T2, T2B_MOV_rr_T2" symboldefcount="1">
      <symbol link="Rs__2">&lt;Rs&gt;</symbol>
      <account encodedin="Rs">
        <intro>
          <para>Is the general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the "Rs" field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="MOV_rr_T1_ASR, T1B_MOV_rr_T1_ASR, MOV_rr_T1_LSL, T1B_MOV_rr_T1_LSL, MOV_rr_T1_LSR, T1B_MOV_rr_T1_LSR, MOV_rr_T1_ROR, T1B_MOV_rr_T1_ROR" symboldefcount="1">
      <symbol link="Rdm">&lt;Rdm&gt;</symbol>
      <account encodedin="Rdm">
        <intro>
          <para>Is the general-purpose source register and the destination register, encoded in the "Rdm" field.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <aliastablehook anchor="aliasconditions">Alias Conditions</aliastablehook>
  <ps_section howmany="1">
    <ps name="A32.dp.dpregrs.logic3reg_regsh.MOVS_rr_A1" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">if ConditionPassed() then
    EncodingSpecificOperations();
    let shift_n : integer = UInt(R(s)[7:0]);
    let (result, carry) : (bits(32), bit) = Shift_C{32}(R(m), shift_t, shift_n, PSTATE.C);
    R(d) = result;
    if setflags then
        PSTATE.N = result[31];
        PSTATE.Z = IsZeroBit{32}(result);
        PSTATE.C = carry;
        // PSTATE.V unchanged
    end;
end;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
