what is the order of source operands in AT&T syntax compared to Intel syntax?

前端 未结 1 773
猫巷女王i
猫巷女王i 2020-11-29 12:15

The Intel ISA reference documentation for this instruction is clear:

VPBLENDVB xmm1, xmm2, xmm3/m128, xmm4

Select byte value

相关标签:
1条回答
  • 2020-11-29 13:22

    Assembling (note GAS uses % instead of $ to denote registers) the following:

    vpblendvb %xmm4, %xmm3, %xmm2, %xmm1
    

    with the GNU assembler (version 2.21.0.20110327 on x86_64 2.6.38 linux) and then disassembling yields:

    $ objdump -d a.out
        0:    c4 e3 69 4c cb 40     vpblendvb %xmm4,%xmm3,%xmm2,%xmm1
    

    in intel syntax (as the manual shows):

    $ objdump -d -M intel a.out
        0:    c4 e3 69 4c cb 40     vpblendvb xmm1,xmm2,xmm3,xmm4
    

    So it looks like the order of all the arguments is reversed.

    0 讨论(0)
提交回复
热议问题