This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ENTER/BOUND operands order.

Hello everyone,

AT&T dialect says, that every instruction has opposite order of destination 
and source operands in comparison to the Intel syntax. So in fact, all 
operands are just inverted. Recently, I found out that there are at last two 
instructions (bound and enter) which seem not to follow the rule. Following 
example shows how they are currently encoded in GAS/Intel assembler:

INTEL: 62 30     bound esi,[eax]
GAS:   62 30     bound %esi,(%eax)

INTEL: c8 ee ff 01    enter 0ffeeh,01h
GAS:   c8 ee ff 01    enter $0xffee,$0x1
       c8 ee ff 55    enter $0xffee,$0x55
As you can see, both of these instructions have the same order of the 
operands. At first, I though that the fact that they do not have destination 
operand might be the case, but there are other similar instructions like 
"maskmovdqu" that follows the rule, so it looks like inconsistency. I 
haven't found any logical explanation yet, so I would be really grateful
for any information about this issue. Maybe this is expected behaviour (just 
an exception), or maybe a kind of historical reason?

Thanks in advance.

Slawomir Wojtasiak
slawomir *DOT* wojtasiak *AT* swkso[remove me]ftware *DOT* pl

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]