qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] ARM post-decrement fix
@ 2007-02-14 20:11 Daniel Jacobowitz
  0 siblings, 0 replies; only message in thread
From: Daniel Jacobowitz @ 2007-02-14 20:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paul Brook

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-14 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-14 20:11 [Qemu-devel] ARM post-decrement fix Daniel Jacobowitz

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