[LLVMdev] Win64 Calling Convention problem
anton at korobeynikov.info
Fri Dec 4 06:59:51 PST 2009
> I didn't know about exceptions like _Complex that you mentioned. The
> only way to support them is to place the burden of correct parameter
> passing on the front-end, I understand that now.
Right. Especially when ABI dictates quite "weird" rules (read e.g.
x86-64 ABI or ARM EABI).
We do support one "exception" though for win64 - __m128 vectors. This
was done since they are
native types and thus do not get changed by type legalizer. I have no
idea why MS decided not to
pass then in registers... This is silly...
> So, today I created a new transformation pass that makes sure that
> LLVM IR, which works alright with the default Win32 calling
> conventions, also plays nice with Win64 code within the limited scope
> of my language (that requires packing of aggregates of sizes 8, 16,
> 32, and 64-bits into an integer argument, and passing of larger
> aggregates by reference).
Sounds like pretty sane approach :)
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-dev