aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/config/arm/arm.c15
-rw-r--r--gcc/config/arm/arm.h20
-rw-r--r--gcc/config/arm/coff.h5
-rw-r--r--gcc/config/arm/elf.h2
-rw-r--r--gcc/config/arm/linux-elf.h3
-rw-r--r--gcc/config/arm/netbsd-elf.h3
-rw-r--r--gcc/config/arm/netbsd.h2
-rw-r--r--gcc/config/arm/pe.h2
-rw-r--r--gcc/config/arm/semi.h4
-rw-r--r--gcc/config/arm/semiaof.h2
-rw-r--r--gcc/config/arm/unknown-elf.h2
-rw-r--r--gcc/config/arm/wince-pe.h2
12 files changed, 41 insertions, 21 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 4a9d5f1..80f1f58 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -352,6 +352,9 @@ const char * target_fpe_name = NULL;
/* Set by the -mfloat-abi=... option. */
const char * target_float_abi_name = NULL;
+/* Set by the legacy -mhard-float and -msoft-float options. */
+const char * target_float_switch = NULL;
+
/* Set by the -mabi=... option. */
const char * target_abi_name = NULL;
@@ -1078,14 +1081,16 @@ arm_override_options (void)
error ("invalid floating point abi: -mfloat-abi=%s",
target_float_abi_name);
}
- else
+ else if (target_float_switch)
{
- /* Use soft-float target flag. */
- if (target_flags & ARM_FLAG_SOFT_FLOAT)
- arm_float_abi = ARM_FLOAT_ABI_SOFT;
- else
+ /* This is a bit of a hack to avoid needing target flags for these. */
+ if (target_float_switch[1] == 'h')
arm_float_abi = ARM_FLOAT_ABI_HARD;
+ else
+ arm_float_abi = ARM_FLOAT_ABI_SOFT;
}
+ else
+ arm_float_abi = TARGET_DEFAULT_FLOAT_ABI;
if (arm_float_abi == ARM_FLOAT_ABI_HARD && TARGET_VFP)
sorry ("-mfloat-abi=hard and VFP");
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 8e38447..f8a0002 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -125,6 +125,8 @@ extern const char *target_fpu_name;
extern const char *target_fpe_name;
/* Whether to use floating point hardware. */
extern const char *target_float_abi_name;
+/* For -m{soft,hard}-float. */
+extern const char *target_float_switch;
/* Which ABI to use. */
extern const char *target_abi_name;
/* Define the information needed to generate branch insns. This is
@@ -212,9 +214,7 @@ extern GTY(()) rtx aof_pic_label;
#define ARM_FLAG_APCS_REENT (1 << 6)
/* FLAG 0x0080 now spare (used to be alignment traps). */
-/* Nonzero if all floating point instructions are missing (and there is no
- emulator either). Generate function calls for all ops in this case. */
-#define ARM_FLAG_SOFT_FLOAT (1 << 8)
+ /* FLAG (1 << 8) is now spare (used to be soft-float). */
/* Nonzero if we should compile with BYTES_BIG_ENDIAN set to 1. */
#define ARM_FLAG_BIG_END (1 << 9)
@@ -329,10 +329,6 @@ extern GTY(()) rtx aof_pic_label;
{"apcs-reentrant", ARM_FLAG_APCS_REENT, \
N_("Generate re-entrant, PIC code") }, \
{"no-apcs-reentrant", -ARM_FLAG_APCS_REENT, "" }, \
- {"soft-float", ARM_FLAG_SOFT_FLOAT, \
- N_("Use library calls to perform FP operations") }, \
- {"hard-float", -ARM_FLAG_SOFT_FLOAT, \
- N_("Use hardware floating point instructions") }, \
{"big-endian", ARM_FLAG_BIG_END, \
N_("Assume target CPU is configured as big endian") }, \
{"little-endian", -ARM_FLAG_BIG_END, \
@@ -397,7 +393,11 @@ extern GTY(()) rtx aof_pic_label;
N_("Specify the minimum bit alignment of structures"), 0}, \
{"pic-register=", & arm_pic_register_string, \
N_("Specify the register to be used for PIC addressing"), 0}, \
- {"abi=", &target_abi_name, N_("Specify an ABI"), 0} \
+ {"abi=", &target_abi_name, N_("Specify an ABI"), 0}, \
+ {"soft-float", &target_float_switch, \
+ N_("Alias for -mfloat-abi=soft"), 0}, \
+ {"hard-float", &target_float_switch, \
+ N_("Alias for -mfloat-abi=hard"), 0} \
}
/* Support for a compile-time default CPU, et cetera. The rules are:
@@ -481,6 +481,10 @@ enum float_abi_type
extern enum float_abi_type arm_float_abi;
+#ifndef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+#endif
+
/* Which ABI to use. */
enum arm_abi_type
{
diff --git a/gcc/config/arm/coff.h b/gcc/config/arm/coff.h
index 1be5ea1..5ad7fb68 100644
--- a/gcc/config/arm/coff.h
+++ b/gcc/config/arm/coff.h
@@ -30,8 +30,11 @@
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (ARM/coff)", stderr)
+#undef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
+
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_FRAME)
+#define TARGET_DEFAULT (ARM_FLAG_APCS_FRAME)
#ifndef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
index 1275956..a6c6102 100644
--- a/gcc/config/arm/elf.h
+++ b/gcc/config/arm/elf.h
@@ -108,7 +108,7 @@
#endif
#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_FRAME)
+#define TARGET_DEFAULT (ARM_FLAG_APCS_FRAME)
#endif
#ifndef MULTILIB_DEFAULTS
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 892acf2..e85b6d0 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -30,6 +30,9 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
+#undef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (0)
diff --git a/gcc/config/arm/netbsd-elf.h b/gcc/config/arm/netbsd-elf.h
index 32251bc..cc69064 100644
--- a/gcc/config/arm/netbsd-elf.h
+++ b/gcc/config/arm/netbsd-elf.h
@@ -35,8 +35,7 @@
/* Default it to use ATPCS with soft-VFP. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT \
- (ARM_FLAG_SOFT_FLOAT \
- | ARM_FLAG_APCS_FRAME \
+ (ARM_FLAG_APCS_FRAME \
| TARGET_ENDIAN_DEFAULT)
#undef ARM_DEFAULT_ABI
diff --git a/gcc/config/arm/netbsd.h b/gcc/config/arm/netbsd.h
index 326faba..8b9e437 100644
--- a/gcc/config/arm/netbsd.h
+++ b/gcc/config/arm/netbsd.h
@@ -36,7 +36,7 @@
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_FRAME)
+#define TARGET_DEFAULT (ARM_FLAG_APCS_FRAME)
/* Some defines for CPP.
arm32 is the NetBSD port name, so we always define arm32 and __arm32__. */
diff --git a/gcc/config/arm/pe.h b/gcc/config/arm/pe.h
index afaade2..d474895 100644
--- a/gcc/config/arm/pe.h
+++ b/gcc/config/arm/pe.h
@@ -60,7 +60,7 @@
{ "no-nop-fun-dllimport", - TARGET_FLAG_NOP_FUN, "" },
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | TARGET_FLAG_NOP_FUN)
+#define TARGET_DEFAULT (TARGET_FLAG_NOP_FUN)
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
diff --git a/gcc/config/arm/semi.h b/gcc/config/arm/semi.h
index e30c0fcc..d12ef4b 100644
--- a/gcc/config/arm/semi.h
+++ b/gcc/config/arm/semi.h
@@ -38,6 +38,10 @@
#define TARGET_VERSION fputs (" (ARM/semi-hosted)", stderr);
#endif
+#ifndef TARGET_DEFAULT_FLOAT_ABI
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+#endif
+
#ifndef TARGET_DEFAULT
#define TARGET_DEFAULT (ARM_FLAG_APCS_FRAME)
#endif
diff --git a/gcc/config/arm/semiaof.h b/gcc/config/arm/semiaof.h
index 8e66083..acce644 100644
--- a/gcc/config/arm/semiaof.h
+++ b/gcc/config/arm/semiaof.h
@@ -32,6 +32,8 @@
#define TARGET_VERSION fputs (" (ARM/semi-hosted)", stderr);
+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
#define TARGET_DEFAULT (0)
/* The Norcroft C library defines size_t as "unsigned int". */
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
index dd51c53..775e1e9 100644
--- a/gcc/config/arm/unknown-elf.h
+++ b/gcc/config/arm/unknown-elf.h
@@ -30,7 +30,7 @@
/* Default to using software floating point. */
#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT)
+#define TARGET_DEFAULT (0)
#endif
/* Now we define the strings used to build the spec file. */
diff --git a/gcc/config/arm/wince-pe.h b/gcc/config/arm/wince-pe.h
index 143ed20..121848b 100644
--- a/gcc/config/arm/wince-pe.h
+++ b/gcc/config/arm/wince-pe.h
@@ -20,7 +20,7 @@
Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | TARGET_FLAG_NOP_FUN)
+#define TARGET_DEFAULT (TARGET_FLAG_NOP_FUN)
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \