FYI: typo in gcse.c since Jan 28
Alexandre Oliva
oliva@lsd.ic.unicamp.br
Mon Mar 6 19:41:00 GMT 2000
RTH's patch from Jan 28 broke gcse.c:compute_can_copy() such that it
wouldn't compile if AVOID_CCMODE_COPIES was defined, and would
miscompile otherwise. I'm checking this in under the obviously
correct rule. If it doesn't appear obvious to you that this is the
right fix, the original code, before Jan 28's patch, will certainly
make it clear :-)
Here's the hunk in the patch that broke it:
*** 837,860 ****
start_sequence ();
for (i = 0; i < NUM_MACHINE_MODES; i++)
! {
! switch (GET_MODE_CLASS (i))
! {
! case MODE_CC :
#ifdef AVOID_CCMODE_COPIES
! can_copy_p[i] = 0;
#else
! reg = gen_rtx_REG ((enum machine_mode) i, LAST_VIRTUAL_REGISTER + 1);
! insn = emit_insn (gen_rtx_SET (VOIDmode, reg, reg));
! if (recog (PATTERN (insn), insn, NULL_PTR) >= 0)
! can_copy_p[i] = 1;
#endif
! break;
! default :
can_copy_p[i] = 1;
! break;
! }
! }
end_sequence ();
/* Free the objects we just allocated. */
--- 827,846 ----
start_sequence ();
for (i = 0; i < NUM_MACHINE_MODES; i++)
! if (GET_MODE_CLASS (i) == MODE_CC)
! {
#ifdef AVOID_CCMODE_COPIES
! can_copy_p[i] = 0;
#else
! reg = gen_rtx_REG ((enum machine_mode) i, LAST_VIRTUAL_REGISTER + 1);
! insn = emit_insn (gen_rtx_SET (VOIDmode, reg, reg));
! if (recog (PATTERN (insn), insn, NULL_PTR) >= 0)
! can_copy_p[i] = 1;
#endif
! else
can_copy_p[i] = 1;
! }
!
end_sequence ();
/* Free the objects we just allocated. */
and here's the fix I'm installing:
More information about the Gcc-patches
mailing list