为什么这个 PowerPC 指令序列似乎同时设置了 cr0 和 cr1?
Why does this PowerPC instruction sequence appear to be setting both cr0 and cr1?
在大端 POWER7 上执行以下一组 PowerPC 指令时,为什么寄存器 r6 == 0b100010000000000000000000000000000?
是否有来自cmpd
的隐式条件测试?
li r3, 420
li r4, 360
cmpd r3, r4
mfocrf r6, 0x80
我应该仔细阅读。
来自 Power ISA V2.07B:
The POWER4, POWER5, POWER7 and POWER8
processors set to 0's all bytes of register RT other
than the byte that contains the specified CR field. In
the byte that contains the CR field, bits other than
those containing the CR field may or may not be
set to 0s.
所以这种行为在我使用的机器上是正常的。
在大端 POWER7 上执行以下一组 PowerPC 指令时,为什么寄存器 r6 == 0b100010000000000000000000000000000?
是否有来自cmpd
的隐式条件测试?
li r3, 420
li r4, 360
cmpd r3, r4
mfocrf r6, 0x80
我应该仔细阅读。
来自 Power ISA V2.07B:
The POWER4, POWER5, POWER7 and POWER8 processors set to 0's all bytes of register RT other than the byte that contains the specified CR field. In the byte that contains the CR field, bits other than those containing the CR field may or may not be set to 0s.
所以这种行为在我使用的机器上是正常的。