(print_operand): For invalid operands, call
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 31 Dec 1992 22:24:49 +0000 (14:24 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 31 Dec 1992 22:24:49 +0000 (14:24 -0800)
output_operand_lossage instead of aborting.

From-SVN: r3027

gcc/config/sparc/sparc.c

index 1a50fbcf501321918974938c2e5fe4a132222fa0..97ab72cab4ae8562323ba1fcbd5e0646e77eaf9b 100644 (file)
@@ -2814,7 +2814,9 @@ print_operand (file, x, code)
       output_addr_const (file, XEXP (x, 1));
       fputc (')', file);
     }
-  else if (GET_CODE (x) == CONST_DOUBLE)
+  else if (GET_CODE (x) == CONST_DOUBLE
+          && (GET_MODE (x) == VOIDmode
+              || GET_MODE_CLASS (GET_MODE (x)) == MODE_INT))
     {
       if (CONST_DOUBLE_HIGH (x) == 0)
        fprintf (file, "%u", CONST_DOUBLE_LOW (x));
@@ -2822,8 +2824,10 @@ print_operand (file, x, code)
               && CONST_DOUBLE_LOW (x) < 0)
        fprintf (file, "%d", CONST_DOUBLE_LOW (x));
       else
-       abort ();
+       output_operand_lossage ("long long constant not a valid immediate operand");
     }
+  else if (GET_CODE (x) == CONST_DOUBLE)
+    output_operand_lossage ("floating point constant not a valid immediate operand");
   else { output_addr_const (file, x); }
 }
 \f