I'm pretty sure that this is needed for "strd r4, [r9], -#8" to work.
We start with 8, add -4 to offset for the 4 that was added (before the
second 32-bit store), negate it as requested yielding -4, add it to
the +4-adjusted offset, and get... net of zero.

--- target-arm/translate.c      (revision 163253)
+++ target-arm/translate.c      (local)
@@ -391,9 +391,9 @@ static inline void gen_add_datah_offset(
     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 {

-- 
Daniel Jacobowitz
CodeSourcery


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to