From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: [commit/rx sim] Fix a "Cycle count not updated!" abort
Date: Fri, 24 Sep 2010 07:42:00 -0000 [thread overview]
Message-ID: <20100923163939.30023897@mesquite.lan> (raw)
I've commited the patch below.
In rx.c, the RXO_suntil case contains the following line:
cycles (3 + 3 * (tx / 4) + 3 * (tx % 4));
If tx (which DJ tells me is the transaction count) is -1, that
expression reduces to 0 which ends up meaning that the operation in
question took 0 cycles. This causes a sanity check at the top of the
loop to fail printing the message:
Cycle count not updated! id RXO_suntil
The simulator aborts when this happens.
DJ agrees that negative tx values make no sense, leading to the
patch below.
With this patch in place, I'm able to run the gdb.base/break.exp
test program to completion. Without it, it aborts in the midst
of executing the print statement.
I still see a number of failures when running gdb.base/break.exp
though. I'll address those in the next patch.
Kevin
sim/rx/ChangeLog:
* rx.c (decode_opcode): Declare `rx' as unsigned.
Index: rx.c
===================================================================
RCS file: /cvs/src/src/sim/rx/rx.c,v
retrieving revision 1.6
diff -u -p -r1.6 rx.c
--- rx.c 29 Jul 2010 18:41:28 -0000 1.6
+++ rx.c 23 Sep 2010 23:25:38 -0000
@@ -878,7 +878,7 @@ decode_opcode ()
unsigned long long prev_cycle_count;
#endif
#ifdef CYCLE_ACCURATE
- int tx;
+ unsigned int tx;
#endif
#ifdef CYCLE_STATS
next reply other threads:[~2010-09-23 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-24 7:42 Kevin Buettner [this message]
2010-09-24 11:25 ` Masaki Muranaka
2010-09-24 12:39 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100923163939.30023897@mesquite.lan \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox