* A patch for regmove.c
@ 1998-06-13 12:33 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 1998-06-13 12:33 UTC (permalink / raw)
To: egcs; +Cc: egcs-patches
>
> My patched rebuild failed in stage2 while running the stage2 compiler to
> build the SYSCALLS.c file. I suspect another bug in the recent regmove
> changes.
>
> Jim
>
Hi, Jim,
How about this patch? It seems to work for me. We have to check
REG_LIVE_LENGTH before validate_replace_rtx. Otherwise, it may be
too late.
--
H.J. Lu (hjl@gnu.org)
---
Index: regmove.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/regmove.c,v
retrieving revision 1.1.1.18
diff -u -r1.1.1.18 regmove.c
--- regmove.c 1998/06/12 15:07:14 1.1.1.18
+++ regmove.c 1998/06/13 17:19:03
@@ -555,7 +555,14 @@
int insn_uid;
int move_uid;
+ /* ??? A REG_LIVE_LENGTH of -1 or -2 is special. It is wrong to increment
+ them, particular since this may result in a value of zero which is
+ invalid. We obviously need some special handling of these case. For now,
+ we just reject them. */
+
if (GET_CODE (src) == REG && GET_CODE (dest) == REG
+ && REG_LIVE_LENGTH (REGNO (dest)) >= 0
+ && REG_LIVE_LENGTH (REGNO (src)) >= 0
&& (set = single_set (insn)) != NULL_RTX
&& !reg_mentioned_p (dest, SET_SRC (set))
&& validate_replace_rtx (src, dest, insn))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-06-13 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-13 12:33 A patch for regmove.c H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).