[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] ARM (Thumb) read from R15
From: |
Ulrich Hecht |
Subject: |
[Qemu-devel] [PATCH] ARM (Thumb) read from R15 |
Date: |
Thu, 28 Jun 2007 16:31:32 +0200 |
User-agent: |
KMail/1.9.5 |
Hi!
QEMU does not set the Thumb bit when reading from R15 in Thumb mode.
Here's the fix:
Index: target-arm/translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-arm/translate.c,v
retrieving revision 1.53
diff -u -r1.53 translate.c
--- target-arm/translate.c 11 Jun 2007 18:59:35 -0000 1.53
+++ target-arm/translate.c 28 Jun 2007 14:29:15 -0000
@@ -307,7 +307,7 @@
if (reg == 15) {
/* normaly, since we updated PC, we need only to add one insn */
if (s->thumb)
- val = (long)s->pc + 2;
+ val = (long)s->pc + 3;
else
val = (long)s->pc + 4;
gen_op_movl_TN_im[t](val);
CU
Uli
--
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
- [Qemu-devel] [PATCH] ARM (Thumb) read from R15,
Ulrich Hecht <=