mips.h (MIPS_ARCH_FLOAT_SPEC): New macro.

gcc/
	* 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.

From-SVN: r128346
This commit is contained in:
Richard Sandiford 2007-09-10 14:51:48 +00:00 committed by Richard Sandiford
parent b3a06f593c
commit 7d8bed7be6
5 changed files with 31 additions and 33 deletions

View File

@ -1,3 +1,14 @@
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>

View File

@ -740,9 +740,10 @@ const struct attribute_spec mips_attribute_table[] =
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 },
@ -1216,12 +1217,6 @@ static const unsigned char mips16e_save_restore_regs[] = {
31, 30, 23, 22, 21, 20, 19, 18, 17, 16, 7, 6, 5, 4
};
/* 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
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.half\t"
@ -5517,26 +5512,6 @@ override_options (void)
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;

View File

@ -658,6 +658,16 @@ extern enum mips_code_readable_setting mips_code_readable;
%{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. */

View File

@ -20,15 +20,15 @@ along with GCC; see the file COPYING. If not, write to
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}}", \

View File

@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#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, \
@ -41,6 +40,9 @@ along with GCC; see the file COPYING3. If not see
/* 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}}", \
\