llvm 3.6 and x86 (32-bit) varargs bad stack adjust

Dan Olson via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Thu Jul 16 08:53:18 PDT 2015


"Kai Nacke" <kai at redstar.de> writes:
>
> I think now that it is not an LLVM bug because stdcall does not
> support variadic arguments. Solution is to use the C calling
> convention. DMD seems to do something similar.

It is odd though that LLVM doesn't complain when varargs is used with
CallingConv::X86_StdCall.  With ARM when I upgraded to 0.15.2, it
specifically told me:

[  5%] Generating src/core/demangle_arm64.o
Calling convention does not support varargs or perfect forwarding!
i32 (i8*, i64, i8*, ...)* @snprintf
LLVM ERROR: Broken module found, compilation aborted!
make[3]: *** [runtime/src/core/demangle_arm64.o] Error 1

Then I knew to switch from Fast to C!
--
Dan


More information about the digitalmars-d-ldc mailing list