ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/thunks.cpp
(Generate patch)

Comparing SheepShaver/src/thunks.cpp (file contents):
Revision 1.9 by gbeauche, 2004-04-22T22:54:46Z vs.
Revision 1.13 by gbeauche, 2005-06-23T16:23:31Z

# Line 55 | Line 55 | uint32 NativeOpcode(int selector)
55   {
56          uint32 opcode;
57          switch (selector) {
58        case NATIVE_DISABLE_INTERRUPT:
59        case NATIVE_ENABLE_INTERRUPT:
58          case NATIVE_CHECK_LOAD_INVOC:
59                  opcode = POWERPC_NATIVE_OP(0, selector);
60                  break;
# Line 151 | Line 149 | static void generate_powerpc_thunks(void
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);
# Line 217 | Line 215 | bool ThunksInit(void)
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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines