This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, ARM] soft/hard-float preprocessor symbol


Hi, this patch adds built-in preprocessor symbols __ARM_PCS, __ARM_PCS_VFP to indicate the current soft/hard-float calling convention, as described in the draft ACLE.

If approved, please help to apply to trunk, as I don't have commit rights yet.

Thanks,
Chung-Lin

2010-07-22 Chung-Lin Tang <cltang@codesourcery.com>

	* config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_PCS or
	__ARM_PCS_VFP to indicate soft/hard-float calling convention.



Index: arm.h
===================================================================
--- arm.h	(revision 162381)
+++ arm.h	(working copy)
@@ -94,7 +94,13 @@
 	if (arm_arch_iwmmxt)				\
 	  builtin_define ("__IWMMXT__");		\
 	if (TARGET_AAPCS_BASED)				\
-	  builtin_define ("__ARM_EABI__");		\
+	  {						\
+	    if (TARGET_VFP && TARGET_HARD_FLOAT_ABI)	\
+	      builtin_define ("__ARM_PCS_VFP");		\
+	    else					\
+	      builtin_define ("__ARM_PCS");		\
+	    builtin_define ("__ARM_EABI__");		\
+	  }						\
     } while (0)
 
 /* The various ARM cores.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]