Repository navigation
Add the Mixed Mode ABI service, checked against Mac OS 9.2.2 - #49
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
GraphiteMixedModetarget that decodes routine descriptors and procedure information, and decides what a universal procedure pointer calls, as data for the host to run. A new Retro68 probe captured Mac OS 9.2.2's behavior, and the tests check Graphite against it. This is the Mixed Mode half of stage 5 in the BlueBox requirements: descriptor format and selection move into Graphite, and the host keeps CPU invocation.What Mac OS 9.2.2 showed
The capture is
ReferenceTests/Retro68/MixedMode-macos-9.2.2-ppc.txt, summarized in the Retro68 README. It coversCallUniversalProccalled from PowerPC code.NewRoutineDescriptorwrites 32 bytes: one record with kUseNativeISA and the ISA byte as given, even 02, 10 or 11. A nil procedure gives nil with MemError 0.NewFatRoutineDescriptorwrites 52 bytes: a 68k record, then a PowerPC one, with no flags.Changes
ProcedureInformationdecodes ProcInfo words into stack, register-based, dispatched and special-case layouts, following Inside Macintosh's bit layout. It rejects unknown conventions, registers and special cases, and bits after the last parameter.RoutineDescriptorreads and writes the guest format: a 12-byte header and 20-byte records, big-endian. It rejects other trap words, versions other than 7, negative routine counts and truncated input.MixedMode:MixedModeInvocation: a 68k entry point, a PowerPC transition vector, or a fragment still to be prepared.NewRoutineDescriptor,NewFatRoutineDescriptorandDisposeRoutineDescriptoroverHeapZone.For reviewers
Testing
swift testpasses: all 16 test runs, including 11 newGraphiteMixedModeTests. The byte-layout tests parse the capture's descriptor dumps directly.