Fix for MacOS X assembler, why don't Apple use GNU as?

This commit is contained in:
gbeauche 2005-06-25 06:33:39 +00:00
parent d0da2a0dda
commit 2de44f1910
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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