From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] Bugfix for 64-bit targets
Date: Wed, 11 Aug 2004 01:22:50 +0100 [thread overview]
Message-ID: <200408110122.50589.paul@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
The attached patch fixes a bug in arm target emulation on hosts where
sizeof(int) > 4. On these targets the offset wouldn't be properly sign
extended.
Paul
[-- Attachment #2: patch.qemu_bl64 --]
[-- Type: text/x-diff, Size: 993 bytes --]
Index: translate.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/translate.c,v
retrieving revision 1.10
diff -u -p -r1.10 translate.c
--- translate.c 22 Jun 2004 10:55:49 -0000 1.10
+++ translate.c 11 Aug 2004 00:17:59 -0000
@@ -690,15 +867,15 @@ static void disas_arm_insn(DisasContext
case 0xa:
case 0xb:
{
- int offset;
+ int32_t offset;
/* branch (and link) */
- val = (int)s->pc;
+ val = (int32_t)s->pc;
if (insn & (1 << 24)) {
gen_op_movl_T0_im(val);
gen_op_movl_reg_TN[0][14]();
}
- offset = (((int)insn << 8) >> 8);
+ offset = (((int32_t)insn << 8) >> 8);
val += (offset << 2) + 4;
gen_op_jmp((long)s->tb, val);
s->is_jmp = DISAS_TB_JUMP;
next reply other threads:[~2004-08-11 0:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-11 0:22 Paul Brook [this message]
2004-08-15 14:57 ` [Qemu-devel] [patch] Bugfix for 64-bit targets Fabrice Bellard
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=200408110122.50589.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).