[LLVMdev] Shadow returns

Dale Johannesen dalej at apple.com
Mon May 17 11:04:03 PDT 2010


On May 16, 2010, at 9:22 PMPDT, Andrew Lenharth wrote:

> I need to return i128 and f128 via a ptr passed in as the first
> argument to a function.  I am not seeing something in llvm-abi.h to
> let me do this.  How do I make a scalar (not an aggregate) use a
> shadow return?  Similarly I need to pass those types by pointer,
> (byval arguments?) and don't see an obvious way to do that.

I don't think any calling convention has needed to do that before, so it won't be supported.  It shouldn't be too bad to implement by adding some new macros similar to the existing LLVM_SHOULD*.  Good luck and test thoroughly; it's easy to break other targets when you touch this stuff.





More information about the llvm-dev mailing list