aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-17 23:46:04 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-17 23:46:04 +0000
commitbc51c5c989c12b3936b78c5772a3308629a7484c (patch)
tree73f24550783bf7685add8e5828ffd28815759c7f /cpu-exec.c
parent5069146392ab358b106ed6a7a05440c69924448d (diff)
initial x86-64 host support (Gwenole Beauchesne)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@670 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index c6f52f2780..b6f3de1bb8 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -785,6 +785,21 @@ int cpu_signal_handler(int host_signum, struct siginfo *info,
&uc->uc_sigmask, puc);
}
+#elif defined(__x86_64__)
+
+int cpu_signal_handler(int host_signum, struct siginfo *info,
+ void *puc)
+{
+ struct ucontext *uc = puc;
+ unsigned long pc;
+
+ pc = uc->uc_mcontext.gregs[REG_RIP];
+ return handle_cpu_signal(pc, (unsigned long)info->si_addr,
+ uc->uc_mcontext.gregs[REG_TRAPNO] == 0xe ?
+ (uc->uc_mcontext.gregs[REG_ERR] >> 1) & 1 : 0,
+ &uc->uc_sigmask, puc);
+}
+
#elif defined(__powerpc)
int cpu_signal_handler(int host_signum, struct siginfo *info,