ARM doubleword post-modify fix (Daniel Jacobowitz).
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 14 Feb 2007 20:17:03 +0000 (20:17 +0000)
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 14 Feb 2007 20:17:03 +0000 (20:17 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2424 c046a42c-6fe2-441c-8c8c-71466251a162

target-arm/translate.c

index cd91bdce8deacf6137436cad0d1f7d695a10aacf..cf46e346ec247f78d7178372966f9ed12e22c56f 100644 (file)
@@ -391,9 +391,9 @@ static inline void gen_add_datah_offset(DisasContext *s, unsigned int insn,
     if (insn & (1 << 22)) {
         /* immediate */
         val = (insn & 0xf) | ((insn >> 4) & 0xf0);
-        val += extra;
         if (!(insn & (1 << 23)))
             val = -val;
+        val += extra;
         if (val != 0)
             gen_op_addl_T1_im(val);
     } else {