Message ID | 201008250231.o7P2VmpU006677@greed.delorie.com |
---|---|
State | New |
Headers | show |
On 08/24/2010 07:31 PM, DJ Delorie wrote: > @@ -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; output_operand_lossage here. r~
> output_operand_lossage here.
This is reporting a user error. output_operand_lossage() causes an ICE.
On 08/26/2010 05:30 PM, DJ Delorie wrote: >> output_operand_lossage here. > > This is reporting a user error. output_operand_lossage() causes an ICE. Well, output_operand_lossage reports user errors in asms, and ICEs for normal insns. If this is a normal insn, then you should have diagnosed the user error earlier. r~
> Well, output_operand_lossage reports user errors in asms, and > ICEs for normal insns. If this is a normal insn, then you > should have diagnosed the user error earlier. It's a builtin : __builtin_rx_mvtipl() but the %F is only used for that one opcode. Should the user-level error() be moved to rx_expand_builtin_mvtipl() instead?
On 08/27/2010 11:45 AM, DJ Delorie wrote: > Should the user-level error() be moved to rx_expand_builtin_mvtipl() > instead? Yes please. r~
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; }