[swift-dev] Value-result ABI for small trivial inouts

Chris Lattner clattner at apple.com
Thu Dec 17 18:36:48 CST 2015


> On Dec 17, 2015, at 3:44 PM, Joe Groff via swift-dev <swift-dev at swift.org> wrote:
> 
> 
>> On Dec 17, 2015, at 3:43 PM, Greg Parker <gparker at apple.com> wrote:
>> 
>> 
>>> On Dec 17, 2015, at 3:34 PM, Joe Groff via swift-dev <swift-dev at swift.org> wrote:
>>> 
>>> On ARMv7 and ARM64, the argument and return register sets are the same
>> 
>> Nit: True on arm64. Not true on armv7; the GPR parameters are r0-r3 but GPR return is r0-r1.
> 
> True, I meant that one sequence is a prefix of the other. If you pass the first argument in and return it out via {r0, r1} the operations could be done in-place.

Also, Swift functions can have their own ABIs.  Extending the result registers to use r0-r3 on ARM32 seems perfectly reasonable.

-Chris


More information about the swift-dev mailing list