欢迎添加微信(coding_the_world),进ARM/SOC/芯片/Trustzone/TEE/安全交流群。知识领域:安全/虚拟化/SOC/armv8/armv9/mmu/cache/gic/中断/TEE/optee/Trustzone/ATF/CCA...

Pulpit rock
SUBPS

Subtract Pointer, setting Flags 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.

Integer
(FEAT_MTE)

313029282726252423222120191817161514131211109876543210
10111010110Xm000000XnXd

SUBPS <Xd>, <Xn|SP>, <Xm|SP>

if !HaveMTEExt() then UNDEFINED; integer d = UInt(Xd); integer n = UInt(Xn); integer m = UInt(Xm); boolean setflags = TRUE;

Assembler Symbols

<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

AliasIs preferred when
CMPPS == '1' && Xd == '11111'

Operation

bits(64) operand1 = if n == 31 then SP[] else X[n]; bits(64) operand2 = if m == 31 then SP[] else X[m]; operand1 = SignExtend(operand1<55:0>, 64); operand2 = SignExtend(operand2<55:0>, 64); bits(64) result; bits(4) nzcv; operand2 = NOT(operand2); (result, nzcv) = AddWithCarry(operand1, operand2, '1'); if setflags then PSTATE.<N,Z,C,V> = nzcv; X[d] = result;


Internal version only: isa v33.11seprel, AdvSIMD v29.05, pseudocode v2021-09_rel, sve v2021-09_rc3d ; Build timestamp: 2021-10-06T11:41

Copyright © 2010-2021 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.