Differences From Artifact [25dbff61eb]:
- File src/runtime/amiga-glue.m — part of check-in [3ed710dc03] at 2018-05-06 18:42:35 on branch trunk — runtime: Add ARC methods to headers and Amiga lib (user: js, size: 5840) [annotate] [blame] [check-ins using]
To Artifact [3114ab4ae0]:
- File
src/runtime/amiga-glue.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: 5708) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
17 18 19 20 21 22 23 | #include "config.h" #import "ObjFW_RT.h" #import "private.h" #import "macros.h" | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | < | | < | | < | | | | | | < | < | | | | | | < | | < | | 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 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 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 | #include "config.h" #import "ObjFW_RT.h" #import "private.h" #import "macros.h" void __saveds glue___objc_exec_class(void *module OBJC_M68K_REG("a0")) { __objc_exec_class(module); } IMP __saveds glue_objc_msg_lookup(id obj OBJC_M68K_REG("a0"), SEL sel OBJC_M68K_REG("a1")) { return objc_msg_lookup(obj, sel); } IMP __saveds glue_objc_msg_lookup_stret(id obj OBJC_M68K_REG("a0"), SEL sel OBJC_M68K_REG("a1")) { return objc_msg_lookup_stret(obj, sel); } IMP __saveds glue_objc_msg_lookup_super(struct objc_super *super OBJC_M68K_REG("a0"), SEL sel OBJC_M68K_REG("a1")) { return objc_msg_lookup_super(super, sel); } IMP __saveds glue_objc_msg_lookup_super_stret(struct objc_super *super OBJC_M68K_REG("a0"), SEL sel OBJC_M68K_REG("a1")) { return objc_msg_lookup_super_stret(super, sel); } Class __saveds glue_objc_lookUpClass(const char *name OBJC_M68K_REG("a0")) { return objc_lookUpClass(name); } Class __saveds glue_objc_getClass(const char *name OBJC_M68K_REG("a0")) { return objc_getClass(name); } Class __saveds glue_objc_getRequiredClass(const char *name OBJC_M68K_REG("a0")) { return objc_getRequiredClass(name); } Class __saveds glue_objc_lookup_class(const char *name OBJC_M68K_REG("a0")) { return objc_lookup_class(name); } Class __saveds glue_objc_get_class(const char *name OBJC_M68K_REG("a0")) { return objc_get_class(name); } void __saveds glue_objc_exception_throw(id object OBJC_M68K_REG("a0")) { objc_exception_throw(object); OF_UNREACHABLE } int __saveds glue_objc_sync_enter(id object OBJC_M68K_REG("a0")) { return objc_sync_enter(object); } int __saveds glue_objc_sync_exit(id object OBJC_M68K_REG("a0")) { return objc_sync_exit(object); } id __saveds glue_objc_getProperty(id self OBJC_M68K_REG("a0"), SEL _cmd OBJC_M68K_REG("a1"), ptrdiff_t offset OBJC_M68K_REG("d0"), bool atomic OBJC_M68K_REG("d1")) { return objc_getProperty(self, _cmd, offset, atomic); } void __saveds glue_objc_setProperty(id self OBJC_M68K_REG("a0"), SEL _cmd OBJC_M68K_REG("a1"), ptrdiff_t offset OBJC_M68K_REG("d0"), id value OBJC_M68K_REG("a2"), bool atomic OBJC_M68K_REG("d1"), signed char copy OBJC_M68K_REG("d2")) { objc_setProperty(self, _cmd, offset, value, atomic, copy); } void __saveds glue_objc_getPropertyStruct(void *dest OBJC_M68K_REG("a0"), const void *src OBJC_M68K_REG("a1"), ptrdiff_t size OBJC_M68K_REG("d0"), bool atomic OBJC_M68K_REG("d1"), bool strong OBJC_M68K_REG("d2")) { objc_getPropertyStruct(dest, src, size, atomic, strong); } void __saveds glue_objc_setPropertyStruct(void *dest OBJC_M68K_REG("a0"), const void *src OBJC_M68K_REG("a1"), ptrdiff_t size OBJC_M68K_REG("d0"), bool atomic OBJC_M68K_REG("d1"), bool strong OBJC_M68K_REG("d2")) { objc_setPropertyStruct(dest, src, size, atomic, strong); } void __saveds glue_objc_enumerationMutation(id obj OBJC_M68K_REG("a0")) { objc_enumerationMutation(obj); } int __saveds glue___gnu_objc_personality_v0(int version OBJC_M68K_REG("d0"), int actions OBJC_M68K_REG("d1"), uint64_t *ex_class OBJC_M68K_REG("d2"), void *ex OBJC_M68K_REG("a0"), void *ctx OBJC_M68K_REG("a1")) { return __gnu_objc_personality_v0(version, actions, *ex_class, ex, ctx); } id __saveds glue_objc_retain(id object OBJC_M68K_REG("a0")) { return objc_retain(object); } id __saveds glue_objc_retainBlock(id block OBJC_M68K_REG("a0")) { return objc_retainBlock(block); } id __saveds glue_objc_retainAutorelease(id object OBJC_M68K_REG("a0")) { return objc_retainAutorelease(object); } void __saveds glue_objc_release(id object OBJC_M68K_REG("a0")) { objc_release(object); } id __saveds glue_objc_autorelease(id object OBJC_M68K_REG("a0")) { return objc_autorelease(object); } id __saveds glue_objc_autoreleaseReturnValue(id object OBJC_M68K_REG("a0")) { return objc_autoreleaseReturnValue(object); } id __saveds glue_objc_retainAutoreleaseReturnValue(id object OBJC_M68K_REG("a0")) { return objc_retainAutoreleaseReturnValue(object); } id __saveds glue_objc_retainAutoreleasedReturnValue(id object OBJC_M68K_REG("a0")) { return objc_retainAutoreleasedReturnValue(object); } id __saveds glue_objc_storeStrong(id *object OBJC_M68K_REG("a0"), id value OBJC_M68K_REG("a1")) { return objc_storeStrong(object, value); } id __saveds glue_objc_storeWeak(id *object OBJC_M68K_REG("a0"), id value OBJC_M68K_REG("a1")) { return objc_storeWeak(object, value); } id __saveds glue_objc_loadWeakRetained(id *object OBJC_M68K_REG("a0")) { return objc_loadWeakRetained(object); } id __saveds glue_objc_initWeak(id *object OBJC_M68K_REG("a0"), id value OBJC_M68K_REG("a1")) { return objc_initWeak(object, value); } void __saveds glue_objc_destroyWeak(id *object OBJC_M68K_REG("a0")) { objc_destroyWeak(object); } id __saveds glue_objc_loadWeak(id *object OBJC_M68K_REG("a0")) { return objc_loadWeak(object); } void __saveds glue_objc_copyWeak(id *dest OBJC_M68K_REG("a0"), id *src OBJC_M68K_REG("a1")) { objc_copyWeak(dest, src); } void __saveds glue_objc_moveWeak(id *dest OBJC_M68K_REG("a0"), id *src OBJC_M68K_REG("a1")) { objc_moveWeak(dest, src); } |