Subtract pointer, setting flags
This instruction subtracts the 56-bit address held in the second source register from the 56-bit address held in the first source register, sign-extends the result to 64 bits, and writes the result to the destination register. It updates the condition flags based on the result of the subtraction.
Variants: FEAT_MTE (ARMv8.5)
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 |
1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||
sf | S | Rm | opcode | Rn | Rd |
---|
if !IsFeatureImplemented(FEAT_MTE) then EndOfDecode(Decode_UNDEF); constant integer d = UInt(Rd); constant integer n = UInt(Rn); constant integer m = UInt(Rm);
bits(64) operand1 = if n == 31 then SP[64] else X[n, 64]; bits(64) operand2 = if m == 31 then SP[64] else X[m, 64]; operand1 = SignExtend(operand1<55:0>, 64); operand2 = NOT(SignExtend(operand2<55:0>, 64)); bits(64) result; bits(4) nzcv; (result, nzcv) = AddWithCarry(operand1, operand2, '1'); X[d, 64] = result; PSTATE.= nzcv;