aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1992-12-31 14:24:49 -0800
committerJim Wilson <wilson@gcc.gnu.org>1992-12-31 14:24:49 -0800
commite601abce765f2da080c862bddda1bfa767a35723 (patch)
treeb6cf71a5a5de402ccaf9710178ba2ce286b61edd
parenteff864abc33227ebe24ec5b89c744311e2aff332 (diff)
downloadgcc-e601abce765f2da080c862bddda1bfa767a35723.zip
gcc-e601abce765f2da080c862bddda1bfa767a35723.tar.gz
gcc-e601abce765f2da080c862bddda1bfa767a35723.tar.bz2
(print_operand): For invalid operands, call
output_operand_lossage instead of aborting. From-SVN: r3027
-rw-r--r--gcc/config/sparc/sparc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 1a50fbc..97ab72c 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -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); }
}