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)


Reply via email to