assembly - ARMV8指令集的CSET指令

标签 assembly arm arm64

ARM架构的CSET指令是如何工作的?比较标准条件检查哪些寄存器?请帮忙。

最佳答案

ARMv8 ISA :

CSET Wd, cond

Conditional Set: Wd = if cond then 1 else 0.


这意味着指令执行条件设置指令。什么是条件设置指令?

Conditional set: conditionally select between 0 and 1 or -1, for example to materialize the condition flags as a Boolean value or mask in a general register.


您可以将其转换为简单的三元运算:Wd = cond ? 1 : 0 .所以,如果 condtrue , Wd = 1 .否则,Wd = 0 .
什么是条件?

cond - A standard ARM condition EQ, NE, CS|HS, CC|LO, MI, PL, VS, VC, HI, LS, GE, LT, GT, LE, AL or NV with the same meanings as in AArch32. Note that although AL and NV represent different encodings, as in AArch32 they are both interpreted as the “always true” condition. Unless stated AArch64 instructions do not set or use the condition flags, but those that do set all of the condition flags. If used in a pseudo-code expression this symbol represents a Boolean whose value is the truth of the specified condition test.

关于assembly - ARMV8指令集的CSET指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31822662/

相关文章:

macos - 为什么我的 x86 链表函数会抛出段错误?

arm - 如何使用aarch64-linux-gnu-objdump反汇编V7模式指令(A32,T32)

assembly - 什么是处理器提示?

assembly - ia32/ia64上的ADC和ADCX指令之间有什么区别?

assembly - Linux x86 64 中 MSR_GS_BASE 的详细信息

c - 需要使用C将int转换为字符串

assembly - objdump 和 ARM 与 Thumb

我可以用吗 。作为 gnu c 结构中的成员限定符

android - arm64和aarch64的区别

assembly - GAS aarch64 语法获取 .ascii 字符串长度