Repository navigation
Conversation
…gister carries a piece A convention row states whether an integer narrower than 32 bits travels extended by its signedness or with its upper bits undefined, as aapcs64 leaves them and darwinpcs and risc-v extend them. The abi legalisation carries a float piece in a vector register as in a float one, a whole vector there as it is, and 16 bytes there as two 64 bit lanes, as aarch64's v registers take them.
…ss models The two rows classify as clang does: floats, short vectors and homogeneous aggregates of up to four members in v0 to v7, read from the type view, x8 for a result by reference, 16 byte aligned pairs at an even register, slot packing under aapcs64 and natural packing and stacked unnamed values under darwinpcs. x18 is reserved on darwin, and each row states its tls descriptor clobbers. AArch64 states its nan rule as fpcr.dn clear runs it, propagate, and the sve unit as a scalable z unit under sve. The registers are named through a stand-in handle module until masc publishes generated ones (masc#440).
… the frame code and the moves The table covers the integer, float, conversion, memory, atomic, call, address and constant operations a native type reaches, and the neon subset with smull, smull2, smlal, smlal2, addv and saddlv selected directly. LSE atomics are chosen where admitted and exclusive-pair loops otherwise. The record joins it to masc's aarch64 set in the register family's registry.
…as a pair Code gains pairs, none by default, and Step a stored and a loaded pair. aarch64 states stp and ldp for an x doubleword and a v register's d and q views, refusing a pair out of their reach as unpaired.
…ompact unwind takes a frame whose record is its first pair keeps_shape no longer refuses pair_saves: the prologue and epilogues pair two adjacent saves of one size where the frame code has a pair and move them one at a time otherwise. Compact unwind admits a non-empty frame whose frame pointer and link are saved first, adjacent and above every other save, the stp fp, lr shape darwin's arm64 encoding reads.
…rl_exit test/example/exit holds one stub per architecture family and system, riscv-linux.s as before and aarch64-linux.s and aarch64-darwin.s, and the example lane assembles the one of each lane target.
…g leaves, and ties an accumulator only where masc reads and writes it
# Conflicts: # src/target/register/aarch64/axes.mach
…d-in masc 24126ea publishes a register.Id per row and a class index per class, the same values the stand-in held, so every aarch64 file names gen_register and register.mach is gone.
Every expansion is named for the pattern and form it serves, grouped by kind with a comment over each group, and the loop operand lists are named for the step they feed. The rules, constants, holds and loops are unchanged.
# Conflicts: # doc/machine/emit.md # src/machine/frame/code.mach # src/machine/frame/lay.mach # src/target/register/isa.mach # test/example.sh
…first or the first signalling Nans.propagate carries a Propagation of the default nan and a priority. x86 gives the first nan operand, and the folder chooses the first signalling one where a target states that priority. aarch64 keeps its rule as it was here, stated in the next commit.
…ositive default nan
A load or store of ptr.add(base, c), an extending load among them, binds the base and the constant: the scaled unsigned immediate where it reaches, the unscaled signed nine bits otherwise.
…dd's operands are taken in Propagation gains fused: the ir's operands, the addend first as aarch64's FPMulAdd calls FPProcessNaNs3, or unordered as x86's fma forms, whose operand order follows the form the selection chose. The folder takes an fma's nan in the stated order and refuses one with two or more nan operands where none is stated.
octalide
marked this pull request as ready for review
October 17, 2026 03:14
octalide
enabled auto-merge
October 17, 2026 03:15
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.
Closes #42
What
AArch64 end to end on the register family: the AAPCS64 and darwinpcs convention rows, the AArch64 Isa record with its selection table, frame code, moves and exclusive loops, the frame's paired saves and the compact unwind shape, and start stubs for Linux and darwin.
src/target/register/aarch64/abi.mach): one classifier for both rows, as clang classifies. HFA and HVA of 1 to 4 members are read fromabi.view, unions included. A value over 16 bytes travels by reference, x8 carries an indirect result, v8 to v15 keep their low 64 bits, and a darwin unnamed value goes to the stack.Convention.narrowis new and states how an integer below 32 bits travels: undefined upper bits under aapcs64, extended under darwinpcs. The abi legalisation accepts vector-kind pieces for floats and short vectors.rules.machwithhook.mach): integer, float, conversion, memory, atomic, call, address and constant operations. movz and movk, movn or a single orr for constants. cbz, cbnz, tbz and tbnz where they fit, csel and fcsel with the compare fused. LSE atomics under the extension and ldaxr and stlxr loops (loop.mach) without it. Float to integer saturates by fcvtzs and fcvtzu, with a branch-free cmp and csel clamp for a narrow destination. smull, smull2, smlal, smlal2, addv and saddlv, and their unsigned forms, are selected directly.Code.pairsand the pair steps let a set move two adjacent saves in one instruction, and aarch64 states stp and ldp.keeps_shapeno longer refusespair_saves, and admits a compact unwind frame whose record is its first pair saved (own commit, J1 touches the same function).test/example/exit-aarch64.sandexit-aarch64-darwin.s, on J1's scaffolding. No aarch64 lane target is added, since its run is in mirl-V1: verification of the v7 transition #342.doc/isa/aarch64.md, and the frame doc's pairs and compact shape.Ran locally:
mach check . -a mirlclean at each commit pushed. No unit tests added, per the v7 process.Plan
Nans.propagatecarries aPropagationof the default NaN and a priority (own commit), AArch64 states FPProcessNaNs, and loads and stores take constant offsets.masc.isa.aarch64.gen_register, and no new aarch64 stage needs binding records carried, since the frame's paired saves are prologue instructions finish already records.8a. Read the rules and loops as maintained source. Done.
Choices
Convention.narrowis a new field rather than an assumption about extension.Pairscomment now says so.Nans.propagatenow carriesPropagation{default, priority}, withPriorityeitherfirst(x86) orsignalling(AArch64). The folder's choice of NaN operand reads it.Propagation.fusedstatesfma's operand order:addendfirst on AArch64 (FPMulAdd calls FPProcessNaNs3 so),unorderedon x86, whose 132, 213 and 231 forms take the IR's operands in whichever order the selection chose, so the fold refuses an x86fmawith two or more NaN operands asnan.Source.address: AArch64's rows in masc state the base register and the offset as separate operands, not one memory operand, so a load ofptr.add(base, c)binds the base and the constant directly, as RISC-V's do.exit-aarch64.sandexit-aarch64-darwin.sbesideexit.sand the x86 stubs.Moved to #342
Limits
unboundwhen encoded. ELF TLS waits on masc#441, the others on mink's neutral aarch64 relocation kinds and masc's rebinding.aapcs64winis not carried (mink#70).ldr,str) or unscaled (ldur,stur). The register offset form[base, index, lsl #n]is not selected: masc states its extend and amount as enumerants, so an index is added into the base first.Checklist
mach check . -a '*'andmach build . -a clilocally, CI builds)