qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] tcg-alpha: Fix type mismatch errors in cpu_


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 1/3] tcg-alpha: Fix type mismatch errors in cpu_signal_handler.
Date: Sat, 29 Sep 2012 20:26:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120724 Iceowl/1.0b1 Icedove/3.0.11

Am 29.09.2012 20:10, schrieb Richard Henderson:
Signed-off-by: Richard Henderson<address@hidden>
---
  user-exec.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/user-exec.c b/user-exec.c
index ef9b172..1635e4a 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -352,8 +352,8 @@ int cpu_signal_handler(int host_signum, void *pinfo,
  {
      siginfo_t *info = pinfo;
      struct ucontext *uc = puc;
-    uint32_t *pc = uc->uc_mcontext.sc_pc;
-    uint32_t insn = *pc;
+    unsigned long pc = uc->uc_mcontext.sc_pc;

I'd prefer uintptr_t instead of unsigned long.
Otherwise the following type cast is not portable
(even if that doesn't matter currently because
that code is not compiled with MinGW).

Yes, there is more similar code in user-exec.c.

+    uint32_t insn = *(uint32_t *)pc;
      int is_write = 0;

      /* XXX: need kernel patch to get write flag faster */


Regards

Stefan W.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]