Translating inline ASM from C++
Etienne Cimon via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Oct 15 18:36:38 PDT 2014
On 2014-10-15 19:47, Etienne Cimon wrote:
> The D syntax for inline assembly is Intel style, whereas the GCC syntax
> is AT&T style. This guide seems to show exactly how to translate from
> C++ to D.
I'm posting this research for anyone searching the forums for a solution.
I found a better guide to D assembly on the digitalmars website:
http://www.digitalmars.com/ctg/ctgInlineAsm.html
This says it emulates Borland Turbo Assembly. Here's a manual I found:
http://www.csn.ul.ie/~darkstar/assembler/manual/
Chapter 6 is the most interesting:
http://www.csn.ul.ie/~darkstar/assembler/manual/a06a.txt
Also, this works in DMD but also compatible with LDC and GDC, they all
support the D inline assembler syntax for x86 and x86_64 :
https://github.com/ldc-developers/ldc/blob/master/gen/asm-x86.h
More information about the Digitalmars-d-learn
mailing list