List Info

Thread: Re: 64-bit ndisasm; bug in 64-bit assembly




Re: 64-bit ndisasm; bug in 64-bit assembly
country flaguser name
United States
2007-04-16 18:03:40
> spookdynatos.net wrote:
>>> Very cool.  While working on the disassembler,
I've found a whole lot
>>> of
>>> 321's in insns.dat which should be 324.  At
some point we need to
>>> look
>>> through it line by line and make sure we have
the proper annotations.
>>
>> I would hold-off on that, or at least double-check
things. Your
>> application of 324 to "MOV      
mem_offs,reg_rax    3003241xA344
>>          X64,SM" in insns.dat broke it. It is
naturally a 64-bit
>> instruction and does not require a REX prefix
except on extension. What
>> the docs fail to state that is "mov
eax,[mem_offs]" is not really
>> possible
>> in long mode. 0x66 drops it down to "mov
al,[mem_offs]" and 0x67 turns
>> it
>> into mem_offs32.
>
> What you state above disagrees both with the
documentation and with what
> gas does.
>
> Just to make sure, I wrote a test program, and gas, and
the
> documentation is correct; as is the use of the 324
prefix.
>
> The *address size* is natively 64 bit, but 324 refers
to the *operand
> size*.
>
> Sorry, but the gas, the docs, and the CPU (Intel Core 2
Xeon) agree:
>
> 	A2 	-> stores AL
> 	66 A3	-> stores AX
> 	A3	-> stores EAX
> 	48 A3	-> stores RAX
>
> ... and the equivalent for the load instructions,
obviously.
>
> 	-hpa
>
>

Yes, check a few e-mails back, I conceded and figured out as
to why I came
out with that incorrect result 

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )