149 |
|
assert(xlm_index != -1 && check_load_invoc_index != -1); |
150 |
|
|
151 |
|
uint32 check_load_invoc_opcode = NativeOpcode(NATIVE_CHECK_LOAD_INVOC); |
152 |
< |
uintptr base; |
152 |
> |
uint32 base; |
153 |
|
|
154 |
|
// GetResource() |
155 |
|
get_resource_func = base = SheepMem::Reserve(get_resource_template_size); |
215 |
|
native_op[NATIVE_R_GET_RESOURCE].func = r_get_resource_func; |
216 |
|
#endif |
217 |
|
#else |
218 |
< |
#if defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)) |
218 |
> |
#if defined(__linux__) || defined(__NetBSD__) || (defined(__APPLE__) && defined(__MACH__)) |
219 |
|
#define DEFINE_NATIVE_OP(ID, FUNC) do { \ |
220 |
|
uintptr base = SheepMem::Reserve(8); \ |
221 |
|
WriteMacInt32(base + 0, (uint32)FUNC); \ |
222 |
< |
WriteMacInt32(base + 4, 0); /*Fake TVECT*/ \ |
222 |
> |
WriteMacInt32(base + 4, (uint32)TOC); \ |
223 |
|
native_op[ID].tvect = base; \ |
224 |
|
native_op[ID].func = (uint32)FUNC; \ |
225 |
|
} while (0) |