/* 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;
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");
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
#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)
{"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, \
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:
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
{