aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGavin Romig-Koch <gavin@cygnus.com>2000-01-25 22:18:59 +0000
committerGavin Romig-Koch <gavin@gcc.gnu.org>2000-01-25 22:18:59 +0000
commit8e46653128e8fdebfd07d72f8190cea7b632bec6 (patch)
treea418c529e63ca881d420365932b03568cef89c49 /gcc
parent490cab72484f7b07ba1e3f5305b1a461114ec0d3 (diff)
downloadgcc-8e46653128e8fdebfd07d72f8190cea7b632bec6.zip
gcc-8e46653128e8fdebfd07d72f8190cea7b632bec6.tar.gz
gcc-8e46653128e8fdebfd07d72f8190cea7b632bec6.tar.bz2
* config/mips/mips.h (LEGITIMATE_CONSTANT_P): Fix for mips16.
From-SVN: r31617
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/mips/mips.h15
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 31e31a7..f0c10d9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2000-01-25 Gavin Romig-Koch <gavin@cygnus.com>
+ * config/mips/mips.h (LEGITIMATE_CONSTANT_P): Fix for mips16.
+
+2000-01-25 Gavin Romig-Koch <gavin@cygnus.com>
+
* Makefile.in (c-gperf.h) : Change the "See" pointer to
point to the new "generated_files" doc.
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index b09d106..bc975ef 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2942,14 +2942,19 @@ typedef struct mips_args {
to be generated at present. Also, the MIPS assembler does not
grok li.d Infinity. */
-/* ??? SGI Irix 6 assembler fails for CONST address, so reject them. */
+/* ??? SGI Irix 6 assembler fails for CONST address, so reject them.
+ Note that the Irix 6 assembler problem may already be fixed.
+ Note also that the GET_CODE (X) == CONST test catches the mips16
+ gp pseudo reg (see mips16_gp_pseudo_reg) deciding it is not
+ a LEGITIMATE_CONSTANT. If we ever want mips16 and ABI_N32 or
+ ABI_64 to work together, we'll need to fix this. */
#define LEGITIMATE_CONSTANT_P(X) \
((GET_CODE (X) != CONST_DOUBLE \
|| mips_const_double_ok (X, GET_MODE (X))) \
- && ! (GET_CODE (X) == CONST \
- && mips_abi != ABI_32 \
- && mips_abi != ABI_O64 \
- && mips_abi != ABI_EABI) \
+ && ! (GET_CODE (X) == CONST \
+ && ! TARGET_GAS \
+ && (mips_abi == ABI_N32 \
+ || mips_abi == ABI_64)) \
&& (! TARGET_MIPS16 || mips16_constant (X, GET_MODE (X), 0, 0)))
/* A C compound statement that attempts to replace X with a valid