NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on August 14, 2007, 06:16:30 AM

Title: Invalid Effective Address :: NASM :: Win64
Post by: nobody on August 14, 2007, 06:16:30 AM
Hi Friends

I got the current CVS code downloaded from http://mysite.verizon.net/fbkotler/nasm-0.99.02-20070605.tar.bz2 (http://mysite.verizon.net/fbkotler/nasm-0.99.02-20070605.tar.bz2) provided by Frank. And I build it using Visual Studio 2005 / nmake/ for Windows 64-bit. Its working fine for me.

But I'm stuck with a section of assembly code where its giving "INVALID EFFECTIVE ADDRESS".
I do not understand the assembly code error there. Plz guide me where it is wrong.
======================================================
movapd xmm0, [rsi + r12*8]
---------------
movapd xmm2, [rsi + r12*8 + 16]
---------------
movapd xmm4, [rsi + r12*8]
---------------
movapd xmm6, [rsi + r12*8 + 16]
=======================================================

I'm using the command from Windows 2003 Server SP1 R2 console (command window) like: nasmw.exe -f win64 *.s
And the above code are distributed lines inside the whole code. Can you help me for the above error in these lines ?
These lines are working perfectly in Linux/gcc as they follow AMD64 ABI, but Windows does not follow the same specification and used its own Windows 64-bit ABI.

Any pointer to this error ?

Thank you in adv.
Title: Re: Invalid Effective Address :: NASM :: Win64
Post by: nobody on August 16, 2007, 05:45:24 AM
No replies :(
Title: Re: Invalid Effective Address :: NASM :: Win64
Post by: nobody on August 16, 2007, 06:13:45 AM
Sorry. I didn't know quite what to tell you. 0.99.xx is "broken". I'm glad to hear you got it to build. We'll see if we can make that less of a challenge. But having done that, it really doesn't work right - for either 64 or 32 bit code. My latest testfile yields "panic: intra-segment OUT_REL4ADR" from some perfectly ordinary 32-bit code. I haven't the slightest idea how to fix it. It's "languishing" at the moment... :(

Best,
Frank
Title: Re: Invalid Effective Address :: NASM :: Win64
Post by: Keith Kanios on August 17, 2007, 02:45:35 AM
It is indeed a problem. Good news, is that I *seemingly* recently resolved the MMX output issues, so I can try to tackle this one.

Other 64-bit assemblers confirm that those instructions do work. The 32-bit GPR versions of those XMM instructions work as well. So I will definitely look into the problem.