[llvm-commits] [llvm] r126655 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/CallingConvLower.cpp lib/Target/ARM/ARMCallingConv.td lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMISelLowering.h

Stuart Hastings stuart at apple.com
Tue Mar 1 11:24:31 PST 2011


On Mar 1, 2011, at 11:21 AM, Bob Wilson wrote:

> 
> On Feb 28, 2011, at 9:17 AM, Stuart Hastings wrote:
> 
>> Author: stuart
>> Date: Mon Feb 28 11:17:53 2011
>> New Revision: 126655
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=126655&view=rev
>> Log:
>> Support for byval parameters on ARM.  Will be enabled by a forthcoming
>> patch to the front-end.  Radar 7662569.
>> 
>> Modified: llvm/trunk/lib/Target/ARM/ARMCallingConv.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCallingConv.td?rev=126655&r1=126654&r2=126655&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/ARM/ARMCallingConv.td (original)
>> +++ llvm/trunk/lib/Target/ARM/ARMCallingConv.td Mon Feb 28 11:17:53 2011
>> @@ -22,6 +22,9 @@
>> //===----------------------------------------------------------------------===//
>> def CC_ARM_APCS : CallingConv<[
>> 
>> +  // Handles byval parameters.
>> +  CCIfByVal<CCPassByVal<8, 8>>,
> 
> This should only require 4-byte alignment.  The extra alignment here is causing unnecessary dynamic realignment.

O.K.

> Beyond that, the patch is not correct because it doesn't follow the ABI, at least for APCS -- I didn't check AAPCS.  If there are unused argument registers, the beginning of the aggregate needs to be passed in them, with the remainder passed byval on the stack.  With the patch as it is now, it just puts the entire aggregate on the stack regardless of whether any argument registers are available.

I'll revert.

Thanks,

stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110301/35426987/attachment.html>


More information about the llvm-commits mailing list