From: Aurelien Jarno <aurelien@aurel32.net>
To: Stefan Weil <weil@mail.berlios.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [6936] target-mips: optimize gen_compute_branch()
Date: Mon, 30 Mar 2009 00:11:49 +0200 [thread overview]
Message-ID: <20090329221149.GC12026@hall.aurel32.net> (raw)
In-Reply-To: <49CFDC9E.6080405@mail.berlios.de>
On Sun, Mar 29, 2009 at 10:39:58PM +0200, Stefan Weil wrote:
> Aurelien Jarno schrieb:
> > Revision: 6936
> > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6936
> > Author: aurel32
> > Date: 2009-03-29 01:18:52 +0000 (Sun, 29 Mar 2009)
> > Log Message:
> > -----------
> > target-mips: optimize gen_compute_branch()
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> >
> > Modified Paths:
> > --------------
> > trunk/target-mips/cpu.h
> > trunk/target-mips/machine.c
> > trunk/target-mips/translate.c
> >
> > Modified: trunk/target-mips/cpu.h
> > ===================================================================
> > --- trunk/target-mips/cpu.h 2009-03-29 01:18:43 UTC (rev 6935)
> > +++ trunk/target-mips/cpu.h 2009-03-29 01:18:52 UTC (rev 6936)
> > @@ -443,7 +443,7 @@
> > #define MIPS_HFLAG_BL 0x0C00 /* Likely branch */
> > #define MIPS_HFLAG_BR 0x1000 /* branch to register (can't link TB) */
> > target_ulong btarget; /* Jump / branch target */
> > - int bcond; /* Branch condition (if needed) */
> > + target_ulong bcond; /* Branch condition (if needed) */
> >
> > int SYNCI_Step; /* Address step size for SYNCI */
> > int CCRes; /* Cycle count resolution/divisor */
> >
> > Modified: trunk/target-mips/machine.c
> > ===================================================================
> > --- trunk/target-mips/machine.c 2009-03-29 01:18:43 UTC (rev 6935)
> > +++ trunk/target-mips/machine.c 2009-03-29 01:18:52 UTC (rev 6936)
> > @@ -91,7 +91,8 @@
> > qemu_put_sbe32s(f, &env->error_code);
> > qemu_put_be32s(f, &env->hflags);
> > qemu_put_betls(f, &env->btarget);
> > - qemu_put_sbe32s(f, &env->bcond);
> > + i = env->bcond;
> > + qemu_put_sbe32s(f, &i);
> >
>
> bcond is now target_ulong (32 or 64 bit target), i is int.
> Are the upper 32 bits of bcond not needed?
No they are not used as this variable only contains 0 or 1, so saving
only the lower 32 bits is fine.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2009-03-29 22:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-29 1:18 [Qemu-devel] [6936] target-mips: optimize gen_compute_branch() Aurelien Jarno
2009-03-29 20:39 ` Stefan Weil
2009-03-29 22:11 ` Aurelien Jarno [this message]
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=20090329221149.GC12026@hall.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=weil@mail.berlios.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.