Inline assembler in D and LDC, round 2
Don
nospam at nospam.com
Fri Feb 6 02:45:03 PST 2009
Walter Bright wrote:
> Frits van Bommel wrote:
>> His approach depends on DMD directly emitting x86 machine code, so it
>> can just emit 'RET' and be done with it.
>>
>> LDC on the other hand needs to emit LLVM asm, which requires it to
>> specify an explicit return value. My approach is a way to extract that
>> return value from the inline asm, allowing it to emulate DMD behavior
>> within the LLVM IR.
>
> Ok, so why not, for a function that returns an int, simply have the
> compiler silently tack on the LLVM equivalent of "return EAX"?
I've created bugzilla 2648 for one of the issues -- struct returns are a
particular nuisance. (I think you may encounter this on DMD-Mac).
More information about the Digitalmars-d
mailing list