1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2022 Jonathan Schleifer <js@nil.im>
*
* 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.
*
|
|
|
1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2023 Jonathan Schleifer <js@nil.im>
*
* 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.
*
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
bool
OFInit(unsigned int version, struct OFLibC *_Nonnull libc, struct Library *_Nonnull RTBase)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((bool (*)(unsigned int __asm__("d0"), struct OFLibC *_Nonnull __asm__("a0"), struct Library *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 30))(version, libc, RTBase);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((bool (*)(unsigned int, struct OFLibC *_Nonnull, struct Library *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc, RTBase);
|
|
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
bool
OFInit(unsigned int version, struct OFLibC *_Nonnull libc, struct Library *_Nonnull RTBase)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((bool (*)(unsigned int __asm__("d0"), struct OFLibC *_Nonnull __asm__("a0"), struct Library *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 30))(version, libc, RTBase);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((bool (*)(unsigned int, struct OFLibC *_Nonnull, struct Library *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc, RTBase);
|