Index: src/runtime/Makefile ================================================================== --- src/runtime/Makefile +++ src/runtime/Makefile @@ -30,11 +30,13 @@ INCLUDES = ObjFW_RT.h includesubdir = ObjFW_RT OBJS_EXTRA = ${LOOKUP_ASM_LOOKUP_ASM_A} LIB_OBJS_EXTRA = ${LOOKUP_ASM_LOOKUP_ASM_LIB_A} -AMIGA_LIB_OBJS_EXTRA = amiga-library.amigalib.o ${LOOKUP_ASM_LOOKUP_ASM_A} +AMIGA_LIB_OBJS_EXTRA = amiga-glue.amigalib.o \ + amiga-library.amigalib.o \ + ${LOOKUP_ASM_LOOKUP_ASM_A} include ../../buildsys.mk ppcinline.h: ObjFW_RT.fd protos.h cvinclude.pl \ Index: src/runtime/ObjFW_RT.fd ================================================================== --- src/runtime/ObjFW_RT.fd +++ src/runtime/ObjFW_RT.fd @@ -1,34 +1,34 @@ ##base _ObjFWRTBase ##bias 30 ##public * Functions for the glue code -objc_set_exit()(sysv,r12base) +objc_set_libc(libc)(A0) * Used by the compiler - these need glue code -__objc_exec_class_inline()(sysv,r12base) -objc_msg_lookup_inline()(sysv,r12base) -objc_msg_lookup_stret_inline()(sysv,r12base) -objc_msg_lookup_super_inline()(sysv,r12base) -objc_msg_lookup_super_stret_inline()(sysv,r12base) -objc_lookUpClass_inline()(sysv,r12base) -objc_getClass_inline()(sysv,r12base) -objc_getRequiredClass_inline()(sysv,r12base) -objc_exception_throw_inline()(sysv,r12base) -objc_sync_enter_inline()(sysv,r12base) -objc_sync_exit_inline()(sysv,r12base) -objc_getProperty_inline()(sysv,r12base) -objc_setProperty_inline()(sysv,r12base) -objc_getPropertyStruct_inline()(sysv,r12base) -objc_setPropertyStruct_inline()(sysv,r12base) -objc_enumerationMutation_inline()(sysv,r12base) +glue___objc_exec_class(module)(A0) +glue_objc_msg_lookup(obj, sel)(A0/A1) +glue_objc_msg_lookup_stret(obj, sel)(A0/A1) +glue_objc_msg_lookup_super(super, sel)(A0/A1) +glue_objc_msg_lookup_super_stret(super, sel)(A0/A1) +glue_objc_lookUpClass(name)(A0) +glue_objc_getClass(name)(A0) +glue_objc_getRequiredClass(name)(A0) +glue_objc_exception_throw(object)(A0) +glue_objc_sync_enter(object)(A0) +glue_objc_sync_exit(object)(A0) +glue_objc_getProperty(self, _cmd, offset, atomic)(A0/A1/D0/D1) +glue_objc_setProperty(self, _cmd, offset, value, atomic, copy)(A0/A1/D0/A2/D1/D2) +glue_objc_getPropertyStruct(dest, src, size, atomic, strong)(A0/A1/D0/D1/D2) +glue_objc_setPropertyStruct(dest, src, size, atomic, strong)(A0/A1/D0/D1/D2) +glue_objc_enumerationMutation(obj)(A0) * Functions declared in ObjFW_RT.h sel_registerName(name)(A0) sel_getName(sel)(A0) sel_isEqual(sel1, sel2)(A0/A1) objc_allocateClassPair(superclass, name, extra_bytes)(A0/A1/D0) objc_registerClassPair(cls)(A0) -objc_getClassList(buf, count)(A0/D)) +objc_getClassList(buf, count)(A0/D0) objc_copyClassList(len)(A0) class_isMetaClass(cls)(A0) class_getName(cls)(A0) class_getSuperclass(cls)(A0) class_getInstanceSize(cls)(A0) Index: src/runtime/ObjFW_RT.h ================================================================== --- src/runtime/ObjFW_RT.h +++ src/runtime/ObjFW_RT.h @@ -62,11 +62,11 @@ # define OBJC_M68K_REG(reg) __asm__(reg) #else # define OBJC_M68K_REG(reg) #endif #if defined(__MORPHOS__) && defined(OBJC_AMIGA_LIBRARY) -# define OBJC_M68K_FUNC(name, args) name(void) +# define OBJC_M68K_FUNC(name, ...) name(void) # define OBJC_M68K_ARG(type, name, reg) type name = (type)reg; #else # define OBJC_M68K_FUNC(name, ...) name(__VA_ARGS__) # define OBJC_M68K_ARG(type, name, reg) #endif @@ -289,38 +289,75 @@ # endif /* * Used by the compiler, but can also be called manually. * - * They need to be in the glue code for the Amiga library. - * * These declarations are also required to prevent Clang's implicit * declarations which include __declspec(dllimport) on Windows. */ struct objc_abi_module; -extern void __objc_exec_class(void *_Nonnull); -extern IMP _Nonnull objc_msg_lookup(id _Nullable, SEL _Nonnull); -extern IMP _Nonnull objc_msg_lookup_stret(id _Nullable, SEL _Nonnull); -extern IMP _Nonnull objc_msg_lookup_super(struct objc_super *_Nonnull, - SEL _Nonnull); -extern IMP _Nonnull objc_msg_lookup_super_stret(struct objc_super *_Nonnull, - SEL _Nonnull); -extern id _Nullable objc_lookUpClass(const char *_Nonnull); -extern id _Nullable objc_getClass(const char *_Nonnull); -extern id _Nonnull objc_getRequiredClass(const char *_Nonnull); -extern void objc_exception_throw(id _Nullable); -extern int objc_sync_enter(id _Nullable); -extern int objc_sync_exit(id _Nullable); -extern id _Nullable objc_getProperty(id _Nonnull, SEL _Nonnull, ptrdiff_t, - bool); -extern void objc_setProperty(id _Nonnull, SEL _Nonnull, ptrdiff_t, id _Nullable, - bool, signed char); -extern void objc_getPropertyStruct(void *_Nonnull, const void *_Nonnull, - ptrdiff_t, bool, bool); -extern void objc_setPropertyStruct(void *_Nonnull, const void *_Nonnull, - ptrdiff_t, bool, bool); -extern void objc_enumerationMutation(id _Nonnull); +extern void __objc_exec_class(void *_Nonnull module); +extern IMP _Nonnull objc_msg_lookup(id _Nullable obj, SEL _Nonnull sel); +extern IMP _Nonnull objc_msg_lookup_stret(id _Nullable obj, SEL _Nonnull sel); +extern IMP _Nonnull objc_msg_lookup_super(struct objc_super *_Nonnull super, + SEL _Nonnull sel); +extern IMP _Nonnull objc_msg_lookup_super_stret( + struct objc_super *_Nonnull super, SEL _Nonnull sel); +extern id _Nullable objc_lookUpClass(const char *_Nonnull name); +extern id _Nullable objc_getClass(const char *_Nonnull name); +extern id _Nonnull objc_getRequiredClass(const char *_Nonnull name); +extern void objc_exception_throw(id _Nullable object); +extern int objc_sync_enter(id _Nullable object); +extern int objc_sync_exit(id _Nullable object); +extern id _Nullable objc_getProperty(id _Nonnull self, SEL _Nonnull _cmd, + ptrdiff_t offset, bool atomic); +extern void objc_setProperty(id _Nonnull self, SEL _Nonnull _cmd, + ptrdiff_t offset, id _Nullable value, bool atomic, signed char copy); +extern void objc_getPropertyStruct(void *_Nonnull dest, + const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong); +extern void objc_setPropertyStruct(void *_Nonnull dest, + const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong); +extern void objc_enumerationMutation(id _Nonnull obj); + +# ifdef OBJC_AMIGA_LIBRARY +extern void glue___objc_exec_class(void *_Nonnull module OBJC_M68K_REG("a0")); +extern IMP _Nonnull glue_objc_msg_lookup(id _Nullable obj OBJC_M68K_REG("a0"), + SEL _Nonnull sel OBJC_M68K_REG("a1")); +extern IMP _Nonnull glue_objc_msg_lookup_stret( + id _Nullable obj OBJC_M68K_REG("a0"), SEL _Nonnull sel OBJC_M68K_REG("a1")); +extern IMP _Nonnull glue_objc_msg_lookup_super( + struct objc_super *_Nonnull super OBJC_M68K_REG("a0"), + SEL _Nonnull sel OBJC_M68K_REG("a1")); +extern IMP _Nonnull glue_objc_msg_lookup_super_stret( + struct objc_super *_Nonnull super OBJC_M68K_REG("a0"), + SEL _Nonnull sel OBJC_M68K_REG("a1")); +extern id _Nullable glue_objc_lookUpClass( + const char *_Nonnull name OBJC_M68K_REG("a0")); +extern id _Nullable glue_objc_getClass( + const char *_Nonnull name OBJC_M68K_REG("a0")); +extern id _Nonnull glue_objc_getRequiredClass( + const char *_Nonnull name OBJC_M68K_REG("a0")); +extern void glue_objc_exception_throw(id _Nullable object OBJC_M68K_REG("a0")); +extern int glue_objc_sync_enter(id _Nullable object OBJC_M68K_REG("a0")); +extern int glue_objc_sync_exit(id _Nullable object OBJC_M68K_REG("a0")); +extern id _Nullable glue_objc_getProperty(id _Nonnull self OBJC_M68K_REG("a0"), + SEL _Nonnull _cmd OBJC_M68K_REG("a1"), ptrdiff_t offset OBJC_M68K_REG("d0"), + bool atomic OBJC_M68K_REG("d1")); +extern void glue_objc_setProperty(id _Nonnull self OBJC_M68K_REG("a0"), + SEL _Nonnull _cmd OBJC_M68K_REG("a1"), ptrdiff_t offset OBJC_M68K_REG("d0"), + id _Nullable value OBJC_M68K_REG("a2"), bool atomic OBJC_M68K_REG("d1"), + signed char copy OBJC_M68K_REG("d2")); +extern void glue_objc_getPropertyStruct(void *_Nonnull dest OBJC_M68K_REG("a0"), + const void *_Nonnull src OBJC_M68K_REG("a1"), + ptrdiff_t size OBJC_M68K_REG("d0"), bool atomic OBJC_M68K_REG("d1"), + bool strong OBJC_M68K_REG("d2")); +extern void glue_objc_setPropertyStruct(void *_Nonnull dest OBJC_M68K_REG("a0"), + const void *_Nonnull src OBJC_M68K_REG("a1"), + ptrdiff_t size OBJC_M68K_REG("d0"), bool atomic OBJC_M68K_REG("d1"), + bool strong OBJC_M68K_REG("d2")); +extern void glue_objc_enumerationMutation(id _Nonnull obj OBJC_M68K_REG("a0")); +# endif #ifdef __cplusplus } #endif #endif ADDED src/runtime/amiga-glue.m Index: src/runtime/amiga-glue.m ================================================================== --- src/runtime/amiga-glue.m +++ src/runtime/amiga-glue.m @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, + * 2018 + * Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#import "ObjFW_RT.h" +#import "private.h" +#import "macros.h" + +void +__objc_exec_class(void *module) +{ + glue___objc_exec_class(module); +} + +IMP +objc_msg_lookup(id obj, SEL sel) +{ + return glue_objc_msg_lookup(obj, sel); +} + +IMP +objc_msg_lookup_stret(id obj, SEL sel) +{ + return glue_objc_msg_lookup_stret(obj, sel); +} + +IMP +objc_msg_lookup_super(struct objc_super *super, SEL sel) +{ + return glue_objc_msg_lookup_super(super, sel); +} + +IMP +objc_msg_lookup_super_stret(struct objc_super *super, SEL sel) +{ + return glue_objc_msg_lookup_super_stret(super, sel); +} + +id +objc_lookUpClass(const char *name) +{ + return glue_objc_lookUpClass(name); +} + +id +objc_getClass(const char *name) +{ + return glue_objc_getClass(name); +} + +id +objc_getRequiredClass(const char *name) +{ + return glue_objc_getRequiredClass(name); +} + +void +objc_exception_throw(id object) +{ + glue_objc_exception_throw(object); + + OF_UNREACHABLE +} + +int +objc_sync_enter(id object) +{ + return glue_objc_sync_enter(object); +} + +int +objc_sync_exit(id object) +{ + return glue_objc_sync_exit(object); +} + +id +objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, bool atomic) +{ + return glue_objc_getProperty(self, _cmd, offset, atomic); +} + +void +objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value, bool atomic, + signed char copy) +{ + glue_objc_setProperty(self, _cmd, offset, value, atomic, copy); +} + +void +objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, + bool strong) +{ + glue_objc_getPropertyStruct(dest, src, size, atomic, strong); +} + +void +objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, + bool strong) +{ + glue_objc_setPropertyStruct(dest, src, size, atomic, strong); +} + +void +objc_enumerationMutation(id obj) +{ + glue_objc_enumerationMutation(obj); +} Index: src/runtime/amiga-library.m ================================================================== --- src/runtime/amiga-library.m +++ src/runtime/amiga-library.m @@ -193,26 +193,26 @@ (ULONG)lib_expunge, (ULONG)lib_null, /* Functions for the glue code */ (ULONG)objc_set_libc, /* Used by the compiler - these need glue code */ - (ULONG)__objc_exec_class, - (ULONG)objc_msg_lookup, - (ULONG)objc_msg_lookup_stret, - (ULONG)objc_msg_lookup_super, - (ULONG)objc_msg_lookup_super_stret, - (ULONG)objc_lookUpClass, - (ULONG)objc_getClass, - (ULONG)objc_getRequiredClass, - (ULONG)objc_exception_throw, - (ULONG)objc_sync_enter, - (ULONG)objc_sync_exit, - (ULONG)objc_getProperty, - (ULONG)objc_setProperty, - (ULONG)objc_getPropertyStruct, - (ULONG)objc_setPropertyStruct, - (ULONG)objc_enumerationMutation, + (ULONG)glue___objc_exec_class, + (ULONG)glue_objc_msg_lookup, + (ULONG)glue_objc_msg_lookup_stret, + (ULONG)glue_objc_msg_lookup_super, + (ULONG)glue_objc_msg_lookup_super_stret, + (ULONG)glue_objc_lookUpClass, + (ULONG)glue_objc_getClass, + (ULONG)glue_objc_getRequiredClass, + (ULONG)glue_objc_exception_throw, + (ULONG)glue_objc_sync_enter, + (ULONG)glue_objc_sync_exit, + (ULONG)glue_objc_getProperty, + (ULONG)glue_objc_setProperty, + (ULONG)glue_objc_getPropertyStruct, + (ULONG)glue_objc_setPropertyStruct, + (ULONG)glue_objc_enumerationMutation, /* Functions declared in ObjFW_RT.h */ (ULONG)sel_registerName, (ULONG)sel_getName, (ULONG)sel_isEqual, (ULONG)objc_allocateClassPair, Index: src/runtime/class.m ================================================================== --- src/runtime/class.m +++ src/runtime/class.m @@ -478,11 +478,11 @@ objc_global_mutex_unlock(); } id -objc_lookUpClass(const char *name) +OBJC_GLUE(objc_lookUpClass, const char *name OBJC_GLUE_M68K_REG("a0")) { Class cls; if ((cls = objc_classname_to_class(name, true)) == NULL) return Nil; @@ -501,21 +501,21 @@ return cls; } id -objc_getClass(const char *name) +OBJC_GLUE(objc_getClass, const char *name OBJC_GLUE_M68K_REG("a0")) { - return objc_lookUpClass(name); + return OBJC_GLUE(objc_lookUpClass, name); } id -objc_getRequiredClass(const char *name) +OBJC_GLUE(objc_getRequiredClass, const char *name OBJC_GLUE_M68K_REG("a0")) { Class cls; - if ((cls = objc_getClass(name)) == Nil) + if ((cls = OBJC_GLUE(objc_getClass, name)) == Nil) OBJC_ERROR("Class %s not found!", name); return cls; } Index: src/runtime/exception.m ================================================================== --- src/runtime/exception.m +++ src/runtime/exception.m @@ -714,11 +714,11 @@ OBJC_ERROR("Cannot unlock spinlock!"); #endif } void -objc_exception_throw(id object) +OBJC_GLUE(objc_exception_throw, id object OBJC_GLUE_M68K_REG("a0")) { struct objc_exception *e = malloc(sizeof(*e)); bool emergency = false; if (e == NULL) { Index: src/runtime/init.m ================================================================== --- src/runtime/init.m +++ src/runtime/init.m @@ -19,11 +19,11 @@ #import "ObjFW_RT.h" #import "private.h" void -__objc_exec_class(void *module_) +OBJC_GLUE(__objc_exec_class, void *module_ OBJC_GLUE_M68K_REG("a0")) { struct objc_abi_module *module = module_; objc_global_mutex_lock(); Index: src/runtime/lookup.m ================================================================== --- src/runtime/lookup.m +++ src/runtime/lookup.m @@ -156,17 +156,19 @@ return imp; } IMP -objc_msg_lookup(id obj, SEL sel) +OBJC_GLUE(objc_msg_lookup, id obj OBJC_GLUE_M68K_REG("a0"), + SEL sel OBJC_GLUE_M68K_REG("a1")) { return common_lookup(obj, sel, objc_method_not_found); } IMP -objc_msg_lookup_stret(id obj, SEL sel) +OBJC_GLUE(objc_msg_lookup_stret, id obj OBJC_GLUE_M68K_REG("a0"), + SEL sel OBJC_GLUE_M68K_REG("a1")) { return common_lookup(obj, sel, objc_method_not_found_stret); } static OF_INLINE IMP @@ -185,16 +187,20 @@ return imp; } IMP -objc_msg_lookup_super(struct objc_super *super, SEL sel) +OBJC_GLUE(objc_msg_lookup_super, + struct objc_super *super OBJC_GLUE_M68K_REG("a0"), + SEL sel OBJC_GLUE_M68K_REG("a1")) { return common_lookup_super(super, sel, objc_method_not_found); } IMP -objc_msg_lookup_super_stret(struct objc_super *super, SEL sel) +OBJC_GLUE(objc_msg_lookup_super_stret, + struct objc_super *super OBJC_GLUE_M68K_REG("a0"), + SEL sel OBJC_GLUE_M68K_REG("a1")) { return common_lookup_super(super, sel, objc_method_not_found_stret); } #endif Index: src/runtime/misc.m ================================================================== --- src/runtime/misc.m +++ src/runtime/misc.m @@ -24,11 +24,11 @@ #include "private.h" static objc_enumeration_mutation_handler enumeration_mutation_handler = NULL; void -objc_enumerationMutation(id obj) +OBJC_GLUE(objc_enumerationMutation, id obj OBJC_GLUE_M68K_REG("a0")) { if (enumeration_mutation_handler != NULL) enumeration_mutation_handler(obj); else OBJC_ERROR("Object was mutated during enumeration!"); Index: src/runtime/private.h ================================================================== --- src/runtime/private.h +++ src/runtime/private.h @@ -26,10 +26,18 @@ # endif # ifndef _Nullable # define _Nullable # endif #endif + +#ifdef OBJC_AMIGA_LIBRARY +# define OBJC_GLUE(name, ...) glue_##name(__VA_ARGS__) +# define OBJC_GLUE_M68K_REG(reg) OBJC_M68K_REG(reg) +#else +# define OBJC_GLUE(name, ...) name(__VA_ARGS__) +# define OBJC_GLUE_M68K_REG(reg) +#endif struct objc_abi_class { struct objc_abi_class *_Nonnull metaclass; const char *_Nullable superclass; const char *_Nonnull name; Index: src/runtime/property.m ================================================================== --- src/runtime/property.m +++ src/runtime/property.m @@ -39,11 +39,14 @@ OBJC_ERROR("Failed to initialize spinlocks!") } #endif id -objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, bool atomic) +OBJC_GLUE(objc_getProperty, id self OBJC_GLUE_M68K_REG("a0"), + SEL _cmd OBJC_GLUE_M68K_REG("a1"), + ptrdiff_t offset OBJC_GLUE_M68K_REG("d0"), + bool atomic OBJC_GLUE_M68K_REG("d1")) { if (atomic) { id *ptr = (id *)(void *)((char *)self + offset); #ifdef OF_HAVE_THREADS unsigned hash = SPINLOCK_HASH(ptr); @@ -61,12 +64,15 @@ return *(id *)(void *)((char *)self + offset); } void -objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value, bool atomic, - signed char copy) +OBJC_GLUE(objc_setProperty, id self OBJC_GLUE_M68K_REG("a0"), + SEL _cmd OBJC_GLUE_M68K_REG("a1"), + ptrdiff_t offset OBJC_GLUE_M68K_REG("d0"), + id value OBJC_GLUE_M68K_REG("a2"), bool atomic OBJC_GLUE_M68K_REG("d1"), + signed char copy OBJC_GLUE_M68K_REG("d2")) { if (atomic) { id *ptr = (id *)(void *)((char *)self + offset); #ifdef OF_HAVE_THREADS unsigned hash = SPINLOCK_HASH(ptr); @@ -114,12 +120,14 @@ [old release]; } /* The following methods are only required for GCC >= 4.6 */ void -objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, - bool strong) +OBJC_GLUE(objc_getPropertyStruct, void *dest OBJC_GLUE_M68K_REG("a0"), + const void *src OBJC_GLUE_M68K_REG("a1"), + ptrdiff_t size OBJC_GLUE_M68K_REG("d0"), + bool atomic OBJC_GLUE_M68K_REG("d1"), bool strong OBJC_GLUE_M68K_REG("d2")) { if (atomic) { #ifdef OF_HAVE_THREADS unsigned hash = SPINLOCK_HASH(src); @@ -135,12 +143,14 @@ memcpy(dest, src, size); } void -objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, - bool strong) +OBJC_GLUE(objc_setPropertyStruct, void *dest OBJC_GLUE_M68K_REG("a0"), + const void *src OBJC_GLUE_M68K_REG("a1"), + ptrdiff_t size OBJC_GLUE_M68K_REG("d0"), + bool atomic OBJC_GLUE_M68K_REG("d1"), bool strong OBJC_GLUE_M68K_REG("d2")) { if (atomic) { #ifdef OF_HAVE_THREADS unsigned hash = SPINLOCK_HASH(src); Index: src/runtime/static-instances.m ================================================================== --- src/runtime/static-instances.m +++ src/runtime/static-instances.m @@ -31,11 +31,12 @@ { struct objc_abi_static_instances **si; /* Check if the class for a static instance became available */ for (size_t i = 0; i < static_instances_cnt; i++) { - Class cls = objc_lookUpClass(static_instances[i]->class_name); + Class cls = OBJC_GLUE(objc_lookUpClass, + static_instances[i]->class_name); if (cls != Nil) { for (id *instances = static_instances[i]->instances; *instances != nil; instances++) object_setClass(*instances, cls); @@ -72,11 +73,11 @@ if (si == NULL) return; for (; *si != NULL; si++) { - Class cls = objc_lookUpClass((*si)->class_name); + Class cls = OBJC_GLUE(objc_lookUpClass, (*si)->class_name); if (cls != Nil) { for (id *instances = (*si)->instances; *instances != nil; instances++) object_setClass(*instances, cls); Index: src/runtime/synchronized.m ================================================================== --- src/runtime/synchronized.m +++ src/runtime/synchronized.m @@ -41,11 +41,11 @@ OBJC_ERROR("Failed to create mutex!") } #endif int -objc_sync_enter(id object) +OBJC_GLUE(objc_sync_enter, id object OBJC_GLUE_M68K_REG("a0")) { if (object == nil) return 0; #ifdef OF_HAVE_THREADS @@ -92,11 +92,11 @@ return 0; } int -objc_sync_exit(id object) +OBJC_GLUE(objc_sync_exit, id object OBJC_GLUE_M68K_REG("a0")) { if (object == nil) return 0; #ifdef OF_HAVE_THREADS