OpenIndiana: Skip instruction fix

Fixes the register definitions so that instruction skip works.
Both Basilisk II and SheepShaver now work (without JIT) on
Solaris-based OSes such as OpenIndiana.
This commit is contained in:
robxnano 2022-10-15 00:15:37 +01:00
parent b3ebcd595c
commit 4217fc73cd
5 changed files with 23 additions and 18 deletions

View File

@ -907,14 +907,14 @@ enum {
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_EDI = REG_RDI,
X86_REG_ESI = REG_RSI,
X86_REG_EBP = REG_RBP,
X86_REG_EBX = REG_RBX,
X86_REG_EDX = REG_RDX,
X86_REG_EAX = REG_RAX,
X86_REG_ECX = REG_RCX,
X86_REG_ESP = REG_RSP,
X86_REG_EIP = REG_RIP
#endif
};

View File

@ -86,7 +86,7 @@ typedef unsigned long vm_uintptr_t;
#define MAP_EXTRA_FLAGS (MAP_32BIT)
#ifdef HAVE_MMAP_VM
#if (defined(__linux__) && defined(__i386__)) || defined(__FreeBSD__) || defined(__NetBSD__) || HAVE_LINKER_SCRIPT
#if (defined(__linux__) && defined(__i386__)) || defined(__sun__) || defined(__FreeBSD__) || defined(__NetBSD__) || HAVE_LINKER_SCRIPT
/* Force a reasonnable address below 0x80000000 on x86 so that we
don't get addresses above when the program is run on AMD64.
NOTE: this is empirically determined on Linux/x86. */

View File

@ -39,6 +39,11 @@
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
#ifdef __sun__
#define BSD_COMP 1
#endif
#include <sys/ioctl.h>
#include <sys/socket.h>

View File

@ -75,7 +75,7 @@ RCSID("$OpenBSD: sshpty.c,v 1.4 2001/12/19 07:18:56 deraadt Exp $");
#endif /* not in BasiliskII */
#ifdef __sun__
#define mysig_t sig_atomic_t
#define mysig_t void*
#else
#define mysig_t sig_t
#endif

View File

@ -907,14 +907,14 @@ enum {
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_EDI = REG_RDI,
X86_REG_ESI = REG_RSI,
X86_REG_EBP = REG_RBP,
X86_REG_EBX = REG_RBX,
X86_REG_EDX = REG_RDX,
X86_REG_EAX = REG_RAX,
X86_REG_ECX = REG_RCX,
X86_REG_ESP = REG_RSP,
X86_REG_EIP = REG_RIP
#endif
};