LLVM asm with constraints, and 2 operands

Basile B. b2.temp at gmx.com
Mon Jul 19 11:39:02 UTC 2021


On Monday, 19 July 2021 at 10:21:58 UTC, kinke wrote:
> On Sunday, 18 July 2021 at 16:32:46 UTC, Basile B. wrote:
>> - **=x** says "returns in whatever is has to"
>> - **x** (1) is the constraint for input `a`, which is passed 
>> as operand **$0**
>> - **x** (2) is the constraint for input `b`, which is passed 
>> as operand **$1**
>
> $0 is actually the output operand, $1 is `a`, and $2 is `b`.
> [...]
> Note: inline asm syntax and resulting asm in AT&T syntax, *not* 
> Intel syntax.

yeah thnaks for the precision, I totally forgot about that.

And what about the `extern(C)` issue ? Does it make sense to be 
used when the parameters are int4 ?


More information about the Digitalmars-d-learn mailing list