qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ARM (Thumb) read from R15
@ 2007-06-28 14:31 Ulrich Hecht
  2007-06-28 15:30 ` Ulrich Hecht
  2007-06-30  2:19 ` Paul Brook
  0 siblings, 2 replies; 6+ messages in thread
From: Ulrich Hecht @ 2007-06-28 14:31 UTC (permalink / raw)
  To: qemu-devel

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-02 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 14:31 [Qemu-devel] [PATCH] ARM (Thumb) read from R15 Ulrich Hecht
2007-06-28 15:30 ` Ulrich Hecht
2007-06-28 15:53   ` Ulrich Hecht
2007-06-30  2:19 ` Paul Brook
2007-07-02 11:12   ` Ulrich Hecht
2007-07-02 13:17     ` Paul Brook

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