From patchwork Wed Jul 21 16:06:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [ARM] soft/hard-float preprocessor symbol Date: Wed, 21 Jul 2010 06:06:12 -0000 From: Chung-Lin Tang X-Patchwork-Id: 59452 Message-Id: <4C471AF4.4000302@codesourcery.com> To: gcc-patches 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 * 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. */