On 14 December 2013 04:08, Walter Bright <newshou...@digitalmars.com> wrote: > On 12/13/2013 11:07 AM, David Nadlinger wrote: >> >> LDC in fact implements DMD-style inline assembly (occasionally there are >> bugs, >> though, as it's a complete reimplementation). > > > Thank you! That's awesome! >
The implementation of which existed in GDC first, and was released as dual GPL/BSD license to allow into LDC devs to use and improve (they added 64bit assembler support for instance, years before DMD got 64bit support), and then subsequently dropped from GDC for a number of valid reasons: 1) Transition towards making a platform/target agnostic frontend implementation. 2) Don't and will never implement the DMD-style calling convention, so all inline assembly in druntime and phobos actually doesn't work with GDC - there's actually a bug report about GDC incorrectly pre-defining D_InlineAsm and friends because of this. 3) It is a really big WAT on having two conflicting styles, one for x86, another for everything else. 4) This and other x86 hacks were a problem with code reviewers from GCC. Though saying that, whilst DMD-style was not ideal, neither is GDC-style either, as it requires parser changes, and adds a new class to handle them in the frontend.