* config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): New macro.
* config/mips/mips.c (mips_cpu_info_table): Mention it in the
the introductory comment.
(MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
(override_options): Don't test for it.
* config/mips/sde.h (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
(DRIVER_SELF_SPECS): Add MIPS_ARCH_FLOAT_SPEC.
* config/mips/vr.h: As for config/mips/sde.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128346
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-09-10 Richard Sandiford <richard@codesourcery.com>
+
+ * config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): New macro.
+ * config/mips/mips.c (mips_cpu_info_table): Mention it in the
+ the introductory comment.
+ (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
+ (override_options): Don't test for it.
+ * config/mips/sde.h (MIPS_MARCH_CONTROLS_SOFT_FLOAT): Delete.
+ (DRIVER_SELF_SPECS): Add MIPS_ARCH_FLOAT_SPEC.
+ * config/mips/vr.h: As for config/mips/sde.h.
+
2007-09-10 Trevor Smigiel <trevor_smigiel@playstation.sony.com>
Revital Eres <eres@il.ibm.com>
matched in the order listed. The first mention of an ISA level is
taken as the canonical name for that ISA.
- To ease comparison, please keep this table in the same order as
- gas's mips_cpu_info_table[]. Please also make sure that
- MIPS_ISA_LEVEL_SPEC handles all -march options correctly. */
+ To ease comparison, please keep this table in the same order
+ as gas's mips_cpu_info_table[]. Please also make sure that
+ MIPS_ISA_LEVEL_SPEC and MIPS_ARCH_FLOAT_SPEC handle all -march
+ options correctly. */
const struct mips_cpu_info mips_cpu_info_table[] = {
/* Entries for generic ISAs */
{ "mips1", PROCESSOR_R3000, 1 },
31, 30, 23, 22, 21, 20, 19, 18, 17, 16, 7, 6, 5, 4
};
\f
-/* Nonzero if -march should decide the default value of
- MASK_SOFT_FLOAT_ABI. */
-#ifndef MIPS_MARCH_CONTROLS_SOFT_FLOAT
-#define MIPS_MARCH_CONTROLS_SOFT_FLOAT 0
-#endif
-\f
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
target_flags &= ~MASK_LONG64;
}
- if (MIPS_MARCH_CONTROLS_SOFT_FLOAT
- && (target_flags_explicit & MASK_SOFT_FLOAT_ABI) == 0)
- {
- /* For some configurations, it is useful to have -march control
- the default setting of MASK_SOFT_FLOAT_ABI. */
- switch ((int) mips_arch)
- {
- case PROCESSOR_R4100:
- case PROCESSOR_R4111:
- case PROCESSOR_R4120:
- case PROCESSOR_R4130:
- target_flags |= MASK_SOFT_FLOAT_ABI;
- break;
-
- default:
- target_flags &= ~MASK_SOFT_FLOAT_ABI;
- break;
- }
- }
-
if (!TARGET_OLDABI)
flag_pcc_struct_return = 0;
%{march=mips64|march=5k*|march=20k*|march=sb1*|march=sr71000: -mips64} \
%{!march=*: -" MULTILIB_ISA_DEFAULT "}}"
+/* A spec that infers a -mhard-float or -msoft-float setting from an
+ -march argument. Note that soft-float and hard-float code are not
+ link-compatible. */
+
+#define MIPS_ARCH_FLOAT_SPEC \
+ "%{mhard-float|msoft-float|march=mips*:; \
+ march=vr41*|march=m4k|march=4k*|march=24kc|march=24kec \
+ |march=34kc|march=74kc|march=5kc: -msoft-float; \
+ march=*: -mhard-float}"
+
/* A spec condition that matches 32-bit options. It only works if
MIPS_ISA_LEVEL_SPEC has been applied. */
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Let the -march option set soft-float. */
-#define MIPS_MARCH_CONTROLS_SOFT_FLOAT 1
-
#define DRIVER_SELF_SPECS \
/* Make sure a -mips option is present. This helps us to pick \
the right multilib, and also makes the later specs easier \
to write. */ \
MIPS_ISA_LEVEL_SPEC, \
\
+ /* Infer the default float setting from -march. */ \
+ MIPS_ARCH_FLOAT_SPEC, \
+ \
/* If no ABI option is specified, infer one from the ISA level \
or -mgp setting. */ \
"%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=n32}}", \
#define DEFAULT_VR_ARCH "mfix-vr4130"
#define MIPS_ABI_DEFAULT ABI_EABI
-#define MIPS_MARCH_CONTROLS_SOFT_FLOAT 1
#define MULTILIB_DEFAULTS \
{ MULTILIB_ENDIAN_DEFAULT, \
MULTILIB_ABI_DEFAULT, \
/* Same idea for -mfix-vr4130. */ \
"%{mfix-vr4130:%{!march=*:-march=vr4130}}", \
\
+ /* Infer the default float setting from -march. */ \
+ MIPS_ARCH_FLOAT_SPEC, \
+ \
/* Make -mabi=eabi -mlong32 the default. */ \
"%{!mabi=*:-mabi=eabi %{!mlong*:-mlong32}}", \
\