ObjFW  Check-in [8f9c2b55ce]

Overview
Comment:Use cvinclude.pl instead of sfdc for MorphOS

sfdc does not support SysV functions and is not part of the MorphOS SDK.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8f9c2b55cecd27ee4e34938e65d1938ec7322ab5aa2fe841342798ba2b6cd515
User & Date: js on 2019-05-19 21:30:24
Other Links: manifest | tags
Context
2019-06-16
01:40
bridge: Improve static types check-in: f8fb6172af user: js tags: trunk
2019-05-19
21:30
Use cvinclude.pl instead of sfdc for MorphOS check-in: 8f9c2b55ce user: js tags: trunk
17:18
configure: Fix killing OBJCFLAGS check-in: a1dcb80c83 user: js tags: trunk
Changes

Modified configure.ac from [be0d24ff06] to [fcd4c9ffc0].

58
59
60
61
62
63
64

65
66
67
68
69
70
71
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72







+







		ac_cv_snprintf_useful_ret="yes"

		AS_IF([test x"$enable_amiga_lib" != x"no"], [
			AC_SUBST(OBJFW_RT_AMIGA_LIB,
				'objfw_rt_${OBJFW_RT_LIB_MAJOR}_68k.library')
			AC_SUBST(SFDC_TARGET, m68k-amigaos)
			AC_SUBST(SFD_FILE, amigaos3.sfd)
			AC_SUBST(SFDC_INLINE_H, inline.h)
			dnl For 68000, GCC emits calls to helper functions that
			dnl do not work properly in a library.
			AC_SUBST(AMIGA_LIB_CFLAGS, "-mcpu=68020 -fbaserel")
			AC_SUBST(AMIGA_LIB_LDFLAGS,
				"-mcpu=68020 -fbaserel -resident -nostartfiles")
		])
		;;
79
80
81
82
83
84
85

86
87
88


89
90
91

92
93
94
95
96
97
98
80
81
82
83
84
85
86
87
88
89

90
91
92


93
94
95
96
97
98
99
100







+


-
+
+

-
-
+







				OBJCFLAGS="-O2 -g"
			])
			OBJCFLAGS="$OBJCFLAGS -noixemul"
			OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -noixemul"
			LDFLAGS="$LDFLAGS -noixemul"
			enable_files="yes"	# Required for reading ENV:
			supports_amiga_lib="yes"
			check_pedantic="no"	# Breaks generated inlines

			AS_IF([test x"$enable_amiga_lib" != x"no"], [
				t='objfw_rt_${OBJFW_RT_LIB_MAJOR}_abox.library'
				t='objfw_rt_${OBJFW_RT_LIB_MAJOR}_morphos'
				t="$t.library"
				AC_SUBST(OBJFW_RT_AMIGA_LIB, $t)
				AC_SUBST(SFDC_TARGET, ppc-morphos)
				AC_SUBST(SFD_FILE, morphos.sfd)
				AC_SUBST(CVINCLUDE_INLINE_H, inline.h)
				t="-mresident32 -fno-builtin"
				AC_SUBST(AMIGA_LIB_CFLAGS, $t)
				t="-mresident32 -nostartfiles -nodefaultlibs"
				t="$t -lc"
				AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
			])
		])

Modified extra.mk.in from [4fbf371cb1] to [30769b532e].

17
18
19
20
21
22
23

24
25
26
27
28
29
30
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31







+







OBJFW_BRIDGE_SHARED_LIB = @OBJFW_BRIDGE_SHARED_LIB@
OBJFW_BRIDGE_STATIC_LIB = @OBJFW_BRIDGE_STATIC_LIB@
OBJFW_BRIDGE_FRAMEWORK = @OBJFW_BRIDGE_FRAMEWORK@

AUTORELEASE_M = @AUTORELEASE_M@
BIN_PREFIX = @BIN_PREFIX@
BRIDGE = @BRIDGE@
CVINCLUDE_INLINE_H = @CVINCLUDE_INLINE_H@
ENCODINGS = @ENCODINGS@
ENCODINGS_A = @ENCODINGS_A@
ENCODINGS_ENCODINGS_A = @ENCODINGS_ENCODINGS_A@
ENCODINGS_ENCODINGS_LIB_A = @ENCODINGS_ENCODINGS_LIB_A@
ENCODINGS_LIB_A = @ENCODINGS_LIB_A@
ENCODINGS_SRCS = @ENCODINGS_SRCS@
EXCEPTIONS_A = @EXCEPTIONS_A@
65
66
67
68
69
70
71

72
73
74
75
76
77
78
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80







+







OFSTDIOSTREAM_WIN32CONSOLE_M = @OFSTDIOSTREAM_WIN32CONSOLE_M@
REEXPORT_RUNTIME = @REEXPORT_RUNTIME@
REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@
RUNTIME = @RUNTIME@
RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@
RUNTIME_LIBS = @RUNTIME_LIBS@
RUN_TESTS = @RUN_TESTS@
SFDC_INLINE_H = @SFDC_INLINE_H@
SFDC_TARGET = @SFDC_TARGET@
SFD_FILE = @SFD_FILE@
TESTPLUGIN = @TESTPLUGIN@
TESTPLUGIN_LIBS = @TESTPLUGIN_LIBS@
TESTS_LIBS = @TESTS_LIBS@
TESTS_STATIC_LIB = @TESTS_STATIC_LIB@
UNICODE_M = @UNICODE_M@

Modified src/runtime/Makefile from [c6c73c6c03] to [5df25b2e4e].

39
40
41
42
43
44
45
46
47
48
49


50
51
52


53
54
55
56
57
58
59
60
39
40
41
42
43
44
45




46
47
48


49
50
51
52
53
54
55
56
57
58







-
-
-
-
+
+

-
-
+
+








		       ${LOOKUP_ASM_LOOKUP_ASM_A}	\
		       amiga-end.amigalib.o

include ../../buildsys.mk

${OBJFW_RT_AMIGA_LIB}: inline.h

amiga-library.m: amiga-library-functable.inc

amiga-library-functable.inc: ${SFD_FILE}
	sfdc -q --target=${SFDC_TARGET} --mode=functable -o $@ $<
${SFDC_INLINE_H}: ${SFD_FILE}
	sfdc -q --target=${SFDC_TARGET} --mode=macros -o $@ $<; \

inline.h: ${SFD_FILE}
	sfdc -q --target=${SFDC_TARGET} --mode=macros -o $@ $<
${CVINCLUDE_INLINE_H}: morphos.fd morphos-clib.h
	cvinclude.pl --quiet --fd=morphos.fd --clib=morphos-clib.h --inlines=$@

CPPFLAGS += -I. -I.. -I../..					\
	    -DOBJFW_RT_AMIGA_LIB=\"${OBJFW_RT_AMIGA_LIB}\"	\
	    -DOBJFW_RT_LIB_MAJOR=${OBJFW_RT_LIB_MAJOR}		\
	    -DOBJFW_RT_LIB_MINOR=${OBJFW_RT_LIB_MINOR}
AMIGA_LIB_CFLAGS += -DOBJC_COMPILING_AMIGA_LIBRARY
LD = ${OBJC}
FRAMEWORK_LIBS = ${LIBS}

Modified src/runtime/amiga-glue.m from [60e61a9415] to [ed9ba802b7].

16
17
18
19
20
21
22













23
24
25
26
27
28
29
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42







+
+
+
+
+
+
+
+
+
+
+
+
+







 */

#include "config.h"

#import "ObjFW_RT.h"
#import "private.h"
#import "macros.h"

extern bool objc_init(unsigned int, struct objc_libc *, FILE *, FILE *);

bool __saveds
objc_init_m68k(void)
{
	OBJC_M68K_ARG(unsigned int, version, d0)
	OBJC_M68K_ARG(struct objc_libc *, libc, a0)
	OBJC_M68K_ARG(FILE *, stdout_, a1)
	OBJC_M68K_ARG(FILE *, stderr_, a2)

	return objc_init(version, libc, stdout_, stderr_);
}

void __saveds
__objc_exec_class_m68k(void)
{
	OBJC_M68K_ARG(void *, module, a0)

	__objc_exec_class(module);

Modified src/runtime/amiga-library.m from [1262807e23] to [7e60f6ed92].

58
59
60
61
62
63
64

65
66
67
68
69
70
71
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72







+








#ifdef OF_AMIGAOS_M68K
extern uintptr_t __CTOR_LIST__[];
extern const void *_EH_FRAME_BEGINS__;
extern void *_EH_FRAME_OBJECTS__;
#endif

extern bool objc_init_m68k(void);
extern void __objc_exec_class_m68k(void);
extern IMP _Nonnull objc_msg_lookup_m68k(void);
extern IMP _Nonnull objc_msg_lookup_stret_m68k(void);
extern IMP _Nonnull objc_msg_lookup_super_m68k(void);
extern IMP _Nonnull objc_msg_lookup_super_stret_m68k(void);
extern Class _Nullable objc_lookUpClass_m68k(void);
extern Class _Nullable objc_getClass_m68k(void);
371
372
373
374
375
376
377
378
379


380
381
382
383
384
385
386
372
373
374
375
376
377
378


379
380
381
382
383
384
385
386
387







-
-
+
+








static void *
lib_null(void)
{
	return NULL;
}

static bool __saveds
objc_init_m68k(void)
bool
objc_init(void)
{
	OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
	OBJC_M68K_ARG(unsigned int, version, d0)
	OBJC_M68K_ARG(struct objc_libc *, libc_, a0)
	OBJC_M68K_ARG(FILE *, stdout_, a1)
	OBJC_M68K_ARG(FILE *, stderr_, a2)

562
563
564
565
566
567
568
569

































































570
571
572
573
574
575
576
563
564
565
566
567
568
569

570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641







-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







	(CONST_APTR)FUNCARRAY_BEGIN,
	(CONST_APTR)FUNCARRAY_32BIT_NATIVE,
#endif
	(CONST_APTR)lib_open,
	(CONST_APTR)lib_close,
	(CONST_APTR)lib_expunge,
	(CONST_APTR)lib_null,
#include "amiga-library-functable.inc"
	(CONST_APTR)objc_init_m68k,
	(CONST_APTR)__objc_exec_class_m68k,
	(CONST_APTR)objc_msg_lookup_m68k,
	(CONST_APTR)objc_msg_lookup_stret_m68k,
	(CONST_APTR)objc_msg_lookup_super_m68k,
	(CONST_APTR)objc_msg_lookup_super_stret_m68k,
	(CONST_APTR)objc_lookUpClass_m68k,
	(CONST_APTR)objc_getClass_m68k,
	(CONST_APTR)objc_getRequiredClass_m68k,
	(CONST_APTR)objc_lookup_class_m68k,
	(CONST_APTR)objc_get_class_m68k,
	(CONST_APTR)objc_exception_throw_m68k,
	(CONST_APTR)objc_sync_enter_m68k,
	(CONST_APTR)objc_sync_exit_m68k,
	(CONST_APTR)objc_getProperty_m68k,
	(CONST_APTR)objc_setProperty_m68k,
	(CONST_APTR)objc_getPropertyStruct_m68k,
	(CONST_APTR)objc_setPropertyStruct_m68k,
	(CONST_APTR)objc_enumerationMutation_m68k,
	(CONST_APTR)__gnu_objc_personality_v0_m68k,
	(CONST_APTR)objc_retain_m68k,
	(CONST_APTR)objc_retainBlock_m68k,
	(CONST_APTR)objc_retainAutorelease_m68k,
	(CONST_APTR)objc_release_m68k,
	(CONST_APTR)objc_autorelease_m68k,
	(CONST_APTR)objc_autoreleaseReturnValue_m68k,
	(CONST_APTR)objc_retainAutoreleaseReturnValue_m68k,
	(CONST_APTR)objc_retainAutoreleasedReturnValue_m68k,
	(CONST_APTR)objc_storeStrong_m68k,
	(CONST_APTR)objc_storeWeak_m68k,
	(CONST_APTR)objc_loadWeakRetained_m68k,
	(CONST_APTR)objc_initWeak_m68k,
	(CONST_APTR)objc_destroyWeak_m68k,
	(CONST_APTR)objc_loadWeak_m68k,
	(CONST_APTR)objc_copyWeak_m68k,
	(CONST_APTR)objc_moveWeak_m68k,
	(CONST_APTR)sel_registerName_m68k,
	(CONST_APTR)sel_getName_m68k,
	(CONST_APTR)sel_isEqual_m68k,
	(CONST_APTR)objc_allocateClassPair_m68k,
	(CONST_APTR)objc_registerClassPair_m68k,
	(CONST_APTR)objc_getClassList_m68k,
	(CONST_APTR)objc_copyClassList_m68k,
	(CONST_APTR)class_isMetaClass_m68k,
	(CONST_APTR)class_getName_m68k,
	(CONST_APTR)class_getSuperclass_m68k,
	(CONST_APTR)class_getInstanceSize_m68k,
	(CONST_APTR)class_respondsToSelector_m68k,
	(CONST_APTR)class_conformsToProtocol_m68k,
	(CONST_APTR)class_getMethodImplementation_m68k,
	(CONST_APTR)class_getMethodImplementation_stret_m68k,
	(CONST_APTR)class_getMethodTypeEncoding_m68k,
	(CONST_APTR)class_addMethod_m68k,
	(CONST_APTR)class_replaceMethod_m68k,
	(CONST_APTR)object_getClass_m68k,
	(CONST_APTR)object_setClass_m68k,
	(CONST_APTR)object_getClassName_m68k,
	(CONST_APTR)protocol_getName_m68k,
	(CONST_APTR)protocol_isEqual_m68k,
	(CONST_APTR)protocol_conformsToProtocol_m68k,
	(CONST_APTR)objc_exit_m68k,
	(CONST_APTR)objc_setUncaughtExceptionHandler_m68k,
	(CONST_APTR)objc_setForwardHandler_m68k,
	(CONST_APTR)objc_setEnumerationMutationHandler_m68k,
	(CONST_APTR)objc_zero_weak_references_m68k,
	(CONST_APTR)-1,
#ifdef OF_MORPHOS
	(CONST_APTR)FUNCARRAY_END
#endif
};
#pragma GCC diagnostic pop

Modified src/runtime/amigaos3.sfd from [5d6ee07490] to [2296d58876].

1
2
3
4
5
6
7

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28



















29
30
31
32
33
34
35
36
37
38
39
40
41
42
43














44
45
46


47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77





























78
79
80
81
1
2
3
4
5
6

7
8
9



















10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28















29
30
31
32
33
34
35
36
37
38
39
40
41
42



43
44































45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73



74






-
+


-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-

==base _ObjFWRTBase
==basetype struct Library *
==libname objfw_rt_0_68k.library
==bias 30
==public
* Functions that are only for the linklib.
bool objc_init_m68k(unsigned int version, struct objc_libc *libc, FILE *stdout, FILE *stdin)(d0,a0,a1,a2)
bool objc_init(unsigned int version, struct objc_libc *libc, FILE *stdout, FILE *stderr)(d0,a0,a1,a2)
* These have a built-in declaration in the compiler that does not use the
* registers and thus always need glue.
void __objc_exec_class_m68k(void *_Nonnull module)(a0)
IMP _Nonnull objc_msg_lookup_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_stret_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_super_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_super_stret_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1)
Class _Nullable objc_lookUpClass_m68k(const char *_Nonnull name)(a0)
Class _Nullable objc_getClass_m68k(const char *_Nonnull name)(a0)
Class _Nonnull objc_getRequiredClass_m68k(const char *_Nonnull name)(a0)
Class _Nullable objc_lookup_class_m68k(const char *_Nonnull name)(a0)
Class _Nonnull objc_get_class_m68k(const char *_Nonnull name)(a0)
void objc_exception_throw_m68k(id _Nonnull object)(a0)
int objc_sync_enter_m68k(id _Nullable object)(a0)
int objc_sync_exit_m68k(id _Nullable object)(a0)
id objc_getProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1)
void objc_setProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2)
void objc_getPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2)
void objc_setPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2)
void objc_enumerationMutation_m68k(id _Nonnull object)(a0)
int __gnu_objc_personality_v0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1)
void __objc_exec_class(void *_Nonnull module)(a0)
IMP _Nonnull objc_msg_lookup(id _Nullable object, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_stret(id _Nullable object, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_super(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_super_stret(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1)
Class _Nullable objc_lookUpClass(const char *_Nonnull name)(a0)
Class _Nullable objc_getClass(const char *_Nonnull name)(a0)
Class _Nonnull objc_getRequiredClass(const char *_Nonnull name)(a0)
Class _Nullable objc_lookup_class(const char *_Nonnull name)(a0)
Class _Nonnull objc_get_class(const char *_Nonnull name)(a0)
void objc_exception_throw(id _Nonnull object)(a0)
int objc_sync_enter(id _Nullable object)(a0)
int objc_sync_exit(id _Nullable object)(a0)
id objc_getProperty(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1)
void objc_setProperty(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2)
void objc_getPropertyStruct(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2)
void objc_setPropertyStruct(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2)
void objc_enumerationMutation(id _Nonnull object)(a0)
int __gnu_objc_personality_v0(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1)
int __gnu_objc_personality_sj0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1)
id _Nullable objc_retain_m68k(id _Nullable object)(a0)
id _Nullable objc_retainBlock_m68k(id _Nullable block)(a0)
id _Nullable objc_retainAutorelease_m68k(id _Nullable object)(a0)
void objc_release_m68k(id _Nullable object)(a0)
id _Nullable objc_autorelease_m68k(id _Nullable object)(a0)
id _Nullable objc_autoreleaseReturnValue_m68k(id _Nullable object)(a0)
id _Nullable objc_retainAutoreleaseReturnValue_m68k(id _Nullable object)(a0)
id _Nullable objc_retainAutoreleasedReturnValue_m68k(id _Nullable object)(a0)
id _Nullable objc_storeStrong_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
id _Nullable objc_storeWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
id _Nullable objc_loadWeakRetained_m68k(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_initWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
void objc_destroyWeak_m68k(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_loadWeak_m68k(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_retain(id _Nullable object)(a0)
id _Nullable objc_retainBlock(id _Nullable block)(a0)
id _Nullable objc_retainAutorelease(id _Nullable object)(a0)
void objc_release(id _Nullable object)(a0)
id _Nullable objc_autorelease(id _Nullable object)(a0)
id _Nullable objc_autoreleaseReturnValue(id _Nullable object)(a0)
id _Nullable objc_retainAutoreleaseReturnValue(id _Nullable object)(a0)
id _Nullable objc_retainAutoreleasedReturnValue(id _Nullable object)(a0)
id _Nullable objc_storeStrong(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
id _Nullable objc_storeWeak(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
id _Nullable objc_loadWeakRetained(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_initWeak(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
void objc_destroyWeak(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_loadWeak(id _Nullable *_Nonnull object)(a0)
void objc_copyWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1)
void objc_moveWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1)
* These only need glue on MorphOS. As none of them are functions that are used
void objc_copyWeak(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1)
void objc_moveWeak(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1)
* in hot paths, it's easier to also use the glue on AmigaOS 3, which also has
* the benefit of having all __saveds in a single place.
SEL _Nonnull sel_registerName_m68k(const char *_Nonnull name)(a0)
const char *_Nonnull sel_getName_m68k(SEL _Nonnull selector)(a0)
bool sel_isEqual_m68k(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1)
Class _Nonnull objc_allocateClassPair_m68k(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0)
void objc_registerClassPair_m68k(Class _Nonnull class_)(a0)
unsigned int objc_getClassList_m68k(Class _Nonnull *_Nullable buffer, unsigned int count)(a0,d0)
Class _Nonnull *_Nonnull objc_copyClassList_m68k(unsigned int *_Nullable length)(a0)
bool class_isMetaClass_m68k(Class _Nullable class_)(a0)
const char *_Nullable class_getName_m68k(Class _Nullable class_)(a0)
Class _Nullable class_getSuperclass_m68k(Class _Nullable class_)(a0)
unsigned long class_getInstanceSize_m68k(Class _Nullable class_)(a0)
bool class_respondsToSelector_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
bool class_conformsToProtocol_m68k(Class _Nullable class_, Protocol *_Nonnull p)(a0,a1)
IMP _Nullable class_getMethodImplementation_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
IMP _Nullable class_getMethodImplementation_stret_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
const char *_Nullable class_getMethodTypeEncoding_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
bool class_addMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3)
IMP _Nullable class_replaceMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3)
Class _Nullable object_getClass_m68k(id _Nullable object)(a0)
Class _Nullable object_setClass_m68k(id _Nullable object, Class _Nonnull class_)(a0,a1)
const char *_Nullable object_getClassName_m68k(id _Nullable object)(a0)
const char *_Nonnull protocol_getName_m68k(Protocol *_Nonnull protocol)(a0)
bool protocol_isEqual_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1)
bool protocol_conformsToProtocol_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1)
void objc_exit_m68k(void)()
_Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler_m68k(objc_uncaught_exception_handler_t _Nullable handler)(a0)
void objc_setForwardHandler_m68k(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1)
void objc_setEnumerationMutationHandler_m68k(objc_enumeration_mutation_handler_t _Nullable handler)(a0)
void objc_zero_weak_references_m68k(id _Nonnull value)(a0)
SEL _Nonnull sel_registerName(const char *_Nonnull name)(a0)
const char *_Nonnull sel_getName(SEL _Nonnull selector)(a0)
bool sel_isEqual(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1)
Class _Nonnull objc_allocateClassPair(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0)
void objc_registerClassPair(Class _Nonnull class_)(a0)
unsigned int objc_getClassList(Class _Nonnull *_Nullable buffer, unsigned int count)(a0,d0)
Class _Nonnull *_Nonnull objc_copyClassList(unsigned int *_Nullable length)(a0)
bool class_isMetaClass(Class _Nullable class_)(a0)
const char *_Nullable class_getName(Class _Nullable class_)(a0)
Class _Nullable class_getSuperclass(Class _Nullable class_)(a0)
unsigned long class_getInstanceSize(Class _Nullable class_)(a0)
bool class_respondsToSelector(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
bool class_conformsToProtocol(Class _Nullable class_, Protocol *_Nonnull p)(a0,a1)
IMP _Nullable class_getMethodImplementation(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
IMP _Nullable class_getMethodImplementation_stret(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
const char *_Nullable class_getMethodTypeEncoding(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
bool class_addMethod(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3)
IMP _Nullable class_replaceMethod(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3)
Class _Nullable object_getClass(id _Nullable object)(a0)
Class _Nullable object_setClass(id _Nullable object, Class _Nonnull class_)(a0,a1)
const char *_Nullable object_getClassName(id _Nullable object)(a0)
const char *_Nonnull protocol_getName(Protocol *_Nonnull protocol)(a0)
bool protocol_isEqual(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1)
bool protocol_conformsToProtocol(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1)
void objc_exit(void)()
_Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t _Nullable handler)(a0)
void objc_setForwardHandler(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1)
void objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t _Nullable handler)(a0)
void objc_zero_weak_references(id _Nonnull value)(a0)
* SysV functions for MorphOS could be added here for performance. Having them
* in addition to the m68k functions allows m68k applications to call into the
* PPC library, while native code can use the SysV functions.
==end

Modified src/runtime/linklib/linklib.m from [e8efb8926f] to [5fd34ee158].

19
20
21
22
23
24
25


26
27
28
29
30
31
32

33
34

35
36
37
38
39
40
41
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45







+
+







+


+








#import "ObjFW_RT.h"
#import "private.h"
#import "macros.h"

#include <proto/exec.h>

struct ObjFWRTBase;

#import "inline.h"

#include <stdio.h>
#include <stdlib.h>

#if defined(OF_AMIGAOS_M68K)
# include <stabs.h>
# define SYM(name) __asm__("_" name)
#elif defined(OF_MORPHOS)
# include <constructor.h>
# define SYM(name) __asm__(name)
#endif

#ifdef HAVE_SJLJ_EXCEPTIONS
extern int _Unwind_SjLj_RaiseException(void *);
#else
extern int _Unwind_RaiseException(void *);
#endif
54
55
56
57
58
59
60








































































































61
62
63
64
65
66
67
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







extern void _Unwind_Resume(void *);
#endif
extern void __register_frame_info(const void *, void *);
extern void __deregister_frame_info(const void *);

struct Library *ObjFWRTBase;
void *__objc_class_name_Protocol;

void linklib___objc_exec_class(void *module) SYM("__objc_exec_class");
IMP linklib_objc_msg_lookup(id object, SEL selector) SYM("objc_msg_lookup");
IMP linklib_objc_msg_lookup_stret(id object, SEL selector)
    SYM("objc_msg_lookup_stret");
IMP linklib_objc_msg_lookup_super(struct objc_super *super, SEL selector)
    SYM("objc_msg_lookup_super");
IMP linklib_objc_msg_lookup_super_stret(struct objc_super *super, SEL selector)
    SYM("objc_msg_lookup_super_stret");
Class linklib_objc_lookUpClass(const char *name) SYM("objc_lookUpClass");
Class linklib_objc_getClass(const char *name) SYM("objc_getClass");
Class linklib_objc_getRequiredClass(const char *name)
    SYM("objc_getRequiredClass");
Class linklib_objc_lookup_class(const char *name) SYM("objc_lookup_class");
Class linklib_objc_get_class(const char *name) SYM("objc_get_class");
void linklib_objc_exception_throw(id object) SYM("objc_exception_throw");
int linklib_objc_sync_enter(id object) SYM("objc_sync_enter");
int linklib_objc_sync_exit(id object) SYM("objc_sync_exit");
id linklib_objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, bool atomic)
    SYM("objc_getProperty");
void linklib_objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value,
    bool atomic, signed char copy) SYM("objc_setProperty");
void linklib_objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size,
    bool atomic, bool strong) SYM("objc_getPropertyStruct");
void linklib_objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size,
    bool atomic, bool strong) SYM("objc_setPropertyStruct");
void linklib_objc_enumerationMutation(id object)
    SYM("objc_enumerationMutation");
#ifdef HAVE_SJLJ_EXCEPTIONS
int linklib___gnu_objc_personality_sj0(int version, int actions,
    uint64_t exClass, void *ex, void *ctx) SYM("__gnu_objc_personality_sj0");
#else
int linklib___gnu_objc_personality_v0(int version, int actions,
    uint64_t exClass, void *ex, void *ctx) SYM("__gnu_objc_personality_v0");
#endif
id linklib_objc_retain(id object) SYM("objc_retain");
id linklib_objc_retainBlock(id block) SYM("objc_retainBlock");
id linklib_objc_retainAutorelease(id object) SYM("objc_retainAutorelease");
void linklib_objc_release(id object) SYM("objc_release");
id linklib_objc_autorelease(id object) SYM("objc_autorelease");
id linklib_objc_autoreleaseReturnValue(id object)
    SYM("objc_autoreleaseReturnValue");
id linklib_objc_retainAutoreleaseReturnValue(id object)
    SYM("objc_retainAutoreleaseReturnValue");
id linklib_objc_retainAutoreleasedReturnValue(id object)
    SYM("objc_retainAutoreleasedReturnValue");
id linklib_objc_storeStrong(id *object, id value) SYM("objc_storeStrong");
id linklib_objc_storeWeak(id *object, id value) SYM("objc_storeWeak");
id linklib_objc_loadWeakRetained(id *object) SYM("objc_loadWeakRetained");
id linklib_objc_initWeak(id *object, id value) SYM("objc_initWeak");
void linklib_objc_destroyWeak(id *object) SYM("objc_destroyWeak");
id linklib_objc_loadWeak(id *object) SYM("objc_loadWeak");
void linklib_objc_copyWeak(id *dest, id *src) SYM("objc_copyWeak");
void linklib_objc_moveWeak(id *dest, id *src) SYM("objc_moveWeak");
SEL linklib_sel_registerName(const char *name) SYM("sel_registerName");
const char *linklib_sel_getName(SEL selector) SYM("sel_getName");
bool linklib_sel_isEqual(SEL selector1, SEL selector2) SYM("sel_isEqual");
Class linklib_objc_allocateClassPair(Class superclass, const char *name,
    size_t extraBytes) SYM("objc_allocateClassPair");
void linklib_objc_registerClassPair(Class class) SYM("objc_registerClassPair");
unsigned int linklib_objc_getClassList(Class *buffer, unsigned int count)
    SYM("objc_getClassList");
Class *linklib_objc_copyClassList(unsigned int *length)
    SYM("objc_copyClassList");
bool linklib_class_isMetaClass(Class class) SYM("class_isMetaClass");
const char *linklib_class_getName(Class class) SYM("class_getName");
Class linklib_class_getSuperclass(Class class) SYM("class_getSuperclass");
unsigned long linklib_class_getInstanceSize(Class class)
    SYM("class_getInstanceSize");
bool linklib_class_respondsToSelector(Class class, SEL selector)
    SYM("class_respondsToSelector");
bool linklib_class_conformsToProtocol(Class class, Protocol *protocol)
    SYM("class_conformsToProtocol");
IMP linklib_class_getMethodImplementation(Class class, SEL selector)
    SYM("class_getMethodImplementation");
IMP linklib_class_getMethodImplementation_stret(Class class, SEL selector)
    SYM("class_getMethodImplementation_stret");
const char *linklib_class_getMethodTypeEncoding(Class class, SEL selector)
    SYM("class_getMethodTypeEncoding");
bool linklib_class_addMethod(Class class, SEL selector, IMP implementation,
    const char *typeEncoding) SYM("class_addMethod");
IMP linklib_class_replaceMethod(Class class, SEL selector, IMP implementation,
    const char *typeEncoding) SYM("class_replaceMethod");
Class linklib_object_getClass(id object) SYM("object_getClass");
Class linklib_object_setClass(id object, Class class) SYM("object_setClass");
const char *linklib_object_getClassName(id object)
    SYM("object_getClassName");
const char *linklib_protocol_getName(Protocol *protocol)
    SYM("protocol_getName");
bool linklib_protocol_isEqual(Protocol *protocol1, Protocol *protocol2)
    SYM("protocol_isEqual");
bool linklib_protocol_conformsToProtocol(Protocol *protocol1,
    Protocol *protocol2) SYM("protocol_conformsToProtocol");
void linklib_objc_exit(void) SYM("objc_exit");
objc_uncaught_exception_handler_t linklib_objc_setUncaughtExceptionHandler(
    objc_uncaught_exception_handler_t handler)
    SYM("objc_setUncaughtExceptionHandler");
void linklib_objc_setForwardHandler(IMP forward, IMP stretForward)
    SYM("objc_setForwardHandler");
void linklib_objc_setEnumerationMutationHandler(
    objc_enumeration_mutation_handler_t handler)
    SYM("objc_setEnumerationMutationHandler");
void linklib_objc_zero_weak_references(id value)
    SYM("objc_zero_weak_references");

static void
ctor(void)
{
	static bool initialized = false;
	struct objc_libc libc = {
		.malloc = malloc,
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
208
209
210
211
212
213
214

215
216
217
218
219
220
221
222







-
+








	if ((ObjFWRTBase = OpenLibrary(OBJFW_RT_AMIGA_LIB,
	    OBJFW_RT_LIB_MINOR)) == NULL) {
		fputs("Failed to open " OBJFW_RT_AMIGA_LIB "!\n", stderr);
		abort();
	}

	if (!objc_init_m68k(1, &libc, stdout, stderr)) {
	if (!objc_init(1, &libc, stdout, stderr)) {
		fputs("Failed to initialize " OBJFW_RT_AMIGA_LIB "!\n", stderr);
		abort();
	}

	initialized = true;
}

132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147

148
149
150
151

152
153

154
155
156
157

158
159

160
161
162
163

164
165

166
167
168
169

170
171

172
173
174
175

176
177

178
179
180
181

182
183

184
185
186
187

188
189

190
191
192
193

194
195

196
197
198
199

200
201

202
203
204
205

206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

224
225
226
227
228
229
230

231
232

233
234
235
236

237
238

239
240
241
242

243
244

245
246
247
248
249


250
251

252
253
254
255
256


257
258

259
260
261
262
263


264
265

266
267
268
269

270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287

288
289
290
291
292
293
294
295

296
297
298

299
300
301
302
303

304
305
306

307
308
309
310
311
312

313
314

315
316
317
318

319
320

321
322
323
324

325
326

327
328
329
330

331
332

333
334
335
336

337
338

339
340
341
342

343
344

345
346
347
348

349
350

351
352
353
354

355
356

357
358
359
360

361
362

363
364
365
366
367





368
369
370
371
372

373
374

375
376
377
378

379
380

381
382
383


384
385



386
387
388
389
390

391
392

393
394
395
396

397
398

399
400
401
402
403





404
405
406
407
408

409
410

411
412
413
414

415
416

417
418
419
420
421





422
423
424
425
426


427
428

429
430
431
432

433
434

435
436
437
438

439
440

441
442
443
444

445
446

447
448
449
450

451
452

453
454
455
456

457
458

459
460
461
462

463
464

465
466
467
468

469
470

471
472
473
474

475
476

477
478
479
480

481
482

483
484
485
486

487
488

489
490
491
492

493
494

495
496
497
498

499
500

501
502
503
504

505
506
507

508
509
510
511
512

513
514
515

516
517
518
519
520

521
522

523
524
525
526

527
528

529
530
531
532

533
534

535
536
537
538

539
540

541
542
543
544

545
546

547
548
549
550

551
552

553
554
555
556

557
558

559
560
561

562

563
564

565
566
567
568

569
570

571
572
573

574

575
576

577
578
579
580

581
582

583
240
241
242
243
244
245
246

247
248
249
250
251
252
253
254

255
256
257
258

259
260

261
262
263
264

265
266

267
268
269
270

271
272

273
274
275
276

277
278

279
280
281
282

283
284

285
286
287
288

289
290

291
292
293
294

295
296

297
298
299
300

301
302

303
304
305
306

307
308

309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337

338
339

340
341
342
343

344
345

346
347
348
349

350
351

352
353
354
355


356
357
358

359
360
361
362


363
364
365

366
367
368
369


370
371
372

373
374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394

395
396
397
398
399
400
401
402

403
404
405

406

407
408
409

410
411
412

413

414
415
416
417

418
419

420
421
422
423

424
425

426
427
428
429

430
431

432
433
434
435

436
437

438
439
440
441

442
443

444
445
446
447

448
449

450
451
452
453

454
455

456
457
458
459

460
461

462
463
464
465

466
467

468
469
470
471


472
473
474
475
476



477

478
479

480
481
482
483

484
485

486
487
488
489
490
491


492
493
494



495

496
497

498
499
500
501

502
503

504
505
506
507


508
509
510
511
512



513

514
515

516
517
518
519

520
521

522
523
524
525


526
527
528
529
530



531

532
533
534

535
536
537
538

539
540

541
542
543
544

545
546

547
548
549
550

551
552

553
554
555
556

557
558

559
560
561
562

563
564

565
566
567
568

569
570

571
572
573
574

575
576

577
578
579
580

581
582

583
584
585
586

587
588

589
590
591
592

593
594

595
596
597
598

599
600

601
602
603
604

605
606

607
608
609
610

611
612
613

614

615
616
617

618
619
620

621
622
623
624
625

626
627

628
629
630
631

632
633

634
635
636
637

638
639

640
641
642
643

644
645

646
647
648
649

650
651

652
653
654
655

656
657

658
659
660
661

662
663

664
665
666
667
668

669
670

671
672
673
674

675
676

677
678
679
680
681

682
683

684
685
686
687

688
689

690
691







-
+







-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

















-
+






-
+

-
+



-
+

-
+



-
+

-
+



-
-
+
+

-
+



-
-
+
+

-
+



-
-
+
+

-
+



-
+

















-
+







-
+


-
+
-



-
+


-
+
-




-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
-
+
+
+
+
+
-
-
-

-
+

-
+



-
+

-
+



+
+
-
-
+
+
+
-
-
-

-
+

-
+



-
+

-
+



-
-
+
+
+
+
+
-
-
-

-
+

-
+



-
+

-
+



-
-
+
+
+
+
+
-
-
-

-
+
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+


-
+
-



-
+


-
+




-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



-
+

-
+



+
-
+

-
+



-
+

-
+



+
-
+

-
+



-
+

-
+

DESTRUCTOR_P(ObjFWRT, 4000)
{
	dtor();
}
#endif

void
__objc_exec_class(void *module)
linklib___objc_exec_class(void *module)
{
	/*
	 * The compiler generates constructors that call into this, so it is
	 * possible that we are not set up yet when we get called.
	 */
	ctor();

	__objc_exec_class_m68k(module);
	__objc_exec_class(module);
}

IMP
objc_msg_lookup(id object, SEL selector)
linklib_objc_msg_lookup(id object, SEL selector)
{
	return objc_msg_lookup_m68k(object, selector);
	return objc_msg_lookup(object, selector);
}

IMP
objc_msg_lookup_stret(id object, SEL selector)
linklib_objc_msg_lookup_stret(id object, SEL selector)
{
	return objc_msg_lookup_stret_m68k(object, selector);
	return objc_msg_lookup_stret(object, selector);
}

IMP
objc_msg_lookup_super(struct objc_super *super, SEL selector)
linklib_objc_msg_lookup_super(struct objc_super *super, SEL selector)
{
	return objc_msg_lookup_super_m68k(super, selector);
	return objc_msg_lookup_super(super, selector);
}

IMP
objc_msg_lookup_super_stret(struct objc_super *super, SEL selector)
linklib_objc_msg_lookup_super_stret(struct objc_super *super, SEL selector)
{
	return objc_msg_lookup_super_stret_m68k(super, selector);
	return objc_msg_lookup_super_stret(super, selector);
}

Class
objc_lookUpClass(const char *name)
linklib_objc_lookUpClass(const char *name)
{
	return objc_lookUpClass_m68k(name);
	return objc_lookUpClass(name);
}

Class
objc_getClass(const char *name)
linklib_objc_getClass(const char *name)
{
	return objc_getClass_m68k(name);
	return objc_getClass(name);
}

Class
objc_getRequiredClass(const char *name)
linklib_objc_getRequiredClass(const char *name)
{
	return objc_getRequiredClass_m68k(name);
	return objc_getRequiredClass(name);
}

Class
objc_lookup_class(const char *name)
linklib_objc_lookup_class(const char *name)
{
	return objc_lookup_class_m68k(name);
	return objc_lookup_class(name);
}

Class
objc_get_class(const char *name)
linklib_objc_get_class(const char *name)
{
	return objc_get_class_m68k(name);
	return objc_get_class(name);
}

void
objc_exception_throw(id object)
linklib_objc_exception_throw(id object)
{
#ifdef OF_AMIGAOS_M68K
	/*
	 * This does not use the glue code to hack around a compiler bug.
	 *
	 * When using the generated inline stubs, the compiler does not emit
	 * any frame information, making the unwind fail. As unwind always
	 * starts from objc_exception_throw(), this means exceptions would
	 * never work. If, however, we're using a function pointer instead of
	 * the inline stub, the compiler does generate a frame and everything
	 * works fine.
	 */
	register void *a6 __asm__("a6") = ObjFWRTBase;
	uintptr_t throw = (((uintptr_t)ObjFWRTBase) - 0x60);
	((void (*)(id __asm__("a0")))throw)(object);
	(void)a6;
#else
	objc_exception_throw_m68k(object);
	objc_exception_throw(object);
#endif

	OF_UNREACHABLE
}

int
objc_sync_enter(id object)
linklib_objc_sync_enter(id object)
{
	return objc_sync_enter_m68k(object);
	return objc_sync_enter(object);
}

int
objc_sync_exit(id object)
linklib_objc_sync_exit(id object)
{
	return objc_sync_exit_m68k(object);
	return objc_sync_exit(object);
}

id
objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, bool atomic)
linklib_objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, bool atomic)
{
	return objc_getProperty_m68k(self, _cmd, offset, atomic);
	return objc_getProperty(self, _cmd, offset, atomic);
}

void
objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value, bool atomic,
    signed char copy)
linklib_objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value,
    bool atomic, signed char copy)
{
	objc_setProperty_m68k(self, _cmd, offset, value, atomic, copy);
	objc_setProperty(self, _cmd, offset, value, atomic, copy);
}

void
objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic,
    bool strong)
linklib_objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size,
    bool atomic, bool strong)
{
	objc_getPropertyStruct_m68k(dest, src, size, atomic, strong);
	objc_getPropertyStruct(dest, src, size, atomic, strong);
}

void
objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic,
    bool strong)
linklib_objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size,
    bool atomic, bool strong)
{
	objc_setPropertyStruct_m68k(dest, src, size, atomic, strong);
	objc_setPropertyStruct(dest, src, size, atomic, strong);
}

void
objc_enumerationMutation(id object)
linklib_objc_enumerationMutation(id object)
{
#ifdef OF_AMIGAOS_M68K
	/*
	 * This does not use the glue code to hack around a compiler bug.
	 *
	 * When using the generated inline stubs, the compiler does not emit
	 * any frame information, making the unwind fail. As a result
	 * objc_enumerationMutation() might throw an exception that could never
	 * be caught. If, however, we're using a function pointer instead of
	 * the inline stub, the compiler does generate a frame and everything
	 * works fine.
	 */
	register void *a6 __asm__("a6") = ObjFWRTBase;
	uintptr_t enumerationMutation = (((uintptr_t)ObjFWRTBase) - 0x8A);
	((void (*)(id __asm__("a0")))enumerationMutation)(object);
	(void)a6;
#else
	objc_enumerationMutation_m68k(object);
	objc_enumerationMutation(object);
#endif

	OF_UNREACHABLE
}

#ifdef HAVE_SJLJ_EXCEPTIONS
int
__gnu_objc_personality_sj0(int version, int actions, uint64_t exClass,
linklib___gnu_objc_personality_sj0(int version, int actions, uint64_t exClass,
    void *ex, void *ctx)
{
	return __gnu_objc_personality_sj0_m68k(version, actions, &exClass,
	return __gnu_objc_personality_sj0(version, actions, &exClass, ex, ctx);
	    ex, ctx);
}
#else
int
__gnu_objc_personality_v0(int version, int actions, uint64_t exClass,
linklib___gnu_objc_personality_v0(int version, int actions, uint64_t exClass,
    void *ex, void *ctx)
{
	return __gnu_objc_personality_v0_m68k(version, actions, &exClass,
	return __gnu_objc_personality_v0(version, actions, &exClass, ex, ctx);
	    ex, ctx);
}
#endif

id
objc_retain(id object)
linklib_objc_retain(id object)
{
	return objc_retain_m68k(object);
	return objc_retain(object);
}

id
objc_retainBlock(id block)
linklib_objc_retainBlock(id block)
{
	return objc_retainBlock_m68k(block);
	return objc_retainBlock(block);
}

id
objc_retainAutorelease(id object)
linklib_objc_retainAutorelease(id object)
{
	return objc_retainAutorelease_m68k(object);
	return objc_retainAutorelease(object);
}

void
objc_release(id object)
linklib_objc_release(id object)
{
	objc_release_m68k(object);
	objc_release(object);
}

id
objc_autorelease(id object)
linklib_objc_autorelease(id object)
{
	return objc_autorelease_m68k(object);
	return objc_autorelease(object);
}

id
objc_autoreleaseReturnValue(id object)
linklib_objc_autoreleaseReturnValue(id object)
{
	return objc_autoreleaseReturnValue_m68k(object);
	return objc_autoreleaseReturnValue(object);
}

id
objc_retainAutoreleaseReturnValue(id object)
linklib_objc_retainAutoreleaseReturnValue(id object)
{
	return objc_retainAutoreleaseReturnValue_m68k(object);
	return objc_retainAutoreleaseReturnValue(object);
}

id
objc_retainAutoreleasedReturnValue(id object)
linklib_objc_retainAutoreleasedReturnValue(id object)
{
	return objc_retainAutoreleasedReturnValue_m68k(object);
	return objc_retainAutoreleasedReturnValue(object);
}

id
objc_storeStrong(id *object, id value)
linklib_objc_storeStrong(id *object, id value)
{
	return objc_storeStrong_m68k(object, value);
	return objc_storeStrong(object, value);
}

id
objc_storeWeak(id *object, id value)
{
linklib_objc_storeWeak(id *object, id value)
{
	return objc_storeWeak(object, value);
}

	return objc_storeWeak_m68k(object, value);
}

id
objc_loadWeakRetained(id *object)
linklib_objc_loadWeakRetained(id *object)
{
	return objc_loadWeakRetained_m68k(object);
	return objc_loadWeakRetained(object);
}

id
objc_initWeak(id *object, id value)
linklib_objc_initWeak(id *object, id value)
{
	return objc_initWeak_m68k(object, value);
	return objc_initWeak(object, value);
}

void
linklib_objc_destroyWeak(id *object)
{
objc_destroyWeak(id *object)
{
	objc_destroyWeak(object);
}

	objc_destroyWeak_m68k(object);
}

id
objc_loadWeak(id *object)
linklib_objc_loadWeak(id *object)
{
	return objc_loadWeak_m68k(object);
	return objc_loadWeak(object);
}

void
objc_copyWeak(id *dest, id *src)
linklib_objc_copyWeak(id *dest, id *src)
{
	objc_copyWeak_m68k(dest, src);
	objc_copyWeak(dest, src);
}

void
objc_moveWeak(id *dest, id *src)
{
linklib_objc_moveWeak(id *dest, id *src)
{
	objc_moveWeak(dest, src);
}

	objc_moveWeak_m68k(dest, src);
}

SEL
sel_registerName(const char *name)
linklib_sel_registerName(const char *name)
{
	return sel_registerName_m68k(name);
	return sel_registerName(name);
}

const char *
sel_getName(SEL selector)
linklib_sel_getName(SEL selector)
{
	return sel_getName_m68k(selector);
	return sel_getName(selector);
}

bool
sel_isEqual(SEL selector1, SEL selector2)
{
linklib_sel_isEqual(SEL selector1, SEL selector2)
{
	return sel_isEqual(selector1, selector2);
}

	return sel_isEqual_m68k(selector1, selector2);
}

Class
objc_allocateClassPair(Class superclass, const char *name, size_t extraBytes)
linklib_objc_allocateClassPair(Class superclass, const char *name,
    size_t extraBytes)
{
	return objc_allocateClassPair_m68k(superclass, name, extraBytes);
	return objc_allocateClassPair(superclass, name, extraBytes);
}

void
objc_registerClassPair(Class class)
linklib_objc_registerClassPair(Class class)
{
	objc_registerClassPair_m68k(class);
	objc_registerClassPair(class);
}

unsigned int
objc_getClassList(Class *buffer, unsigned int count)
linklib_objc_getClassList(Class *buffer, unsigned int count)
{
	return objc_getClassList_m68k(buffer, count);
	return objc_getClassList(buffer, count);
}

Class *
objc_copyClassList(unsigned int *length)
linklib_objc_copyClassList(unsigned int *length)
{
	return objc_copyClassList_m68k(length);
	return objc_copyClassList(length);
}

bool
class_isMetaClass(Class class)
linklib_class_isMetaClass(Class class)
{
	return class_isMetaClass_m68k(class);
	return class_isMetaClass(class);
}

const char *
class_getName(Class class)
linklib_class_getName(Class class)
{
	return class_getName_m68k(class);
	return class_getName(class);
}

Class
class_getSuperclass(Class class)
linklib_class_getSuperclass(Class class)
{
	return class_getSuperclass_m68k(class);
	return class_getSuperclass(class);
}

unsigned long
class_getInstanceSize(Class class)
linklib_class_getInstanceSize(Class class)
{
	return class_getInstanceSize_m68k(class);
	return class_getInstanceSize(class);
}

bool
class_respondsToSelector(Class class, SEL selector)
linklib_class_respondsToSelector(Class class, SEL selector)
{
	return class_respondsToSelector_m68k(class, selector);
	return class_respondsToSelector(class, selector);
}

bool
class_conformsToProtocol(Class class, Protocol *protocol)
linklib_class_conformsToProtocol(Class class, Protocol *protocol)
{
	return class_conformsToProtocol_m68k(class, protocol);
	return class_conformsToProtocol(class, protocol);
}

IMP
class_getMethodImplementation(Class class, SEL selector)
linklib_class_getMethodImplementation(Class class, SEL selector)
{
	return class_getMethodImplementation_m68k(class, selector);
	return class_getMethodImplementation(class, selector);
}

IMP
class_getMethodImplementation_stret(Class class, SEL selector)
linklib_class_getMethodImplementation_stret(Class class, SEL selector)
{
	return class_getMethodImplementation_stret_m68k(class, selector);
	return class_getMethodImplementation_stret(class, selector);
}

const char *
class_getMethodTypeEncoding(Class class, SEL selector)
linklib_class_getMethodTypeEncoding(Class class, SEL selector)
{
	return class_getMethodTypeEncoding_m68k(class, selector);
	return class_getMethodTypeEncoding(class, selector);
}

bool
class_addMethod(Class class, SEL selector, IMP implementation,
linklib_class_addMethod(Class class, SEL selector, IMP implementation,
    const char *typeEncoding)
{
	return class_addMethod_m68k(class, selector, implementation,
	return class_addMethod(class, selector, implementation, typeEncoding);
	    typeEncoding);
}

IMP
class_replaceMethod(Class class, SEL selector, IMP implementation,
linklib_class_replaceMethod(Class class, SEL selector, IMP implementation,
    const char *typeEncoding)
{
	return class_replaceMethod_m68k(class, selector, implementation,
	return class_replaceMethod(class, selector, implementation,
	    typeEncoding);
}

Class
object_getClass(id object)
linklib_object_getClass(id object)
{
	return object_getClass_m68k(object);
	return object_getClass(object);
}

Class
object_setClass(id object, Class class)
linklib_object_setClass(id object, Class class)
{
	return object_setClass_m68k(object, class);
	return object_setClass(object, class);
}

const char *
object_getClassName(id object)
linklib_object_getClassName(id object)
{
	return object_getClassName_m68k(object);
	return object_getClassName(object);
}

const char *
protocol_getName(Protocol *protocol)
linklib_protocol_getName(Protocol *protocol)
{
	return protocol_getName_m68k(protocol);
	return protocol_getName(protocol);
}

bool
protocol_isEqual(Protocol *protocol1, Protocol *protocol2)
linklib_protocol_isEqual(Protocol *protocol1, Protocol *protocol2)
{
	return protocol_isEqual_m68k(protocol1, protocol2);
	return protocol_isEqual(protocol1, protocol2);
}

bool
protocol_conformsToProtocol(Protocol *protocol1, Protocol *protocol2)
linklib_protocol_conformsToProtocol(Protocol *protocol1, Protocol *protocol2)
{
	return protocol_conformsToProtocol_m68k(protocol1, protocol2);
	return protocol_conformsToProtocol(protocol1, protocol2);
}

void
objc_exit(void)
linklib_objc_exit(void)
{
	objc_exit_m68k();
	objc_exit();
}

objc_uncaught_exception_handler_t
linklib_objc_setUncaughtExceptionHandler(
objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t handler)
    objc_uncaught_exception_handler_t handler)
{
	return objc_setUncaughtExceptionHandler_m68k(handler);
	return objc_setUncaughtExceptionHandler(handler);
}

void
objc_setForwardHandler(IMP forward, IMP stretForward)
linklib_objc_setForwardHandler(IMP forward, IMP stretForward)
{
	objc_setForwardHandler_m68k(forward, stretForward);
	objc_setForwardHandler(forward, stretForward);
}

void
linklib_objc_setEnumerationMutationHandler(
objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t handler)
    objc_enumeration_mutation_handler_t handler)
{
	objc_setEnumerationMutationHandler_m68k(handler);
	objc_setEnumerationMutationHandler(handler);
}

void
objc_zero_weak_references(id value)
linklib_objc_zero_weak_references(id value)
{
	objc_zero_weak_references_m68k(value);
	objc_zero_weak_references(value);
}

Added src/runtime/morphos-clib.h version [752ecf36d7].




































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/* Functions that are only for the linklib. */
bool objc_init(unsigned int, struct objc_libc *, FILE *, FILE *);
/* All other functions. */
void __objc_exec_class(void *);
IMP objc_msg_lookup(id, SEL);
IMP objc_msg_lookup_stret(id, SEL);
IMP objc_msg_lookup_super(struct objc_super *, SEL);
IMP objc_msg_lookup_super_stret(struct objc_super *, SEL);
Class objc_lookUpClass(const char *);
Class objc_getClass(const char *);
Class objc_getRequiredClass(const char *);
Class objc_lookup_class(const char *);
Class objc_get_class(const char *);
void objc_exception_throw(id);
int objc_sync_enter(id);
int objc_sync_exit(id);
id objc_getProperty(id, SEL, ptrdiff_t, bool);
void objc_setProperty(id, SEL, ptrdiff_t, id, bool, signed char);
void objc_getPropertyStruct(void *, const void *, ptrdiff_t, bool, bool);
void objc_setPropertyStruct(void *, const void *, ptrdiff_t, bool, bool);
void objc_enumerationMutation(id);
int __gnu_objc_personality_v0(int, int, uint64_t *, void *, void *);
id objc_retain(id);
id objc_retainBlock(id);
id objc_retainAutorelease(id);
void objc_release(id);
id objc_autorelease(id);
id objc_autoreleaseReturnValue(id);
id objc_retainAutoreleaseReturnValue(id);
id objc_retainAutoreleasedReturnValue(id);
id objc_storeStrong(id *, id);
id objc_storeWeak(id *, id);
id objc_loadWeakRetained(id *);
id objc_initWeak(id *, id);
void objc_destroyWeak(id *);
id objc_loadWeak(id *);
void objc_copyWeak(id *, id *);
void objc_moveWeak(id *, id *);
SEL sel_registerName(const char *);
const char *sel_getName(SEL);
bool sel_isEqual(SEL, SEL);
Class objc_allocateClassPair(Class, const char *, size_t);
void objc_registerClassPair(Class);
unsigned int objc_getClassList(Class *, unsigned int);
Class *objc_copyClassList(unsigned int *);
bool class_isMetaClass(Class);
const char *class_getName(Class);
Class class_getSuperclass(Class);
unsigned long class_getInstanceSize(Class);
bool class_respondsToSelector(Class, SEL);
bool class_conformsToProtocol(Class, Protocol *);
IMP class_getMethodImplementation(Class, SEL);
IMP class_getMethodImplementation_stret(Class, SEL);
const char *class_getMethodTypeEncoding(Class, SEL);
bool class_addMethod(Class class_, SEL selector, IMP, const char *);
IMP class_replaceMethod(Class, SEL, IMP, const char *);
Class object_getClass(id);
Class object_setClass(id, Class);
const char *object_getClassName(id);
const char *protocol_getName(Protocol *);
bool protocol_isEqual(Protocol *, Protocol *);
bool protocol_conformsToProtocol(Protocol *, Protocol *);
void objc_exit(void);
objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t);
void objc_setForwardHandler(IMP, IMP);
void objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t);
void objc_zero_weak_references(id);

Added src/runtime/morphos.fd version [7e9de9f641].













































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
##base _ObjFWRTBase
##bias 30
##public
* Functions that are only for the linklib.
objc_init(version,libc,stdout,stderr)(d0,a0,a1,a2)
* These have a built-in declaration in the compiler that does not use the
 registers and thus always need glue.
__objc_exec_class(module)(a0)
objc_msg_lookup(object,selector)(a0,a1)
objc_msg_lookup_stret(object,selector)(a0,a1)
objc_msg_lookup_super(super,selector)(a0,a1)
objc_msg_lookup_super_stret(super,selector)(a0,a1)
objc_lookUpClass(name)(a0)
objc_getClass(name)(a0)
objc_getRequiredClass(name)(a0)
objc_lookup_class(name)(a0)
objc_get_class(name)(a0)
objc_exception_throw(object)(a0)
objc_sync_enter(object)(a0)
objc_sync_exit(object)(a0)
objc_getProperty(self,_cmd,offset,atomic)(a0,a1,d0,d1)
objc_setProperty(self,_cmd,offset,value,atomic,copy)(a0,a1,d0,a2,d1,d2)
objc_getPropertyStruct(dest,src,size,atomic,strong)(a0,a1,d0,d1,d2)
objc_setPropertyStruct(dest,src,size,atomic,strong)(a0,a1,d0,d1,d2)
objc_enumerationMutation(object)(a0)
__gnu_objc_personality_v0(version,actions,exClass,ex,ctx)(d0,d1,d2,a0,a1)
__gnu_objc_personality_sj0(version,actions,exClass,ex,ctx)(d0,d1,d2,a0,a1)
objc_retain(object)(a0)
objc_retainBlock(block)(a0)
objc_retainAutorelease(object)(a0)
objc_release(object)(a0)
objc_autorelease(object)(a0)
objc_autoreleaseReturnValue(object)(a0)
objc_retainAutoreleaseReturnValue(object)(a0)
objc_retainAutoreleasedReturnValue(object)(a0)
objc_storeStrong(object,value)(a0,a1)
objc_storeWeak(object,value)(a0,a1)
objc_loadWeakRetained(object)(a0)
objc_initWeak(object,value)(a0,a1)
objc_destroyWeak(object)(a0)
objc_loadWeak(object)(a0)
objc_copyWeak(dest,src)(a0,a1)
objc_moveWeak(dest,src)(a0,a1)
* These only need glue on MorphOS. As none of them are functions that are used
 in hot paths, it's easier to also use the glue on AmigaOS 3, which also has
 the benefit of having all __saveds in a single place.
sel_registerName(name)(a0)
sel_getName(selector)(a0)
sel_isEqual(selector1,selector2)(a0,a1)
objc_allocateClassPair(superclass,name,extraBytes)(a0,a1,d0)
objc_registerClassPair(class_)(a0)
objc_getClassList(buffer,count)(a0,d0)
objc_copyClassList(length)(a0)
class_isMetaClass(class_)(a0)
class_getName(class_)(a0)
class_getSuperclass(class_)(a0)
class_getInstanceSize(class_)(a0)
class_respondsToSelector(class_,selector)(a0,a1)
class_conformsToProtocol(class_,p)(a0,a1)
class_getMethodImplementation(class_,selector)(a0,a1)
class_getMethodImplementation_stret(class_,selector)(a0,a1)
class_getMethodTypeEncoding(class_,selector)(a0,a1)
class_addMethod(class_,selector,implementation,typeEncoding)(a0,a1,a2,a3)
class_replaceMethod(class_,selector,implementation,typeEncoding)(a0,a1,a2,a3)
object_getClass(object)(a0)
object_setClass(object,class_)(a0,a1)
object_getClassName(object)(a0)
protocol_getName(protocol)(a0)
protocol_isEqual(protocol1,protocol2)(a0,a1)
protocol_conformsToProtocol(protocol1,protocol2)(a0,a1)
objc_exit()()
objc_setUncaughtExceptionHandler(handler)(a0)
objc_setForwardHandler(forward,stretForward)(a0,a1)
objc_setEnumerationMutationHandler(handler)(a0)
objc_zero_weak_references(value)(a0)
##end

Deleted src/runtime/morphos.sfd version [7018b90896].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

















































































-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
==base _ObjFWRTBase
==basetype struct Library *
==libname objfw_rt_0_abox.library
==bias 30
==public
* Functions that are only for the linklib.
bool objc_init_m68k(unsigned int version, struct objc_libc *libc, FILE *stdout, FILE *stdin)(d0,a0,a1,a2)
* These have a built-in declaration in the compiler that does not use the
* registers and thus always need glue.
void __objc_exec_class_m68k(void *_Nonnull module)(a0)
IMP _Nonnull objc_msg_lookup_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_stret_m68k(id _Nullable object, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_super_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1)
IMP _Nonnull objc_msg_lookup_super_stret_m68k(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1)
Class _Nullable objc_lookUpClass_m68k(const char *_Nonnull name)(a0)
Class _Nullable objc_getClass_m68k(const char *_Nonnull name)(a0)
Class _Nonnull objc_getRequiredClass_m68k(const char *_Nonnull name)(a0)
Class _Nullable objc_lookup_class_m68k(const char *_Nonnull name)(a0)
Class _Nonnull objc_get_class_m68k(const char *_Nonnull name)(a0)
void objc_exception_throw_m68k(id _Nonnull object)(a0)
int objc_sync_enter_m68k(id _Nullable object)(a0)
int objc_sync_exit_m68k(id _Nullable object)(a0)
id objc_getProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1)
void objc_setProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2)
void objc_getPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2)
void objc_setPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2)
void objc_enumerationMutation_m68k(id _Nonnull object)(a0)
int __gnu_objc_personality_v0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1)
int __gnu_objc_personality_sj0_m68k(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1)
id _Nullable objc_retain_m68k(id _Nullable object)(a0)
id _Nullable objc_retainBlock_m68k(id _Nullable block)(a0)
id _Nullable objc_retainAutorelease_m68k(id _Nullable object)(a0)
void objc_release_m68k(id _Nullable object)(a0)
id _Nullable objc_autorelease_m68k(id _Nullable object)(a0)
id _Nullable objc_autoreleaseReturnValue_m68k(id _Nullable object)(a0)
id _Nullable objc_retainAutoreleaseReturnValue_m68k(id _Nullable object)(a0)
id _Nullable objc_retainAutoreleasedReturnValue_m68k(id _Nullable object)(a0)
id _Nullable objc_storeStrong_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
id _Nullable objc_storeWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
id _Nullable objc_loadWeakRetained_m68k(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_initWeak_m68k(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1)
void objc_destroyWeak_m68k(id _Nullable *_Nonnull object)(a0)
id _Nullable objc_loadWeak_m68k(id _Nullable *_Nonnull object)(a0)
void objc_copyWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1)
void objc_moveWeak_m68k(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1)
* These only need glue on MorphOS. As none of them are functions that are used
* in hot paths, it's easier to also use the glue on AmigaOS 3, which also has
* the benefit of having all __saveds in a single place.
SEL _Nonnull sel_registerName_m68k(const char *_Nonnull name)(a0)
const char *_Nonnull sel_getName_m68k(SEL _Nonnull selector)(a0)
bool sel_isEqual_m68k(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1)
Class _Nonnull objc_allocateClassPair_m68k(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0)
void objc_registerClassPair_m68k(Class _Nonnull class_)(a0)
unsigned int objc_getClassList_m68k(Class _Nonnull *_Nullable buffer, unsigned int count)(a0,d0)
Class _Nonnull *_Nonnull objc_copyClassList_m68k(unsigned int *_Nullable length)(a0)
bool class_isMetaClass_m68k(Class _Nullable class_)(a0)
const char *_Nullable class_getName_m68k(Class _Nullable class_)(a0)
Class _Nullable class_getSuperclass_m68k(Class _Nullable class_)(a0)
unsigned long class_getInstanceSize_m68k(Class _Nullable class_)(a0)
bool class_respondsToSelector_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
bool class_conformsToProtocol_m68k(Class _Nullable class_, Protocol *_Nonnull p)(a0,a1)
IMP _Nullable class_getMethodImplementation_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
IMP _Nullable class_getMethodImplementation_stret_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
const char *_Nullable class_getMethodTypeEncoding_m68k(Class _Nullable class_, SEL _Nonnull selector)(a0,a1)
bool class_addMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3)
IMP _Nullable class_replaceMethod_m68k(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3)
Class _Nullable object_getClass_m68k(id _Nullable object)(a0)
Class _Nullable object_setClass_m68k(id _Nullable object, Class _Nonnull class_)(a0,a1)
const char *_Nullable object_getClassName_m68k(id _Nullable object)(a0)
const char *_Nonnull protocol_getName_m68k(Protocol *_Nonnull protocol)(a0)
bool protocol_isEqual_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1)
bool protocol_conformsToProtocol_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1)
void objc_exit_m68k(void)()
_Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler_m68k(objc_uncaught_exception_handler_t _Nullable handler)(a0)
void objc_setForwardHandler_m68k(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1)
void objc_setEnumerationMutationHandler_m68k(objc_enumeration_mutation_handler_t _Nullable handler)(a0)
void objc_zero_weak_references_m68k(id _Nonnull value)(a0)
* SysV functions for MorphOS could be added here for performance. Having them
* in addition to the m68k functions allows m68k applications to call into the
* PPC library, while native code can use the SysV functions.
==end