qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-arm: Reinsert SRS missing return statements.
@ 2013-04-15  4:50 Peter Chubb
  2013-04-15  7:23 ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Chubb @ 2013-04-15  4:50 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Japheth.Lim, qemu-devel



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 <peter.chubb@nicta.com.au>

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

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

end of thread, other threads:[~2013-04-15 10:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15  4:50 [Qemu-devel] [PATCH] target-arm: Reinsert SRS missing return statements Peter Chubb
2013-04-15  7:23 ` Peter Maydell
2013-04-15  7:29   ` Peter Chubb
2013-04-15  7:32     ` Peter Maydell
2013-04-15  9:53       ` [Qemu-devel] [PATCH v2] target-arm: Reinsert SRS missing return statement Peter Chubb
2013-04-15 10:08         ` Peter Maydell

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