[llvm-commits] [llvm-gcc-4.2] r79099 - /llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm-target.h
Bob Wilson
bob.wilson at apple.com
Sat Aug 15 08:04:57 PDT 2009
Author: bwilson
Date: Sat Aug 15 10:04:57 2009
New Revision: 79099
URL: http://llvm.org/viewvc/llvm-project?rev=79099&view=rev
Log:
For AAPCS-VFP, fall back to the base AAPCS calling convention for functions
with variable arugments.
Patch by Sandeep Patel.
Modified:
llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm-target.h
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm-target.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm-target.h?rev=79099&r1=79098&r2=79099&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm-target.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/llvm-arm-target.h Sat Aug 15 10:04:57 2009
@@ -21,11 +21,17 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/* LLVM specific stuff for supporting calling convention output */
+/* LLVM specific code to select the calling conventions. The AAPCS
+ specification says that varargs functions must use the base standard
+ instead of the VFP hard float variant. We check for that with
+ (isVoid || hasArgList). */
#define TARGET_ADJUST_LLVM_CC(CC, type) \
{ \
if (TARGET_AAPCS_BASED) \
- CC = (TARGET_VFP && TARGET_HARD_FLOAT_ABI ? \
+ CC = ((TARGET_VFP && TARGET_HARD_FLOAT_ABI && \
+ ((TYPE_ARG_TYPES(type) == 0) || \
+ (TREE_VALUE(tree_last(TYPE_ARG_TYPES(type))) == \
+ void_type_node))) ? \
CallingConv::ARM_AAPCS_VFP : \
CallingConv::ARM_AAPCS); \
else \
More information about the llvm-commits
mailing list