Subtract (register-shifted register) subtracts a register-shifted register value from a register value, and writes the result to the destination register. It can optionally update the condition flags based on the result.
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 |
!= 1111 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | S | Rn | Rd | Rs | 0 | type | 1 | Rm | ||||||||||||||||
cond |
d = UInt(Rd); n = UInt(Rn); m = UInt(Rm); s = UInt(Rs); setflags = (S == '1'); shift_t = DecodeRegShift(type); if d == 15 || n == 15 || m == 15 || s == 15 then UNPREDICTABLE;
For more information about the constrained unpredictable behavior of this instruction, see Architectural Constraints on UNPREDICTABLE behaviors.
<c> |
<q> |
<Rd> |
Is the general-purpose destination register, encoded in the "Rd" field. |
<Rn> |
Is the first general-purpose source register, encoded in the "Rn" field. |
<Rm> |
Is the second general-purpose source register, encoded in the "Rm" field. |
<type> |
Is the type of shift to be applied to the second source register,
encoded in
type:
|
<Rs> |
Is the third general-purpose source register holding a shift amount in its bottom 8 bits, encoded in the "Rs" field. |
if ConditionPassed() then EncodingSpecificOperations(); shift_n = UInt(R[s]<7:0>); shifted = Shift(R[m], shift_t, shift_n, PSTATE.C); (result, nzcv) = AddWithCarry(R[n], NOT(shifted), '1'); R[d] = result; if setflags then PSTATE.<N,Z,C,V> = nzcv;
Internal version only: isa v00_79, pseudocode v34.2 ; Build timestamp: 2017-12-19T15:42
Copyright © 2010-2017 ARM Limited or its affiliates. All rights reserved. This document is Non-Confidential.