This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix problem with stop bits on ia64
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: Fix problem with stop bits on ia64
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Thu, 23 Aug 2001 20:09:58 +0100 (BST)
The code that detects when a stop bit is needed on ia64 has a problem:
the write_count variable is supposed to be always in a range of 0..2,
but if you have a conditional write followed by an unconditional write,
it will end up at 3, and we'll abort. This patch fixes it.
Tested with a bootstrap & run of various testuites, on a Red Hat
internal branch. I can't use the mainline since it no longer supports
my ancient OS release.
Bernd
* config/ia64/ia64.c (rws_update): If !pred, set write_count
instead of incrementing it.
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/ia64/ia64.c,v
retrieving revision 1.96.4.5
diff -u -p -r1.96.4.5 ia64.c
--- ia64.c 2001/08/17 22:35:00 1.96.4.5
+++ ia64.c 2001/08/22 11:21:22
@@ -3920,7 +3924,10 @@ rws_update (rws, regno, flags, pred)
struct reg_flags flags;
int pred;
{
- rws[regno].write_count += pred ? 1 : 2;
+ if (pred)
+ rws[regno].write_count++;
+ else
+ rws[regno].write_count = 2;
rws[regno].written_by_fp |= flags.is_fp;
/* ??? Not tracking and/or across differing predicates. */
rws[regno].written_by_and = flags.is_and;