mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-09-29 21:56:26 +00:00
Add support for 64-bit MacOS X for PowerPC (untested beyond "it compiles").
This commit is contained in:
parent
9fa1bbd972
commit
b5ac365858
@ -82,7 +82,7 @@ enum transfer_size_t {
|
|||||||
SIZE_QUAD, // 8 bytes
|
SIZE_QUAD, // 8 bytes
|
||||||
};
|
};
|
||||||
|
|
||||||
#if (defined(powerpc) || defined(__powerpc__) || defined(__ppc__))
|
#if (defined(powerpc) || defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__))
|
||||||
// Addressing mode
|
// Addressing mode
|
||||||
enum addressing_mode_t {
|
enum addressing_mode_t {
|
||||||
MODE_UNKNOWN,
|
MODE_UNKNOWN,
|
||||||
@ -613,6 +613,18 @@ if (ret != KERN_SUCCESS) { \
|
|||||||
#define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction
|
#define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction
|
||||||
#define SIGSEGV_REGISTER_FILE (unsigned long *)&sip->thr_state.srr0, (unsigned long *)&sip->thr_state.r0
|
#define SIGSEGV_REGISTER_FILE (unsigned long *)&sip->thr_state.srr0, (unsigned long *)&sip->thr_state.r0
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __ppc64__
|
||||||
|
#define SIGSEGV_EXCEPTION_STATE_TYPE ppc_exception_state64_t
|
||||||
|
#define SIGSEGV_EXCEPTION_STATE_FLAVOR PPC_EXCEPTION_STATE64
|
||||||
|
#define SIGSEGV_EXCEPTION_STATE_COUNT PPC_EXCEPTION_STATE64_COUNT
|
||||||
|
#define SIGSEGV_FAULT_ADDRESS sip->exc_state.dar
|
||||||
|
#define SIGSEGV_THREAD_STATE_TYPE ppc_thread_state64_t
|
||||||
|
#define SIGSEGV_THREAD_STATE_FLAVOR PPC_THREAD_STATE64
|
||||||
|
#define SIGSEGV_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
|
||||||
|
#define SIGSEGV_FAULT_INSTRUCTION sip->thr_state.srr0
|
||||||
|
#define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction
|
||||||
|
#define SIGSEGV_REGISTER_FILE (unsigned long *)&sip->thr_state.srr0, (unsigned long *)&sip->thr_state.r0
|
||||||
|
#endif
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define SIGSEGV_EXCEPTION_STATE_TYPE struct i386_exception_state
|
#define SIGSEGV_EXCEPTION_STATE_TYPE struct i386_exception_state
|
||||||
#define SIGSEGV_EXCEPTION_STATE_FLAVOR i386_EXCEPTION_STATE
|
#define SIGSEGV_EXCEPTION_STATE_FLAVOR i386_EXCEPTION_STATE
|
||||||
@ -1149,7 +1161,7 @@ static bool ix86_skip_instruction(unsigned long * regs)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Decode and skip PPC instruction
|
// Decode and skip PPC instruction
|
||||||
#if (defined(powerpc) || defined(__powerpc__) || defined(__ppc__))
|
#if (defined(powerpc) || defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__))
|
||||||
static bool powerpc_skip_instruction(unsigned long * nip_p, unsigned long * regs)
|
static bool powerpc_skip_instruction(unsigned long * nip_p, unsigned long * regs)
|
||||||
{
|
{
|
||||||
instruction_t instr;
|
instruction_t instr;
|
||||||
|
Loading…
Reference in New Issue
Block a user