[RX] Minor patches
DJ Delorie
dj@redhat.com
Wed Aug 25 04:00:00 GMT 2010
A few minor patches to fix a few code problems... Ok?
* config/rx/rx.c (rx_print_operand): If __builtin_rx_setpsw() is
passed an invalid value, print an error instead of ICEing.
(rx_expand_prologue): Don't adjust the frame size when we push the
accumulator.
(rx_expand_builtin_mvtipl): Pass an integer to IN_RANGE, not an
RTX.
Index: config/rx/rx.c
===================================================================
--- config/rx/rx.c (revision 163536)
+++ config/rx/rx.c (working copy)
@@ -440,13 +440,14 @@ rx_print_operand (FILE * file, rtx op, i
case 1: case 'z': case 'Z': fprintf (file, "Z"); break;
case 2: case 's': case 'S': fprintf (file, "S"); break;
case 3: case 'o': case 'O': fprintf (file, "O"); break;
case 8: case 'i': case 'I': fprintf (file, "I"); break;
case 9: case 'u': case 'U': fprintf (file, "U"); break;
default:
- gcc_unreachable ();
+ error ("__builtin_rx_setpsw takes 'C', 'Z', 'S', 'O', 'I', or 'U'");
+ return;
}
break;
case 'H':
switch (GET_CODE (op))
{
@@ -1297,14 +1298,12 @@ rx_expand_prologue (void)
emit_insn (gen_mvfacmi (gen_rtx_REG (SImode, acc_low)));
emit_insn (gen_mvfachi (gen_rtx_REG (SImode, acc_high)));
emit_insn (gen_stack_pushm (GEN_INT (2 * UNITS_PER_WORD),
gen_rx_store_vector (acc_low, acc_high)));
}
-
- frame_size += 2 * UNITS_PER_WORD;
}
/* If needed, set up the frame pointer. */
if (frame_pointer_needed)
{
if (frame_size)
@@ -1893,13 +1892,13 @@ static rtx
rx_expand_builtin_mvtipl (rtx arg)
{
/* The RX610 does not support the MVTIPL instruction. */
if (rx_cpu_type == RX610)
return NULL_RTX;
- if (! CONST_INT_P (arg) || ! IN_RANGE (arg, 0, (1 << 4) - 1))
+ if (! CONST_INT_P (arg) || ! IN_RANGE (INTVAL (arg), 0, (1 << 4) - 1))
return NULL_RTX;
emit_insn (gen_mvtipl (arg));
return NULL_RTX;
}
More information about the Gcc-patches
mailing list