llvm 3.6 and x86 (32-bit) varargs bad stack adjust
Kai Nacke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Wed Jul 15 00:02:44 PDT 2015
On Wednesday, 15 July 2015 at 06:32:32 UTC, Dan Olson wrote:
> "Kai Nacke" <kai at redstar.de> writes:
>
>> On Monday, 13 July 2015 at 17:04:55 UTC, Dan Olson wrote:
>>> "Kai Nacke" <kai at redstar.de> writes:
>>>>
>>>> There is no ldc issue yet. Did you check with LLVM 3.7? If
>>>> we can produce a LLVM bug report then we could try to set
>>>> this as a release blocker. Branching for the 3.7 release is
>>>> tomorrow.
>>>
>>> No, I have not tried 3.7 and I won't have time for a couple
>>> days.
>>>
>>> I don't understand the history of why LDC uses X86_StdCall
>>> for Posix. It says in LLVM docs that it is mostly used by
>>> Win32. Perhaps it is not well tested outside Windows. I
>>> don't think this new Issue is a problem on Windows.
>>
>> stdcall conventions does not support variadic arguments. Or am
>> I wrong?
>>
>> Regards,
>> Kai
>
> Yeah, I read that too. That is why I was curious about the
> history of using X86_StdCall. Didn't D-style variadics changed
> in 0.15.2 from a pointer to varags to a true variadic call.
> Could that be related? I decided to start looks at diffs in
> LLVM source from 3.5 to 3.6 to see what might have happened
> there too. Maybe LDC is just using X86_StdCall in a "non-Std"
> way.
Yes, that is the difference. With 0.15.1 there is no variadic
call.
I think we must change calling convention to cdecl for variadic D
functions.
Regards,
Kai
More information about the digitalmars-d-ldc
mailing list