[LLVMdev] Pass and return of large objects
baldrick at free.fr
Tue Mar 2 03:17:59 CST 2010
> Hmm. I've already decided to implement complex numbers basically the
> classic C++ way, as a template. On the bright side, hopefully that
> means the LLVM code generators will end up putting them in pairs of
> registers. On the downside, I suppose that means I'll be honoring the
> x86-64 ABI for complex numbers in the breach rather than the
> observance. Is that going to have any horribly bad consequences?
it only matters if you will be linking with complex number code compiled
with a different compiler, eg BLAS/lapack, complex math functions.
> I would be inclined to guess no, the ABI mostly matters when you're
> calling libraries to do various kinds of IO/protocol translation, and
> those wouldn't normally use complex numbers.
The ABI specifies how parameters are passed when calling a function,
and how values are returned from function calls. If your code calls
eg "cabs" then you are probably dead.
More information about the LLVMdev