SUBPS
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.
This instruction is used by the alias
CMPP
S == '1' && Xd == '11111'
See
below for details of when the alias is preferred.
1
0
1
1
1
0
1
0
1
1
0
0
0
0
0
0
0
SUBPS <Xd>, <Xn|SP>, <Xm|SP>
if !IsFeatureImplemented(FEAT_MTE) then UNDEFINED;
constant integer d = UInt(Xd);
constant integer n = UInt(Xn);
constant integer m = UInt(Xm);
<Xd>
Is the 64-bit name of the general-purpose destination register, encoded in the "Xd" field.
<Xn|SP>
Is the 64-bit name of the first source general-purpose register or stack pointer, encoded in the "Xn" field.
<Xm|SP>
Is the 64-bit name of the second general-purpose source register or stack pointer, encoded in the "Xm" field.
Alias Conditions
bits(64) operand1 = if n == 31 then SP[] else X[n, 64];
bits(64) operand2 = if m == 31 then SP[] 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.<N,Z,C,V> = nzcv;