aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1997-04-03 12:18:13 -0800
committerJim Wilson <wilson@gcc.gnu.org>1997-04-03 12:18:13 -0800
commit27c38b75d34217804ee9a25ba6393df09b46fa4b (patch)
tree02a4406ae856f8f6982640ab5984320f71a8449b
parent714aa06f90b27dbf5f2442ec8f3f3bc7377e867a (diff)
downloadgcc-27c38b75d34217804ee9a25ba6393df09b46fa4b.zip
gcc-27c38b75d34217804ee9a25ba6393df09b46fa4b.tar.gz
gcc-27c38b75d34217804ee9a25ba6393df09b46fa4b.tar.bz2
(mips_move_2words): Add SIGN_EXTEND support for SYMBOL_REF,
LABEL_REF, and CONST operands. From-SVN: r13834
-rw-r--r--gcc/config/mips/mips.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index eaf24c2..dd65b95 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -1543,7 +1543,12 @@ mips_move_2words (operands, insn)
/* Sanity check. */
if (GET_CODE (operands[1]) == SIGN_EXTEND
&& code1 != REG
- && code1 != CONST_INT)
+ && code1 != CONST_INT
+ /* The following three can happen as the result of a questionable
+ cast. */
+ && code1 != LABEL_REF
+ && code1 != SYMBOL_REF
+ && code1 != CONST)
abort ();
if (code0 == REG)
@@ -1803,7 +1808,14 @@ mips_move_2words (operands, insn)
if (TARGET_STATS)
mips_count_memory_refs (op1, 2);
- ret = "dla\t%0,%a1";
+ if (GET_CODE (operands[1]) == SIGN_EXTEND)
+ /* We deliberately remove the 'a' from '%1', so that we don't
+ have to add SIGN_EXTEND support to print_operand_address.
+ print_operand will just call print_operand_address in this
+ case, so there is no problem. */
+ ret = "la\t%0,%1";
+ else
+ ret = "dla\t%0,%a1";
}
}