mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-23 04:33:24 +00:00
apply the no-stack-frame optimization in op_invoke_*() to MacOS X hosts too
This commit is contained in:
parent
1313fe589b
commit
73c6d2d2c0
@ -346,7 +346,20 @@ void OPPROTO op_jmp_A0(void)
|
||||
}
|
||||
|
||||
// Register calling conventions based arches don't need a stack frame
|
||||
#if defined(__powerpc__) || defined(__x86_64__)
|
||||
#if (defined __APPLE__ && defined __MACH__) && defined __ppc__
|
||||
#define DEFINE_OP(NAME, CODE) \
|
||||
static void OPPROTO impl_##NAME(void) __attribute__((used)); \
|
||||
void OPPROTO impl_##NAME(void) \
|
||||
{ \
|
||||
asm volatile (#NAME ":"); \
|
||||
CODE; \
|
||||
FORCE_RET(); \
|
||||
asm volatile ("." #NAME ":"); \
|
||||
asm volatile (ASM_SIZE(NAME)); \
|
||||
} \
|
||||
extern void OPPROTO NAME(void) __attribute__((weak_import)); \
|
||||
asm(".set helper_" #NAME "," #NAME);
|
||||
#elif defined(__powerpc__) || defined(__x86_64__)
|
||||
#define DEFINE_OP(NAME, CODE) \
|
||||
static void OPPROTO impl_##NAME(void) __attribute__((used)); \
|
||||
void OPPROTO impl_##NAME(void) \
|
||||
|
Loading…
Reference in New Issue
Block a user