List Info

Thread: Re: Test of some addressing modes in 64-bit mode.




Re: Test of some addressing modes in 64-bit mode.
user name
2007-10-29 15:21:11
> > > +       mov     eax,[byte rsp+0xFF]
> > > +       mov     eax,[byte rsp-0xFF]
> >
> > Since the displacement byte is sign-extended
> > these two should at least warn (if not fail).
>
> As indeed they do:
>
> test.asm:35: warning: signed byte value exceeds bounds
> test.asm:36: warning: signed byte value exceeds bounds

Not for me:

>cat z.asm
bits 64
mov eax,[byte rsp+0xFF]
mov eax,[byte rsp-0xFF]

>./nasm -v
NASM version 0.99.05 compiled on Oct 29 2007

>./nasm z.asm -l z.lst

>cat z.lst
     1                                  bits 64
     2 00000000 8B4424FF                mov eax,[byte
rsp+0xFF]
     3 00000004 8B442401                mov eax,[byte
rsp-0xFF]

Mmh. Odd.

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

Re: Test of some addressing modes in 64-bit mode.
user name
2007-10-29 16:23:16
On Mon, 29 Oct 2007 13:21:11 -0700
"anonymous coward" <nasm64developerusers.sourceforge.net> wrote:

> Not for me:

Sorry, I read your message too quickly.

	xor	eax, byte 0xFF
	and	edx, byte 0xFF

warn, but

mov eax,[byte rsp+0xFF]
mov eax,[byte rsp-0xFF]

do not.

-- Chuck

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and
a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nasm-devel mailing list
Nasm-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nasm-devel

[1-2]

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