Inline assembler in D and LDC, round 2
Lionello Lunesu
lionello at lunesu.remove.com
Thu Feb 5 18:38:28 PST 2009
"Frits van Bommel" <fvbommel at REMwOVExCAPSs.nl> wrote in message
news:gmeqbr$1377$1 at digitalmars.com...
> 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.
Sorry, perhaps I'm missing something: Why should you have to deduct that
from the asm? Doesn't the function prototype give enough information? If the
function returns "int/uint/...", assume "eax"; if it returns
"float/double/..." assume "st(0)", etc....
L.
More information about the Digitalmars-d
mailing list