All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] tcg-hppa get it working, v2.1
@ 2010-03-16 15:50 Richard Henderson
  2010-03-12 14:58 ` [Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler Richard Henderson
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Richard Henderson @ 2010-03-16 15:50 UTC (permalink / raw)
  To: qemu-devel

Gah.  Left out --thread and -s options to format-patch.
Sorry about that.


r~



Richard Henderson (4):
  tcg-hppa: Fix const errors in hppa-dis.c.
  tcg-hppa: Fix 64-bit argument ordering.
  tcg-hppa: Finish the port.
  tcg-hppa: Compute is_write in cpu_signal_handler.

 configure             |    5 +-
 cpu-exec.c            |   38 +-
 hppa-dis.c            |    4 +-
 tcg/hppa/tcg-target.c | 1846 +++++++++++++++++++++++++++++++++++--------------
 tcg/hppa/tcg-target.h |  142 +---
 tcg/tcg.c             |   12 +-
 6 files changed, 1387 insertions(+), 660 deletions(-)

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler.
@ 2010-03-12 14:58 Richard Henderson
  0 siblings, 0 replies; 18+ messages in thread
From: Richard Henderson @ 2010-03-12 14:58 UTC (permalink / raw)
  To: qemu-devel

---
 cpu-exec.c |   38 +++++++++++++++++++++++++++++++-------
 1 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/cpu-exec.c b/cpu-exec.c
index bcfcda2..14204f4 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -1193,15 +1193,39 @@ int cpu_signal_handler(int host_signum, void *pinfo,
 {
     struct siginfo *info = pinfo;
     struct ucontext *uc = puc;
-    unsigned long pc;
-    int is_write;
+    unsigned long pc = uc->uc_mcontext.sc_iaoq[0];
+    uint32_t insn = *(uint32_t *)pc;
+    int is_write = 0;
+
+    /* XXX: need kernel patch to get write flag faster.  */
+    switch (insn >> 26) {
+    case 0x1a: /* STW */
+    case 0x19: /* STH */
+    case 0x18: /* STB */
+    case 0x1b: /* STWM */
+        is_write = 1;
+        break;
+
+    case 0x09: /* CSTWX, FSTWX, FSTWS */
+    case 0x0b: /* CSTDX, FSTDX, FSTDS */
+        /* Distinguish from coprocessor load ... */
+        is_write = (insn >> 9) & 1;
+        break;
+
+    case 0x03:
+        switch ((insn >> 6) & 15) {
+        case 0xa: /* STWS */
+        case 0x9: /* STHS */
+        case 0x8: /* STBS */
+        case 0xe: /* STWAS */
+        case 0xc: /* STBYS */
+            is_write = 1;
+        }
+        break;
+    }
 
-    pc = uc->uc_mcontext.sc_iaoq[0];
-    /* FIXME: compute is_write */
-    is_write = 0;
     return handle_cpu_signal(pc, (unsigned long)info->si_addr, 
-                             is_write,
-                             &uc->uc_sigmask, puc);
+                             is_write, &uc->uc_sigmask, puc);
 }
 
 #else
-- 
1.6.6.1

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

end of thread, other threads:[~2010-03-23 21:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 15:50 [Qemu-devel] [PATCH 0/4] tcg-hppa get it working, v2.1 Richard Henderson
2010-03-12 14:58 ` [Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler Richard Henderson
2010-03-17  2:10   ` Stuart Brady
2010-03-17  2:23     ` Stuart Brady
2010-03-17 14:49       ` Richard Henderson
2010-03-16 15:52 ` [Qemu-devel] [PATCH 1/4] tcg-hppa: Fix const errors in hppa-dis.c Richard Henderson
2010-03-17  1:46   ` Stuart Brady
2010-03-23 21:26   ` Aurelien Jarno
2010-03-16 15:52 ` [Qemu-devel] [PATCH 2/4] tcg-hppa: Fix 64-bit argument ordering Richard Henderson
2010-03-17  1:49   ` Stuart Brady
2010-03-23 21:27   ` Aurelien Jarno
2010-03-16 15:53 ` [Qemu-devel] [PATCH 3/4] tcg-hppa: Finish the port Richard Henderson
2010-03-17  1:58   ` Stuart Brady
2010-03-17 14:56     ` Richard Henderson
2010-03-17 17:04       ` Richard Henderson
2010-03-17 20:01       ` Stuart Brady
2010-03-23 21:28       ` Aurelien Jarno
  -- strict thread matches above, loose matches on Subject: below --
2010-03-12 14:58 [Qemu-devel] [PATCH 4/4] tcg-hppa: Compute is_write in cpu_signal_handler Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.