[LLVMdev] Win64 Calling Convention problem
Anton Korobeynikov
anton at korobeynikov.info
Thu Dec 3 12:44:16 PST 2009
Hello
> I don't know. I feel reluctant to generate different IRs for Win32 and
> for Win64.
Unfortunately, you should. Think about differences and between
_Complex type and struct {double, double}.
>From LLVM's point of view these are same types, however many ABIs have
special rules for passing / returning _Complex,
this is possible to handle in frontend only.
> Since the C calling convention is the default for LLVM functions, I
> thought that it would map to *the* Win64 calling convention (since
> cdecl, fastcall and stdcall are all the same) when a 64-bit build was
> used. This is quite confusing ...
Yes, default calling convention is C. But you're not using an
ABI-compliant C compiler to generate the IR.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-dev
mailing list