多个PowerPC指令具有相同的操作码

时间:2012-09-29 17:46:24

标签: assembly disassembly powerpc

我正在尝试理解PowerPC指令并最终对它们进行反汇编。我发现http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=/com.ibm.aix.aixassem/doc/alangref/ppc_instr.htm已经让我很困惑 - addic和si有相同的操作码吗?

2 个答案:

答案 0 :(得分:1)

他们是同一条指令。区别在于汇编程序在si的情况下改变了你提供的立即符号。

答案 1 :(得分:1)

显然,这是汇编程序中的某种语法糖。它们都执行添加,但si使用负数执行:

The si instruction subtracts the 16-bit signed integer specified by the
SINT parameter from the contents of general-purpose register (GPR) RA and
stores the result in the target GPR RT. This instruction has the same
effect as the ai instruction used with a negative SINT value. The
assembler negates SINT and places this value (SI) in the machine
instruction:

    ai RT,RA,-SINT

来源:si (Subtract Immediate) Instruction