LLVM asm with constraints, and 2 operands

Guillaume Piolat first.name at domain.tld
Sun Jul 18 19:24:52 UTC 2021


On Sunday, 18 July 2021 at 18:48:47 UTC, Basile B. wrote:
> On Sunday, 18 July 2021 at 18:47:50 UTC, Basile B. wrote:
>> On Sunday, 18 July 2021 at 17:45:05 UTC, Guillaume Piolat 
>> wrote:
>>> On Sunday, 18 July 2021 at 16:32:46 UTC, Basile B. wrote:
>>>> [...]
>>>
>>> Thanks.
>>>
>>> Indeed that seems to work even when inline and optimized. 
>>> Registers are spilled to stack.
>>> A minor concern is what happens when the enclosing function 
>>> is extern(C) => https://d.godbolt.org/z/s6dM3a3de
>>> I need to check that more...
>>
>> I think this should be rejected just like when you use D 
>> arrays in the interface of an `extern(C)` func, as C has no 
>> equivalent of __vector (afaik).
>
> but in any case there's a bug.

I checked and thankfullyit works when the enclosed function is 
inlined in an extern(C) function, that respects extern(C) ABI.


More information about the Digitalmars-d-learn mailing list