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
|
#include "config.h"
#import "ObjFWRT.h"
#import "private.h"
extern struct Library *ObjFWRTBase;
bool
objc_init(unsigned int version, struct objc_libc *libc)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(unsigned int __asm__("d0"), struct objc_libc *__asm__("a0")))(((uintptr_t)ObjFWRTBase) - 30))(version, libc);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(unsigned int, struct objc_libc *))*(void **)(((uintptr_t)ObjFWRTBase) - 28))(version, libc);
#endif
}
void
__objc_exec_class(struct objc_module *_Nonnull module)
{
#if defined(OF_AMIGAOS_M68K)
|
>
>
>
>
|
|
|
|
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
|
#include "config.h"
#import "ObjFWRT.h"
#import "private.h"
extern struct Library *ObjFWRTBase;
#if OF_GCC_VERSION >= 1100
# pragma GCC diagnostic ignored "-Warray-parameter"
#endif
bool
objc_init(unsigned int version, struct objc_libC *libC)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(unsigned int __asm__("d0"), struct objc_libC *__asm__("a0")))(((uintptr_t)ObjFWRTBase) - 30))(version, libC);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(unsigned int, struct objc_libC *))*(void **)(((uintptr_t)ObjFWRTBase) - 28))(version, libC);
#endif
}
void
__objc_exec_class(struct objc_module *_Nonnull module)
{
#if defined(OF_AMIGAOS_M68K)
|