Received: from eggs.gnu.org ([2001:4830:134:3::10]:37835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF82m-0007u5-Ve for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:42:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF82b-00051g-RQ for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:42:44 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:33914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF82b-00050U-Jc for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:42:33 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Aug 2014 16:42:33 -0400 From: Michael Roth Date: Wed, 6 Aug 2014 15:38:45 -0500 Message-Id: <1407357598-21541-36-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 035/108] target-arm: A64: Handle blr lr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: "Edgar E. Iglesias" For linked branches, updates to the link register happen conceptually after the read of the branch target register. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alex Bennée Cc: qemu-stable@nongnu.org Message-id: 1398926097-28097-3-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell (cherry picked from commit 1b505f93bcf605e7c4144fef83bd039b0d4f2576) Signed-off-by: Michael Roth --- target-arm/translate-a64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index a780366..e041f11 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1432,8 +1432,10 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn) switch (opc) { case 0: /* BR */ case 2: /* RET */ + tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn)); break; case 1: /* BLR */ + tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn)); tcg_gen_movi_i64(cpu_reg(s, 30), s->pc); break; case 4: /* ERET */ @@ -1449,7 +1451,6 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn) return; } - tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn)); s->is_jmp = DISAS_JUMP; } -- 1.9.1