Repository navigation
feat(t27b): native AArch64 backend for a subset of t27, no LLVM - #5979
Merged
Merged
Conversation
New workspace crate cli/t27b. It mounts t27c's front end (bootstrap/src/compiler.rs, use_resolve.rs) unchanged, lowers the typed AST to its own IR, and compiles that IR to A64 machine code. The code is run in-process from a MAP_JIT region (`t27b test`) or written as a Mach-O MH_OBJECT (`t27b build`). Integer semantics are defined: overflow traps or wraps (--overflow) and a shift amount outside [0, width) traps. A reference interpreter (eval.rs) is the oracle for a seeded differential test of 2500 random programs per overflow mode; there are 0 mismatches. The JIT is arm64 macOS only. On other hosts the crate still builds and Jit::load returns an error; the differential test is compiled only on arm64 macOS. Coverage is 37 of 1174 specs; widening it is #5977. Closes #5976 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
gHashTag
marked this pull request as ready for review
October 4, 2026 09:21
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This was referenced Oct 4, 2026
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.
Summary
A new workspace crate,
cli/t27b, compiles a subset of t27 straight to AArch64 machine code. LLVM, zig, clang and rustc are not involved.Parserandtypecheck_ast, mounted by path and unchanged. The sealed compiler is not modified.front(typed AST) ->lower(t27b IR) ->codegen(A64 words) -> one of two outputs:jit: MAP_JIT, run in-process;macho: aMH_OBJECTfile.evalis a reference interpreter over the same IR.--overflow trap|wrap). A shift amount outside[0, width)traps.cargo check --target x86_64-unknown-linux-gnu -p t27b --all-targetspasses) andJit::loadreturns an error.Measured
The machine was heavily loaded, so treat the speed figures as approximate.
t27c gen+zig test, mediant27c gen-c+ clangcargo test --release -p t27bon this brancht27b corpus specson this branchternary_model, a real spec bug fixed in #5975), 0 JIT/interpreter mismatchesBugs it found
ternary_model.t27shifts ani32by up to 52, and its test expected wrong values.gen-carithmetic UB and the Zig signed%compile failure: in progress.module a.b;in t27c: in progress.Follow-up
Wider coverage is #5977: structs, string literals, enums, invariant blocks and casts. It will come as a separate PR.
Closes #5976. Part of #5905.
🤖 Generated with Claude Code