From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URbNB-0005V3-FA for qemu-devel@nongnu.org; Mon, 15 Apr 2013 00:50:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URbNA-0000Li-77 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 00:50:33 -0400 Received: from lemon.ertos.nicta.com.au ([203.143.174.143]:46052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URbN9-0000Ko-T9 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 00:50:32 -0400 Date: Mon, 15 Apr 2013 14:50:16 +1000 Message-ID: <84sj2s75yv.wl%peter@chubb.wattle.id.au> From: Peter Chubb MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: [Qemu-devel] [PATCH] target-arm: Reinsert SRS missing return statements. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Japheth.Lim@nicta.com.au, qemu-devel@nongnu.org Since patch 81465888c5306cd94abb9847e560796fd13d3c2f target-arm: factor out handling of SRS instruction the SRS instruction has not worked in QEMU. The problem is a return directive that was removed in the refactoring, so after decoding the instruction, qemu would fall through to do stuff that it should not have done. Signed-off-by: Peter Chubb diff --git a/target-arm/translate.c b/target-arm/translate.c index 35a21be..c870246 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -6762,6 +6762,7 @@ static void disas_arm_insn(CPUARMState * env, DisasContext *s) } ARCH(6); gen_srs(s, (insn & 0x1f), (insn >> 23) & 3, insn & (1 << 21)); + return; } else if ((insn & 0x0e50ffe0) == 0x08100a00) { /* rfe */ int32_t offset; @@ -8209,6 +8210,7 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw /* srs */ gen_srs(s, (insn & 0x1f), (insn & (1 << 24)) ? 1 : 2, insn & (1 << 21)); + return; } } else { int i, loaded_base = 0; -- 1.7.10.4 Dr Peter Chubb peter.chubb AT nicta.com.au http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA