aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.h
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-09-05 19:39:27 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-09-05 19:39:27 +0000
commit81a478c889889e61d8fb27626276a6da1d6c01a1 (patch)
treed039e4100665e17742b2be46bda90e616e429283 /gcc/config/mips/mips.h
parent1ab9ec7b7fa55245a78720a49e9284fd64d04536 (diff)
downloadgcc-81a478c889889e61d8fb27626276a6da1d6c01a1.zip
gcc-81a478c889889e61d8fb27626276a6da1d6c01a1.tar.gz
gcc-81a478c889889e61d8fb27626276a6da1d6c01a1.tar.bz2
re PR target/49606 (mips64: o64 Unrecognizable insn when one noreturn function calling another noreturn function)
gcc/ PR target/49606 * config/mips/mips.h (ABI_HAS_64BIT_SYMBOLS): Check Pmode. (PMODE_INSN): New macro. * config/mips/mips.c (gen_load_const_gp): Use PMODE_INSN. (mips_got_load, mips_expand_synci_loop): Likewise. (mips_save_gp_to_cprestore_slot): Handle SImode and DImode cprestore patterns. (mips_emit_loadgp): Use PMODE_INSN. Handle SImode and DImode copygp_mips16 patterns. (mips_expand_prologue): Handle SImode and DImode potential_cprestore and use_cprestore patterns. (mips_override_options): Check for incompatible -mabi and -mlong combinations. * config/mips/mips.md (unspec_got<mode>): Rename to... (unspec_got_<mode>): ...this. (copygp_mips16): Use the Pmode iterator. (potential_cprestore, cprestore, use_cprestore): Likewise. (clear_cache, indirect_jump): Use PMODE_INSN. (indirect_jump<mode>): Rename to... (indirect_jump_<mode>): ...this. (tablejump): Use PMODE_INSN. (tablejump<mode>): Rename to... (tablejump_<mode>): ...this. (exception_receiver): Handle restore_gp_si and restore_gp_di. (restore_gp): Use the Pmode iterator. * config/mips/mips-dsp.md (mips_lbux, mips_lhx, mips_lwx): Use PMODE_INSN. gcc/testsuite/ PR target/49606 * gcc.target/mips/abi-main.h: New file. * gcc.target/mips/abi-o32-long32.c: New test. * gcc.target/mips/abi-o32-long64.c: Likewise. * gcc.target/mips/abi-o64-long32.c: Likewise. * gcc.target/mips/abi-o64-long64.c: Likewise. * gcc.target/mips/abi-n32-long32.c: Likewise. * gcc.target/mips/abi-n32-long64.c: Likewise. * gcc.target/mips/abi-n64-long32.c: Likewise. * gcc.target/mips/abi-n64-long64.c: Likewise. * gcc.target/mips/abi-o32-long32-no-shared.c: Likewise. * gcc.target/mips/abi-o32-long64-no-shared.c: Likewise. * gcc.target/mips/abi-o64-long32-no-shared.c: Likewise. * gcc.target/mips/abi-o64-long64-no-shared.c: Likewise. * gcc.target/mips/abi-n32-long32-no-shared.c: Likewise. * gcc.target/mips/abi-n32-long64-no-shared.c: Likewise. * gcc.target/mips/abi-n64-long32-no-shared.c: Likewise. * gcc.target/mips/abi-n64-long64-no-shared.c: Likewise. * gcc.target/mips/abi-o32-long32-pic.c: Likewise. * gcc.target/mips/abi-o32-long64-pic.c: Likewise. * gcc.target/mips/abi-o64-long32-pic.c: Likewise. * gcc.target/mips/abi-o64-long64-pic.c: Likewise. * gcc.target/mips/abi-n32-long32-pic.c: Likewise. * gcc.target/mips/abi-n32-long64-pic.c: Likewise. * gcc.target/mips/abi-n64-long32-pic.c: Likewise. * gcc.target/mips/abi-n64-long64-pic.c: Likewise. * gcc.target/mips/abi-eabi32-long32.c: Likewise. * gcc.target/mips/abi-eabi32-long64.c: Likewise. * gcc.target/mips/abi-eabi64-long32.c: Likewise. * gcc.target/mips/abi-eabi64-long64.c: Likewise. * gcc.target/mips/mips.exp: Make -mshared implied -mabicalls. * gcc.target/mips/branch-2.c: Remove -mabicalls. * gcc.target/mips/branch-3.c: Likewise. * gcc.target/mips/branch-4.c: Likewise. * gcc.target/mips/branch-5.c: Likewise. * gcc.target/mips/branch-6.c: Likewise. * gcc.target/mips/branch-7.c: Likewise. * gcc.target/mips/branch-8.c: Likewise. * gcc.target/mips/branch-9.c: Likewise. * gcc.target/mips/branch-10.c: Likewise. * gcc.target/mips/branch-11.c: Likewise. * gcc.target/mips/branch-12.c: Likewise. * gcc.target/mips/branch-13.c: Likewise. * gcc.target/mips/lazy-binding-1.c: Likewise. From-SVN: r178557
Diffstat (limited to 'gcc/config/mips/mips.h')
-rw-r--r--gcc/config/mips/mips.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 92e932a..236afbb 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -792,7 +792,9 @@ struct mips_cpu_info {
the ABI's file format, but it can be overridden by -msym32. Note that
overriding the size with -msym32 changes the ABI of relocatable objects,
although it doesn't change the ABI of a fully-linked object. */
-#define ABI_HAS_64BIT_SYMBOLS (FILE_HAS_64BIT_SYMBOLS && !TARGET_SYM32)
+#define ABI_HAS_64BIT_SYMBOLS (FILE_HAS_64BIT_SYMBOLS \
+ && Pmode == DImode \
+ && !TARGET_SYM32)
/* ISA has instructions for managing 64-bit fp and gp regs (e.g. mips3). */
#define ISA_HAS_64BIT_REGS (ISA_MIPS3 \
@@ -2916,3 +2918,10 @@ extern GTY(()) struct target_globals *mips16_globals;
/* For switching between MIPS16 and non-MIPS16 modes. */
#define SWITCHABLE_TARGET 1
+
+/* Several named MIPS patterns depend on Pmode. These patterns have the
+ form <NAME>_si for Pmode == SImode and <NAME>_di for Pmode == DImode.
+ Add the appropriate suffix to generator function NAME and invoke it
+ with arguments ARGS. */
+#define PMODE_INSN(NAME, ARGS) \
+ (Pmode == SImode ? NAME ## _si ARGS : NAME ## _di ARGS)