mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-05-31 16:41:28 +00:00
Added registers for OpenIndiana x86_64 and other fixes
OpenIndiana/illumos is based on OpenSolaris 10 and uses the Solaris code paths. Current status: Basilisk II: Working but cannot ignore illegal instructions SheepShaver: Doesn't compile because of same problem If the SIGSEGV skip instruction handler were fixed, both programs would likely work.
This commit is contained in:
parent
2a74fdaab6
commit
604baaa289
|
@ -281,6 +281,13 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int
|
||||||
#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS
|
#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS
|
||||||
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
#include <sys/regset.h>
|
||||||
|
#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.gregs)
|
||||||
|
#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[REG_RIP]
|
||||||
|
#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS
|
||||||
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
#if (defined(i386) || defined(__i386__))
|
#if (defined(i386) || defined(__i386__))
|
||||||
|
@ -893,6 +900,24 @@ enum {
|
||||||
X86_REG_EBP = EBP,
|
X86_REG_EBP = EBP,
|
||||||
X86_REG_ESI = ESI,
|
X86_REG_ESI = ESI,
|
||||||
X86_REG_EDI = EDI
|
X86_REG_EDI = EDI
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
X86_REG_R8 = REG_R8,
|
||||||
|
X86_REG_R9 = REG_R9,
|
||||||
|
X86_REG_R10 = REG_R10,
|
||||||
|
X86_REG_R11 = REG_R11,
|
||||||
|
X86_REG_R12 = REG_R12,
|
||||||
|
X86_REG_R13 = REG_R13,
|
||||||
|
X86_REG_R14 = REG_R14,
|
||||||
|
X86_REG_R15 = REG_R15,
|
||||||
|
X86_REG_EDI = EDI,
|
||||||
|
X86_REG_ESI = ESI,
|
||||||
|
X86_REG_EBP = EBP,
|
||||||
|
X86_REG_EBX = EBX,
|
||||||
|
X86_REG_EDX = EDX,
|
||||||
|
X86_REG_EAX = EAX,
|
||||||
|
X86_REG_ECX = ECX,
|
||||||
|
X86_REG_ESP = ESP,
|
||||||
|
X86_REG_EIP = REG_RIP
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -774,8 +774,11 @@ netbsd*)
|
||||||
ETHERSRC=ether_unix.cpp
|
ETHERSRC=ether_unix.cpp
|
||||||
;;
|
;;
|
||||||
solaris*)
|
solaris*)
|
||||||
AUDIOSRC=Solaris/audio_solaris.cpp
|
|
||||||
DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
|
DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
|
||||||
|
dnl Needed for sys/socket.h
|
||||||
|
LIBS="$LIBS -lsocket -lnsl"
|
||||||
|
dnl Needed for SDL2
|
||||||
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||||
;;
|
;;
|
||||||
irix*)
|
irix*)
|
||||||
AUDIOSRC=Irix/audio_irix.cpp
|
AUDIOSRC=Irix/audio_irix.cpp
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(sgi) || (defined(__APPLE__) && defined(__MACH__))
|
#if defined(__FreeBSD__) || defined (__sun__) || defined(sgi) || (defined(__APPLE__) && defined(__MACH__))
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,18 @@
|
||||||
#include "sysdeps.h"
|
#include "sysdeps.h"
|
||||||
|
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_FILIO_H
|
||||||
|
#include <sys/filio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <linux/lp.h>
|
#include <linux/lp.h>
|
||||||
#include <linux/major.h>
|
#include <linux/major.h>
|
||||||
|
|
|
@ -74,7 +74,12 @@ RCSID("$OpenBSD: sshpty.c,v 1.4 2001/12/19 07:18:56 deraadt Exp $");
|
||||||
#define fatal(x) do { printf("Fatal error: %s", x); return 0; } while(0)
|
#define fatal(x) do { printf("Fatal error: %s", x); return 0; } while(0)
|
||||||
#endif /* not in BasiliskII */
|
#endif /* not in BasiliskII */
|
||||||
|
|
||||||
|
#ifdef __sun__
|
||||||
|
#define mysig_t sig_atomic_t
|
||||||
|
#else
|
||||||
#define mysig_t sig_t
|
#define mysig_t sig_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#define mysignal signal
|
#define mysignal signal
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
|
|
@ -281,6 +281,13 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int
|
||||||
#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS
|
#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS
|
||||||
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
#include <sys/regset.h>
|
||||||
|
#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.gregs)
|
||||||
|
#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[REG_RIP]
|
||||||
|
#define SIGSEGV_REGISTER_FILE (SIGSEGV_REGISTER_TYPE *)SIGSEGV_CONTEXT_REGS
|
||||||
|
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
#if (defined(i386) || defined(__i386__))
|
#if (defined(i386) || defined(__i386__))
|
||||||
|
@ -893,6 +900,24 @@ enum {
|
||||||
X86_REG_EBP = EBP,
|
X86_REG_EBP = EBP,
|
||||||
X86_REG_ESI = ESI,
|
X86_REG_ESI = ESI,
|
||||||
X86_REG_EDI = EDI
|
X86_REG_EDI = EDI
|
||||||
|
#elif defined(__x86_64__)
|
||||||
|
X86_REG_R8 = REG_R8,
|
||||||
|
X86_REG_R9 = REG_R9,
|
||||||
|
X86_REG_R10 = REG_R10,
|
||||||
|
X86_REG_R11 = REG_R11,
|
||||||
|
X86_REG_R12 = REG_R12,
|
||||||
|
X86_REG_R13 = REG_R13,
|
||||||
|
X86_REG_R14 = REG_R14,
|
||||||
|
X86_REG_R15 = REG_R15,
|
||||||
|
X86_REG_EDI = EDI,
|
||||||
|
X86_REG_ESI = ESI,
|
||||||
|
X86_REG_EBP = EBP,
|
||||||
|
X86_REG_EBX = EBX,
|
||||||
|
X86_REG_EDX = EDX,
|
||||||
|
X86_REG_EAX = EAX,
|
||||||
|
X86_REG_ECX = ECX,
|
||||||
|
X86_REG_ESP = ESP,
|
||||||
|
X86_REG_EIP = REG_RIP
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,7 +46,7 @@ AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [d
|
||||||
esac],
|
esac],
|
||||||
[WANT_GTK="gtk2 gtk"])
|
[WANT_GTK="gtk2 gtk"])
|
||||||
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=no])
|
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=no])
|
||||||
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes or 'precompiled'], [DYNGEN_CC=$withval])
|
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes or 'precompiled'], [DYNGEN_CC=$withval], [DYNGEN_CC=precompiled])
|
||||||
|
|
||||||
AC_ARG_WITH(bincue,
|
AC_ARG_WITH(bincue,
|
||||||
AS_HELP_STRING([--with-bincue], [Allow cdrom image files in bin/cue mode]))
|
AS_HELP_STRING([--with-bincue], [Allow cdrom image files in bin/cue mode]))
|
||||||
|
@ -656,6 +656,12 @@ netbsd*)
|
||||||
EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S"
|
EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
solaris*)
|
||||||
|
dnl Needed for sys/socket.h
|
||||||
|
LDFLAGS="$LDFLAGS -lsocket -lnsl"
|
||||||
|
dnl Needed for SDL2
|
||||||
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||||
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
ETHERSRC=ether_unix.cpp
|
ETHERSRC=ether_unix.cpp
|
||||||
if [[ "x$EMULATED_PPC" = "xno" ]]; then
|
if [[ "x$EMULATED_PPC" = "xno" ]]; then
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/if_arp.h>
|
#include <net/if_arp.h>
|
||||||
|
|
||||||
|
#ifdef __sun__
|
||||||
|
#include <sys/sockio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
||||||
#include "user_strings.h"
|
#include "user_strings.h"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user