Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Masaki Muranaka <monaka@monami-software.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit/rx sim] Fix a "Cycle count not updated!" abort
Date: Fri, 24 Sep 2010 11:25:00 -0000	[thread overview]
Message-ID: <07CF7725-C966-407A-ACBF-FA7EA6618B3F@monami-software.com> (raw)
In-Reply-To: <20100923163939.30023897@mesquite.lan>

Hello, Kevin.

> 	* rx.c (decode_opcode): Declare `rx' as unsigned.

it should be `tx'?

On 2010/09/24, at 8:39, Kevin Buettner wrote:

> 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
> 
> 


  reply	other threads:[~2010-09-24  1:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24  7:42 Kevin Buettner
2010-09-24 11:25 ` Masaki Muranaka [this message]
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=07CF7725-C966-407A-ACBF-FA7EA6618B3F@monami-software.com \
    --to=monaka@monami-software.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    /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