Well, I've jumped on the NASM Development Team and my first task is complete... fixing the previously broken Website. Check out the "related links" section :P

I thought this might be interesting to those NASM users out there who might have lost hope for a 64-bit version of NASM 8)

In the meantime, I will continue to contribute to NASM when I can. Back to work :)
Posted on 2007-03-14 05:56:21 by SpooK
Awesome mate, good to see the NASM main page is back up.
Posted on 2007-03-14 13:26:55 by Synfire

Try writing a quick translation of OA's MemAlloc macro, with buildtime switch for Target Platform.
This little nugget is at the heart of OA's runtime object instancing.

Posted on 2007-03-15 04:42:05 by Homer
As of March 15th, 2007:

Completed Tasks

  • Implemented support for the use64/ section.

  • Updated all general flags and added the "X64" instruction-set flag.

  • Modified the MMX flag to be "higher" so that "REG64" could take it's position.



Current Tasks

  • Fully implementing the REX prefix.

  • Playing around inside assemble.c and revamping it to support 64-bit.



Future Tasks

  • Update insns.dat with the x64 instruction-set.

  • 64-bit object/output files.


Posted on 2007-03-15 12:03:03 by SpooK
how are you going to implement addressing modes? RIP-relative by default? do you plan to support absolute addressing? support EIP-relative addressing?

PS: little hint (c) by Tomasz Grysztar:
xchg eax, eax can no longer be assembled to 90h in 64bit code, you must use longer form
Posted on 2007-03-15 13:09:38 by vid

how are you going to implement addressing modes? RIP-relative by default? do you plan to support absolute addressing? support EIP-relative addressing?


I think it would be wise to stick to the constraints of the design. That being native 64-bit addressing and using 0x67 to indicate 32-bit addressing. The user can over-ride this at any time by simply using "DWORD" or one of the 32-bit GPRs. Between those two, in most cases, only one prefix is needed anyhow. No concern about efficiency there ;)


PS: little hint (c) by Tomasz Grysztar:
xchg eax, eax can no longer be assembled to 90h in 64bit code, you must use longer form


That is not much of a little hint, that is commonly known to anyone who has read the processor manual. This also goes for the SIB when it comes to R12/R13 as it was with BP/EBP and now RBP, the lack of INC/DEC, etc...
Posted on 2007-03-15 21:24:56 by SpooK


how are you going to implement addressing modes? RIP-relative by default? do you plan to support absolute addressing? support EIP-relative addressing?

I think it would be wise to stick to the constraints of the design. That being native 64-bit addressing and using 0x67 to indicate 32-bit addressing. The user can over-ride this at any time by simply using "DWORD" or one of the 32-bit GPRs. Between those two, in most cases, only one prefix is needed anyhow. No concern about efficiency there ;)

so then, how are you going to differentiate between RIP-relative and absolute addressing?
i mean: mov eax, can be encoded as either RIP-relative rip-$+num, or absolute (if num is range). I believe you choose RIP relative by default. So what will be syntax for absolute addressing?



That is not much of a little hint, that is commonly known to anyone who has read the processor manual. This also goes for the SIB when it comes to R12/R13 as it was with BP/EBP and now RBP, the lack of INC/DEC, etc...

few ASM authors who were previously implementing 64bit set forgot to fix this, so i just warned you ;)
Posted on 2007-03-16 06:11:52 by vid

so then, how are you going to differentiate between RIP-relative and absolute addressing?
i mean: mov eax, can be encoded as either RIP-relative rip-$+num, or absolute (if num is range). I believe you choose RIP relative by default. So what will be syntax for absolute addressing?


That decision is up to the project administrators of NASM, I am merely revamping the source code to accept such primitives.
Posted on 2007-03-16 06:35:02 by SpooK
As of March 25th, 2007:

Completed Tasks

  • Implemented support for the use64/ section.

  • Updated all general flags and added the "X64" instruction-set flag.

  • Modified the MMX flag to be "higher" so that "REG64" could take it's position.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.



Current Tasks

  • Retrofitting assemble.c->process_ea() for new x64 support.



Future Tasks

  • Finish updating insns.dat with the x64 instruction-set.

  • 64-bit object/output files.


Posted on 2007-03-25 13:32:00 by SpooK
NASM 64-bit Support Status as of March 27th, 2007:

Completed Tasks

  • Implemented support for the use64/ segment/section.

  • Updated all general flags and added the "x64" instruction-set flag.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.

  • Modified all pertaining source files to account for all the new registers.

  • REX prefix processing in assembly and size calculations (i.e. both passes.)

  • Effective Address calculation for Register and Direct memory references.



Current Tasks

  • Effective Address calculation for Indirect memory references.



Future Tasks

  • Finish updating insns.dat with the entire x64 instruction-set.

  • 64-bit object/output files.



Summary: At this rate, I should be ready to do some flat binary tests by this upcoming weekend.
Posted on 2007-03-27 18:46:44 by SpooK
Good work  :thumbsup:
Posted on 2007-03-28 00:37:45 by Homer
NASM 64-bit Support Status as of April 3rd, 2007:

Completed Tasks

  • Implemented support for the use64/ segment/section.

  • Updated all general flags and added the "x64" instruction-set flag.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.

  • Modified all pertaining source files to account for all the new registers.

  • REX prefix processing in assembly and size calculations (i.e. both passes.)

  • Effective Address calculation (non RIP-relative).

  • QWORD sizing.



Current Tasks

  • Updating insns.dat with the entire x64 instruction-set.



Future Tasks

  • 64-bit object/output files.

  • RIP-relative addressing support.

  • More tests and bug fixing.



Summary: Flat Binary tests were successful and completely correct for the instructions implemented thus far. Currently updating the instruction set.
Posted on 2007-04-03 09:51:12 by SpooK
NASM 64-bit Support Status as of April 4th, 2007:

Completed Tasks

  • Implemented support for the use64/ segment/section.

  • Updated all general flags and added the "x64" instruction-set flag.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.

  • Modified all pertaining source files to account for all the new registers.

  • REX prefix processing in assembly and size calculations (i.e. both passes.)

  • Effective Address calculation (non RIP-relative).

  • QWORD sizing.

  • x64 versions of basic instructions added.

  • Initial x86-64 COFF (win64) output.



Current Tasks

  • RIP-relative addressing support.

  • x86-64 COFF (win64) output refinement.

  • Updating insns.dat with the entire x64 instruction set.



Future Tasks

  • 64-bit object/output files.

  • More tests and bug fixing.



Summary: Well... a picture is worth a thousand words... http://nasm.sourceforge.net/latest.png
Posted on 2007-04-04 22:18:22 by SpooK
NASM 64-bit Support Status as of April 5th, 2007:

Completed Tasks

  • Implemented support for the use64/ segment/section.

  • Updated all general flags and added the "x64" instruction-set flag.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.

  • Modified all pertaining source files to account for all the new registers.

  • REX prefix processing in assembly and size calculations (i.e. both passes.)

  • Effective Address calculation.

  • QWORD sizing.

  • x64 versions of basic instructions added.

  • RIP-relative addressing support.

  • x86-64 COFF (win64) output format.



Current Tasks

  • Updating insns.dat with the entire x64 instruction set.



Future Tasks

  • 64-bit object/output files.

  • More tests and bug fixing.



Summary: Added RIP-relative support, confirmed working in Flat Binary and win64 output formats. Finished revamping the win64 COFF output format. Now is just the long haul of updating the entire instruction set. I will shoot for full AMD64 instruction set compliance, initially.
Posted on 2007-04-05 17:47:38 by SpooK
NASM 64-bit Support Status as of April 8th, 2007:

Completed Tasks

  • Implemented support for the use64/ segment/section.

  • Updated all general flags and added the "x64" instruction-set flag.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.

  • Modified all pertaining source files to account for all the new registers.

  • REX prefix processing in assembly and size calculations (i.e. both passes.)

  • Effective Address calculation.

  • QWORD sizing.

  • x64 versions of basic instructions added.

  • RIP-relative addressing support.

  • x86-64 COFF (win64) output format.

  • Added "__BITS__" standard macro.



Current Tasks

  • Updating insns.dat with the entire x64 instruction set.



Future Tasks

  • 64-bit object/output files.

  • More tests and bug fixing.

  • Documentation overhaul.



Summary: I've been more busy, yesterday and today as well, with family affairs so I haven't done anything significant for NASM development. What I did manage to get done, at the excellent suggestion of Bryant Keller, is the implementation of the "__BITS__" standard macro (like __FILE__ and __LINE__) which gives the current "" mode. This is pretty useful for anyone who gets deep down into mode-dependent macro use. I should be able to get a bit more done tomorrow.
Posted on 2007-04-08 10:48:36 by SpooK
NASM 64-bit Support Status as of April 9th, 2007:

Completed Tasks

  • Implemented support for the use64/ segment/section.

  • Updated all general flags and added the "x64" instruction-set flag.

  • Added "LONG" and "NOLONG" instruction flags, which will minimize the amount of code that needs to be re-written... greatly.

  • Modified all pertaining source files to account for all the new registers.

  • REX prefix processing in assembly and size calculations (i.e. both passes.)

  • Effective Address calculation.

  • QWORD sizing.

  • x64 versions of basic instructions added.

  • RIP-relative addressing support.

  • x86-64 COFF (win64) output format.

  • Added "__BITS__" standard macro.

  • Added 64-bit support for the RDOFF/2 output format.



Current Tasks

  • Updating insns.dat with the entire x64 instruction set.



Future Tasks

  • 64-bit object/output files.

  • More tests and bug fixing.

  • Documentation overhaul.



Summary: Still busy with my life in the real world. I managed to add support for 64-bit addresses in the RDOFF and RDOFF2 modules.
Posted on 2007-04-10 00:39:00 by SpooK