From 0f2c14c0bcd2ec771c1ef0d168727392b45721c0 Mon Sep 17 00:00:00 2001 From: cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed, 28 Jul 2010 15:40:58 +0000 Subject: [PATCH] * config/arm/arm.c (arm_pcs_default): Remove static. * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __ARM_PCS or __ARM_PCS_VFP to indicate soft/hard-float calling convention. (arm_pcs_default): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162637 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/arm.c | 2 +- gcc/config/arm/arm.h | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) Index: gcc-4.5.2/gcc/config/arm/arm.c =================================================================== --- gcc-4.5.2.orig/gcc/config/arm/arm.c +++ gcc-4.5.2/gcc/config/arm/arm.c @@ -700,7 +700,7 @@ static int after_arm_reorg = 0; /* The maximum number of insns to be used when loading a constant. */ static int arm_constant_limit = 3; -static enum arm_pcs arm_pcs_default; +enum arm_pcs arm_pcs_default; /* For an explanation of these variables, see final_prescan_insn below. */ int arm_ccfsm_state; Index: gcc-4.5.2/gcc/config/arm/arm.h =================================================================== --- gcc-4.5.2.orig/gcc/config/arm/arm.h +++ gcc-4.5.2/gcc/config/arm/arm.h @@ -94,7 +94,13 @@ extern char arm_arch_name[]; if (arm_arch_iwmmxt) \ builtin_define ("__IWMMXT__"); \ if (TARGET_AAPCS_BASED) \ - builtin_define ("__ARM_EABI__"); \ + { \ + if (arm_pcs_default == ARM_PCS_AAPCS_VFP) \ + builtin_define ("__ARM_PCS_VFP"); \ + else if (arm_pcs_default == ARM_PCS_AAPCS) \ + builtin_define ("__ARM_PCS"); \ + builtin_define ("__ARM_EABI__"); \ + } \ } while (0) /* The various ARM cores. */ @@ -1648,6 +1654,9 @@ enum arm_pcs ARM_PCS_UNKNOWN }; +/* Default procedure calling standard of current compilation unit. */ +extern enum arm_pcs arm_pcs_default; + /* A C type for declaring a variable that is used as the first argument of `FUNCTION_ARG' and other related values. */ typedef struct