Differences From Artifact [478a2413e5]:
- File src/runtime/linklib/linklib.m — part of check-in [b3f32186dd] at 2018-05-05 18:06:22 on branch trunk — runtime: Let objc_get*Class return Class (user: js, size: 5864) [annotate] [blame] [check-ins using]
To Artifact [6215304d3d]:
- File
src/runtime/linklib/linklib.m
— part of check-in
[482698c5be]
at
2018-05-06 21:39:06
on branch trunk
— runtime: Make Amiga library work with -fbaserel
This currently uses __saveds on all exported functions for simplicity.
As an optimization, __saveds can be removed from some functions later
after careful verification that no code path starting from that function
accesses any data. (user: js, size: 6014) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
74 75 76 77 78 79 80 | ._Unwind_GetIP = _Unwind_GetIP, ._Unwind_GetGR = _Unwind_GetGR, ._Unwind_SetIP = _Unwind_SetIP, ._Unwind_SetGR = _Unwind_SetGR, ._Unwind_Resume = _Unwind_Resume, .__register_frame_info = __register_frame_info, .__deregister_frame_info = __deregister_frame_info, | < < | | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | ._Unwind_GetIP = _Unwind_GetIP, ._Unwind_GetGR = _Unwind_GetGR, ._Unwind_SetIP = _Unwind_SetIP, ._Unwind_SetGR = _Unwind_SetGR, ._Unwind_Resume = _Unwind_Resume, .__register_frame_info = __register_frame_info, .__deregister_frame_info = __deregister_frame_info, }; objc_init(&libc, stdout, stderr); initialized = true; } OF_DESTRUCTOR() { CloseLibrary(ObjFWRTBase); |
︙ | ︙ | |||
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | * 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. */ uintptr_t throw = (((uintptr_t)ObjFWRTBase) - 0x60); ((void (*)(id OBJC_M68K_REG("a0")))throw)(object); OF_UNREACHABLE } int objc_sync_enter(id object) { | > > | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | * 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 OBJC_M68K_REG("a6") = ObjFWRTBase; uintptr_t throw = (((uintptr_t)ObjFWRTBase) - 0x60); ((void (*)(id OBJC_M68K_REG("a0")))throw)(object); (void)a6; OF_UNREACHABLE } int objc_sync_enter(id object) { |
︙ | ︙ | |||
224 225 226 227 228 229 230 | * 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. */ | > | | > > > | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | * 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 OBJC_M68K_REG("a6") = ObjFWRTBase; uintptr_t enumerationMutation = (((uintptr_t)ObjFWRTBase) - 0x8A); ((void (*)(id OBJC_M68K_REG("a0")))enumerationMutation)(object); (void)a6; OF_UNREACHABLE } int __gnu_objc_personality_v0(int version, int actions, uint64_t ex_class, void *ex, void *ctx) { return glue___gnu_objc_personality_v0(version, actions, &ex_class, ex, ctx); } |