diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-10-28 10:55:42 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2009-10-28 10:55:42 +0000 |
commit | 3deaf5aa6ab23d2f8b0250ea63908a30ff2726af (patch) | |
tree | 5109988bec768a066a9b7b39f4411f422b3f67b3 /cpu-exec.c | |
parent | 492fcd3f081d5f297919554aa092d744632e5a7c (diff) | |
parent | 93db66850d99fd9885edeff6af5679be51e1c610 (diff) |
Merge commit '93db66850d99fd9885edeff6af5679be51e1c610' into upstream-merge
* commit '93db66850d99fd9885edeff6af5679be51e1c610': (81 commits)
ne2k_isa: use qdev properties for configuration.
qdev/net: common nic property bits
qdev: add vlan property
qdev: add netdev property
qdev: mac addr property fixups
net: add macaddr type.
Send a RARP packet after migration.
multiboot.S patch for old as(1) (was: Re: [Qemu-devel] Some OpenBSD/amd64 build fixes)
raw/linux-aio: Also initialize POSIX AIO
qcow2: Fix grow_refcount_table error handling
usb-linux: return USB_RET_STALL on -EPIPE
Makefile: Change make to be quiet again when doing nothing
eepro100: Restructure code
target-arm: use native tcg-ops for ror/bic/vorn
target-arm: fix neon shift helper functions
target-arm: fix neon vsri, vshl and vsli ops
target-arm: allow modifying vfp fpexc en bit only
target-arm: add support for neon vld1.64/vst1.64 instructions
target-arm: fix neon vshrn/vrshrn ops
target-arm: fix incorrect temporary variable freeing
...
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 8550617af..675e4ccbe 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -813,6 +813,20 @@ static inline int handle_cpu_signal(unsigned long pc, unsigned long address, # define TRAP_sig(context) ((context)->uc_mcontext->es.trapno) # define ERROR_sig(context) ((context)->uc_mcontext->es.err) # define MASK_sig(context) ((context)->uc_sigmask) +#elif defined (__NetBSD__) +# include <ucontext.h> + +# define EIP_sig(context) ((context)->uc_mcontext.__gregs[_REG_EIP]) +# define TRAP_sig(context) ((context)->uc_mcontext.__gregs[_REG_TRAPNO]) +# define ERROR_sig(context) ((context)->uc_mcontext.__gregs[_REG_ERR]) +# define MASK_sig(context) ((context)->uc_sigmask) +#elif defined (__FreeBSD__) || defined(__DragonFly__) +# include <ucontext.h> + +# define EIP_sig(context) (*((unsigned long*)&(context)->uc_mcontext.mc_eip)) +# define TRAP_sig(context) ((context)->uc_mcontext.mc_trapno) +# define ERROR_sig(context) ((context)->uc_mcontext.mc_err) +# define MASK_sig(context) ((context)->uc_sigmask) #elif defined(__OpenBSD__) # define EIP_sig(context) ((context)->sc_eip) # define TRAP_sig(context) ((context)->sc_trapno) @@ -829,7 +843,9 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) { siginfo_t *info = pinfo; -#if defined(__OpenBSD__) +#if defined(__NetBSD__) || defined (__FreeBSD__) || defined(__DragonFly__) + ucontext_t *uc = puc; +#elif defined(__OpenBSD__) struct sigcontext *uc = puc; #else struct ucontext *uc = puc; @@ -863,6 +879,13 @@ int cpu_signal_handler(int host_signum, void *pinfo, #define TRAP_sig(context) ((context)->sc_trapno) #define ERROR_sig(context) ((context)->sc_err) #define MASK_sig(context) ((context)->sc_mask) +#elif defined (__FreeBSD__) || defined(__DragonFly__) +#include <ucontext.h> + +#define PC_sig(context) (*((unsigned long*)&(context)->uc_mcontext.mc_rip)) +#define TRAP_sig(context) ((context)->uc_mcontext.mc_trapno) +#define ERROR_sig(context) ((context)->uc_mcontext.mc_err) +#define MASK_sig(context) ((context)->uc_sigmask) #else #define PC_sig(context) ((context)->uc_mcontext.gregs[REG_RIP]) #define TRAP_sig(context) ((context)->uc_mcontext.gregs[REG_TRAPNO]) @@ -875,7 +898,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, { siginfo_t *info = pinfo; unsigned long pc; -#ifdef __NetBSD__ +#if defined(__NetBSD__) || defined (__FreeBSD__) || defined(__DragonFly__) ucontext_t *uc = puc; #elif defined(__OpenBSD__) struct sigcontext *uc = puc; |