mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-18 18:05:21 +00:00
Fix for MacOS X assembler, why don't Apple use GNU as?
This commit is contained in:
parent
d0da2a0dda
commit
2de44f1910
@ -710,7 +710,7 @@ C_SYMBOL_NAME(call_macos7):
|
||||
* Native resource manager patches
|
||||
*/
|
||||
|
||||
ASM_MACRO_START do_get_resource XLM_OLD_GET_RESOURCE
|
||||
ASM_MACRO_START do_get_resource ASM_MACRO_ARG0_DEF
|
||||
// Create stack frame
|
||||
mflr r0
|
||||
stw r0,8(r1)
|
||||
@ -721,7 +721,7 @@ ASM_MACRO_START do_get_resource XLM_OLD_GET_RESOURCE
|
||||
stw r4,56+4(r1)
|
||||
|
||||
// Call old routine
|
||||
lwz r0,\XLM_OLD_GET_RESOURCE(0)
|
||||
lwz r0,ASM_MACRO_ARG0(0)
|
||||
lwz r2,XLM_RES_LIB_TOC(0)
|
||||
mtctr r0
|
||||
bctrl
|
||||
|
@ -25,6 +25,10 @@
|
||||
#if (defined(__APPLE__) && defined(__MACH__))
|
||||
#define C_SYMBOL_NAME(NAME) _ ## NAME
|
||||
#define ASM_MACRO_END .endmacro
|
||||
#define ASM_MACRO_ARG0_DEF /* nothing! */
|
||||
#define ASM_MACRO_ARG0 $0
|
||||
#define ASM_MACRO_ARG0_DEF /* nothing! */
|
||||
#define ASM_MACRO_ARG1 $1
|
||||
#endif
|
||||
|
||||
/* Defaults for GNU assembler */
|
||||
@ -34,6 +38,12 @@
|
||||
#ifndef ASM_MACRO_END
|
||||
#define ASM_MACRO_END .endm
|
||||
#endif
|
||||
#ifndef ASM_MACRO_ARG0_DEF
|
||||
#define ASM_MACRO_ARG0_DEF __asm_macro_arg0
|
||||
#define ASM_MACRO_ARG0 \__asm_macro_arg0
|
||||
#define ASM_MACRO_ARG1_DEF , __asm_macro_arg1
|
||||
#define ASM_MACRO_ARG1 \__asm_macro_arg1
|
||||
#endif
|
||||
#ifndef C_SYMBOL_NAME
|
||||
#define C_SYMBOL_NAME(NAME) NAME
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user