diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-25 10:16:00 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-25 10:16:00 +0000 |
commit | 5153cc324bf014b2e720609830f8bf1c27b0fecc (patch) | |
tree | 045a0c27b96c99d3585900bc306c64fdbb6bed02 /gcc/testsuite/gcc.dg/mips-args-1.c | |
parent | 2ceadddaf476c3aa3c50850179ce4e7b0c912e1a (diff) | |
download | gcc-5153cc324bf014b2e720609830f8bf1c27b0fecc.tar.gz |
* doc/invoke.texi: Document -mabi=meabi, and expand on the EABI
description. Document -mips32, -mips64, and the associated -march
values. Describe the "mipsN" arguments to -march. Say that the
-mipsN options are equivalent to -march. Reword the description
of default type sizes.
* toplev.h (target_flags_explicit): Declare.
* toplev.c (target_flags_explicit): New var.
(set_target_switch): Update target_flags_explicit.
* config/mips/abi64.h (SUBTARGET_TARGET_OPTIONS): Undefine.
* config/mips/elf64.h (MIPS_ISA_DEFAULT): Undefine.
* config/mips/iris6.h (SUBTARGET_ASM_SPEC): -mabi=64 implies -mips3.
* config/mips/isa3264.h (MIPS_ENABLE_EMBEDDED_O32): Undefine.
* config/mips/mips.h (mips_cpu_info): New struct.
(mips_cpu_string, mips_explicit_type_size_string): Remove.
(mips_cpu_info_table, mips_arch_info, mips_tune_info): Declare.
(MIPS_CPP_SET_PROCESSOR): New macro.
(TARGET_CPP_BUILTINS): Declare a macro for each supported processor.
Define _MIPS_ARCH and _MIPS_TUNE.
(MIPS_ISA_DEFAULT): Don't provide a default value. Instead...
(MIPS_CPU_STRING_DEFAULT): Set to "from-abi" if neither it nor
MIPS_ISA_DEFAULT were already defined.
(MULTILIB_DEFAULTS): Add MULTILIB_ABI_DEFAULT.
(TARGET_OPTIONS): Remove -mcpu and -mexplicit-type-size.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New.
(GAS_ASM_SPEC): Remove -march, -mcpu, -mgp* and -mabi rules.
(ABI_GAS_ASM_SPEC): Remove.
(MULTILIB_ABI_DEFAULT, ASM_ABI_DEFAULT_SPEC): New macros.
(ASM_SPEC): Add -mgp32, -mgp64, -march, -mabi=eabi and -mabi=o64.
Invoke %(asm_abi_default_spec) if no ABI was specified.
(CC1_SPEC): Remove ISA -> register-size rules.
(EXTRA_SPECS): Remove abi_gas_asm_spec. Add asm_abi_default_spec.
* config/mips/mips.c (mips_arch_info, mips_tune_info): New vars.
(mips_cpu_string, mips_explicit_type_size_string): Remove.
(mips_cpu_info_table): New array.
(mips_set_architecture, mips_set_tune): New fns.
(override_options): Rework to make -mipsN equivalent to -march.
Detect more erroneous cases, including those removed from CC1_SPEC.
Don't change the ABI based on architecture, or vice versa.
Unify logic with GAS.
(mips_asm_file_start): Get architecture name from mips_arch_info.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): Take the name of the option as argument. Handle
'from-abi'. Raise an error if the option is wrong.
(mips_cpu_info_from_isa): New fn.
[gcc/testsuite]
* gcc.dg/mips-args-[123].c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/mips-args-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/mips-args-1.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/mips-args-1.c b/gcc/testsuite/gcc.dg/mips-args-1.c new file mode 100644 index 00000000000..d5799fae0e6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/mips-args-1.c @@ -0,0 +1,35 @@ +/* Check that certain preprocessor macros are defined, and do some + consistency checks. */ +/* { dg-do compile { target mips*-*-* } } */ + +const char *compiled_for = _MIPS_ARCH; +const char *optimized_for = _MIPS_TUNE; + +#if __mips_fpr != 32 && __mips_fpr != 64 +#error Bad __mips_fpr +#endif + +/* Test complementary macro pairs: exactly one of each pair + must be defined. */ + +#if defined (_R3000) == defined (_R4000) +#error _R3000 / _R4000 mismatch +#endif + +#if defined (__mips_hard_float) == defined (__mips_soft_float) +#error __mips_hard_float / __mips_soft_float mismatch +#endif + +#if defined (_MIPSEL) == defined (_MIPSEB) +#error _MIPSEL / _MIPSEB mismatch +#endif + +/* Check for __mips64 consistency. */ + +#if defined (__mips64) != defined (_R4000) +#error __mips64 / _R4000 mismatch +#endif + +#if defined (__mips64) && __mips != 3 && __mips != 4 && __mips != 64 +#error __mips64 / __mips mismatch +#endif |