Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 688 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is the order of source operands in AT&T syntax compared to Intel syntax?

#1
The Intel ISA reference documentation for this instruction is clear:

VPBLENDVB xmm1, xmm2, xmm3/m128, xmm4

>Select byte values from `xmm2` and `xmm3/m128` using mask bits in the specified mask register, `xmm4`, and store the values into `xmm1`.

>`xmm1` is the destination, `xmm2/3/4` are source operands

So what does this become using AT&T syntax? We know that the destination register must be last, but what is the order of source operands?

vpblendvb $xmm2, $xmm3, $xmm4, $xmm1

or

vpblendvb $xmm4, $xmm3, $xmm2, $xmm1

or something else?
Reply

#2
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.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through