[LLVMdev] Passing structures by value on Windows
Anton Korobeynikov
anton at korobeynikov.info
Thu Jun 3 05:20:27 PDT 2010
Hello
> On x64 VC++ passes two { i32 i32 } structs in RCX and RDX respectively
> and reads result from RAX, but it seems LLVM reads parameters from
> ECX, EDX (first vector) and R8D, R9D (second vector).
It's a frontend task to lower the code to follow the vendor ABI. In
this case you have to bitcast your struct to i64 before passing as
argument.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-dev
mailing list