<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 1, 2011, at 11:21 AM, Bob Wilson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 28, 2011, at 9:17 AM, Stuart Hastings wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: stuart<br>Date: Mon Feb 28 11:17:53 2011<br>New Revision: 126655<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=126655&view=rev">http://llvm.org/viewvc/llvm-project?rev=126655&view=rev</a><br>Log:<br>Support for byval parameters on ARM.  Will be enabled by a forthcoming<br>patch to the front-end.  Radar 7662569.<br><font class="Apple-style-span"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><blockquote type="cite"><div>Modified: llvm/trunk/lib/Target/ARM/ARMCallingConv.td<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCallingConv.td?rev=126655&r1=126654&r2=126655&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCallingConv.td?rev=126655&r1=126654&r2=126655&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/Target/ARM/ARMCallingConv.td (original)<br>+++ llvm/trunk/lib/Target/ARM/ARMCallingConv.td Mon Feb 28 11:17:53 2011<br>@@ -22,6 +22,9 @@<br> //===----------------------------------------------------------------------===//<br> def CC_ARM_APCS : CallingConv<[<br><br>+  // Handles byval parameters.<br>+  CCIfByVal<CCPassByVal<8, 8>>,<br></div></blockquote><div><br></div>This should only require 4-byte alignment.  The extra alignment here is causing unnecessary dynamic realignment.</div></div></blockquote><div><br></div><div>O.K.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>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.</div></div></blockquote></div><br><div>I'll revert.</div><div><br></div><div>Thanks,</div><div><br></div><div>stuart</div></body></html>