www.digitalmars.com         C & C++   DMDScript  

D.gnu - 64-bit Registers?

reply Jonathan Crapuchettes <jcrapuchettes gmail.com> writes:
What would it take to get 64-bit registers like RAX, RBX, RCX, ... defined as 
identifiers?
Thanks,
JC
Aug 25 2010
parent Iain Buclaw <ibuclaw ubuntu.com> writes:
== Quote from Jonathan Crapuchettes (jcrapuchettes gmail.com)'s article
 What would it take to get 64-bit registers like RAX, RBX, RCX, ... defined as
 identifiers?
 Thanks,
 JC

The proper way would be rolling up an x86_64 version of d-asm-i386.h, conditionally including the header in asmstmt.cc, and adding the D_Inline_AsmX86_64 predicate to d-lang.cc - you can see LDC for that. The quick hacky way would just be to add them to d-asm-i386.h, you should be able to see where, it's the first two items at the top of the file. Regards
Aug 26 2010