OSDN Git Service

(mips_move_2words): Add SIGN_EXTEND support for SYMBOL_REF,
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Apr 1997 20:18:13 +0000 (20:18 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Apr 1997 20:18:13 +0000 (20:18 +0000)
LABEL_REF, and CONST operands.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13834 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/mips/mips.c

index eaf24c2..dd65b95 100644 (file)
@@ -1543,7 +1543,12 @@ mips_move_2words (operands, insn)
   /* Sanity check.  */
   if (GET_CODE (operands[1]) == SIGN_EXTEND
       && code1 != REG
   /* 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)
     abort ();
 
   if (code0 == REG)
@@ -1803,7 +1808,14 @@ mips_move_2words (operands, insn)
          if (TARGET_STATS)
            mips_count_memory_refs (op1, 2);
 
          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";
        }
     }
 
        }
     }