gcc-2.95pre: Internal compiler error in `gen_add2_insn'
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Mon May 24 17:01:00 GMT 1999
Am Tue, 25 May 1999 schrieb Franz Sirl:
>If not, a simple fix would be to replace the test (REGNO (op1) >=
>FIRST_PSEUDO_REGISTER) with (REGNO_REG_CLASS (REGNO (op1)) != GENERAL_REGS).
>But probably the solution is different, as the code already tries to swap op0
>and op1 lateron. Maybe a gen_rtx_PLUS() should be used for constraints checking
>instead of the gen_add2_insn(), which can abort?
How about this patch? It fixes the testcase, but I haven't run a full bootstrap
yet.
Franz.
* reload1.c (gen_reload): use gen_rtx_SET/PLUS, not gen_add2_insn
Index: reload1.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload1.c,v
retrieving revision 1.145
diff -u -p -r1.145 reload1.c
--- reload1.c 1999/05/08 01:34:55 1.145
+++ reload1.c 1999/05/24 23:53:27
@@ -7833,7 +7833,10 @@ gen_reload (out, in, opnum, type)
if (rtx_equal_p (op0, op1))
op1 = out;
- insn = emit_insn (gen_add2_insn (out, op1));
+ /* gen_add2_insn cannot be used here as below, cause we don't want
+ to abort if the constraints are not fulfilled. */
+ insn = emit_insn (gen_rtx_SET (VOIDmode, out,
+ gen_rtx_PLUS (GET_MODE (in), out, op1)));
/* If that failed, copy the address register to the reload register.
Then add the constant to the reload register. */
More information about the Gcc-patches
mailing list