NetBSD x86/64 fixes

db4
Doug Coleman 2007-04-14 05:49:09 -05:00
parent ff0098c0d1
commit ea94662abd
6 changed files with 18 additions and 3 deletions

3
vm/os-netbsd-x86.32.h Normal file
View File

@ -0,0 +1,3 @@
#include <ucontext.h>
#define ucontext_stack_pointer(uap) ((void *)_UC_MACHINE_SP((ucontext_t *)uap))

4
vm/os-netbsd-x86.64.h Normal file
View File

@ -0,0 +1,4 @@
#include <ucontext.h>
#define ucontext_stack_pointer(uap) \
((void *)(((ucontext_t *)(uap))->uc_mcontext.__gregs[_REG_URSP]))

View File

@ -1,6 +1,5 @@
#include <ucontext.h>
#define ucontext_stack_pointer(uap) ((void *)_UC_MACHINE_SP((ucontext_t *)uap))
#define UAP_PROGRAM_COUNTER(uap) _UC_MACHINE_PC((ucontext_t *)uap)
#define UNKNOWN_TYPE_P(file) ((file)->d_type == DT_UNKNOWN)

View File

@ -67,20 +67,29 @@
#endif
#elif defined(__NetBSD__)
#define FACTOR_OS_STRING "netbsd"
#if defined(FACTOR_X86)
#include "os-netbsd-x86.32.h"
#elif defined(FACTOR_AMD64)
#include "os-netbsd-x86.64.h"
#else
#error "Unsupported NetBSD flavor"
#endif
#include "os-netbsd.h"
#elif defined(linux)
#define FACTOR_OS_STRING "linux"
#include "os-linux.h"
#if defined(FACTOR_X86)
#include "os-linux-x86-32.h"
#include "os-linux-x86.32.h"
#elif defined(FACTOR_PPC)
#include "os-unix-ucontext.h"
#include "os-linux-ppc.h"
#elif defined(FACTOR_ARM)
#include "os-linux-arm.h"
#elif defined(FACTOR_AMD64)
#include "os-linux-x86-64.h"
#include "os-linux-x86.64.h"
#else
#error "Unsupported Linux flavor"
#endif