qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Zaborowski <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4204] Fix the offset in Thumb bl instruction.
Date: Sun, 13 Apr 2008 13:25:32 +0000	[thread overview]
Message-ID: <E1Jl2D6-0004DN-6t@cvs.savannah.gnu.org> (raw)

Revision: 4204
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4204
Author:   balrog
Date:     2008-04-13 13:25:31 +0000 (Sun, 13 Apr 2008)

Log Message:
-----------
Fix the offset in Thumb bl instruction.

Modified Paths:
--------------
    trunk/target-arm/translate.c

Modified: trunk/target-arm/translate.c
===================================================================
--- trunk/target-arm/translate.c	2008-04-13 03:15:14 UTC (rev 4203)
+++ trunk/target-arm/translate.c	2008-04-13 13:25:31 UTC (rev 4204)
@@ -6912,7 +6912,7 @@
             /* Second half of bl.  */
             offset = ((insn & 0x7ff) << 1) | 1;
             tmp = load_reg(s, 14);
-            tcg_gen_addi_i32(tmp, tmp, 14);
+            tcg_gen_addi_i32(tmp, tmp, offset);
 
             tmp2 = new_tmp();
             tcg_gen_movi_i32(tmp2, s->pc | 1);
@@ -8308,7 +8308,7 @@
             tmp = load_reg(s, 13);
             val = (insn & 0x7f) * 4;
             if (insn & (1 << 7))
-              val = -(int32_t)val;
+                val = -(int32_t)val;
             tcg_gen_addi_i32(tmp, tmp, val);
             store_reg(s, 13, tmp);
             break;
@@ -8529,7 +8529,7 @@
 
     case 15:
         if (disas_thumb2_insn(env, s, insn))
-          goto undef32;
+            goto undef32;
         break;
     }
     return;

                 reply	other threads:[~2008-04-13 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1Jl2D6-0004DN-6t@cvs.savannah.gnu.org \
    --to=balrogg@gmail.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).