Happy New Year!
Optimize generated code to NQD & CheckLoad functions. They don't call into 68k or MacOS code, so they don't need to be a termination point. i.e. don't split into two basic blocks and thus avoid a full hash search. Also add missing NQD_unknown_hook NativeOp from previous commit.
NQD dirty boxes, generic code + while we are at it, also rename a few NQD related NativeOps.
Add patches for native GetNamedResource() and Get1NamedResource(). This will be useful to fix a bug in the AppleShare extension (see DRVR .AFPTranslator in Basilisk II) Unrelated improvement: call sheepshaver_cpu::get_resource() directly, don't get it through another global function.
Fix typo for AO_transmit_packet() thunk.
Minor tweaks to support compilation of ether.cpp within MacOS. i.e. mostly migrate the Ethernet driver to the MacOS side. This is enabled for DIRECT_ADDRESSING cases. I didn't want to alter much of ether.cpp (as it would have required to support that mode). Of course, in REAL_ADDRESSING mode (the default) and for debugging purposes, the old driver is still available.
Don't fake the TVECT value on non-BeOS native systems. This is important for systems that use a global r2 as the TLS register, e.g. Linux/ppc with newer glibc. Also remove the syscall junk which were simply workarounds for this bug. Remove a duplicate r2 restoration in EmulOp. BTW, it's possible to get SheepShaver running on Linux/ppc systems with NPTL rather than SheepThreads.
Initial support for NetBSD/ppc in native mode (some crashes occur but I could boot MacOS 9.0.4)
Implement Direct Addressing mode similarly to Basilisk II. This is to get SheepShaver working on OSes that don't support maipping of Low Memory globals at 0x00000000, e.g. Windows.
Don't handle XLM_IRQ_NEST atomically in emulated mode. That's useless since this variable is modified only within a single thread and interrupts are not handled asynchronously.
Extend NativeOp count to 64 (6-bit value), aka fix NATIVE_FILLRECT opcpdes. Translate NQD_{bitblt,fillrect,invrect} to direct native calls. Use Mac2HostAddr() for converting Mac base address to native.
Basic fillrect/invrect NQD. Code may need to be factored out somehow. Verify that bitblt NQD transfer modes are really CopyBits() ones [MB5].
Start Native QuickDraw acceleration
Generate PowerPC code wrapping GetResource() replacements. That way, it's a normal PPC function invocation that can be JIT compiled to native code instead of nesting execute() calls which may lead to use the interpreter (this took around 11% of total execution time on boot, downto 3%). Also, optimize some SheepShaver EmulOps and actually report non-CTI.
Darwin function descriptors act as Linux ones
Fix native mode, a better solution would be to also add GetResource() patches into the native_op[] table in native mode too.
Also cache native routine descriptor instead of recreating them at each invokation to ExecuteNative().
Use a unique ExecuteNative() interface in any case, i.e. native & emulated
Add new thunking system for 64-bit fixes.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.