本文介绍了在A64指令的结尾,感叹号是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于LDP和LDP的文档STP 给出了一个示例指令,最后带有感叹号:

The documentation for LDP and STP gives an example instruction with an exclamation mark in the end:

LDP X8, X2, [X0, #0x10]!

有关移植的文档A64中的A32 PUSH/POP 指令给出了以下示例:

Also the documentation about porting A32 PUSH/POP instructions into A64 gives the following examples:

PUSH {r0-r1} ---> STP X0, X1, [SP, #-16]!
POP {r0-r1}  ---> LDP X0, X1, [SP], #16

这两个页​​面均未解释说明末尾的感叹号的含义.是什么?

Neither of the pages explains what the exclamation mark in the end of the instructions means. What does it?

推荐答案

!表示寄存器回写":基址寄存器用于计算传输地址,而已更新.

The ! means "Register write-back": the base register is used to calculate the address of the transfer, and is updated.

在您的示例中:

LDP X8, X2, [X0, #0x10]!

X0进行了修改,以便在操作之后:

X0 modified so that after the operation:

X0 = X0 + 0x10

如果不放置!,则操作不会修改X0.

If you do not put the !, X0 is not modified by the operation.

在有关PUSH/POP的第二个示例中,不同之处在于完成增量的时间:

On the second example concerning PUSH/POP, the difference is when the increment is done:

STP X0, X1, [SP, #-16]!存储在地址SP-16中,并且SP以相同的方式递减

STP X0, X1, [SP, #-16]! stores at address SP-16, and SP is decremented in the same way

LDP X0, X1, [SP], #16从地址SP加载,执行传输后,将SP+16存储到SP.

LDP X0, X1, [SP], #16 loads from address SP, and after the transfer is performed, stores SP+16 to SP.

这篇关于在A64指令的结尾,感叹号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 09:36