Skip to content

release: v2.8.0#1664

Merged
octalide merged 14 commits into
mainfrom
dev
Jun 27, 2026
Merged

release: v2.8.0#1664
octalide merged 14 commits into
mainfrom
dev

Conversation

@octalide

Copy link
Copy Markdown
Collaborator

Integration merge of dev into main for the v2.8.0 release.

Since v2.7.0:

Tag v2.8.0 will be pushed on the merge commit. v2.8.0 ships the #1657 fix the mach-std riscv64-linux runtime CI needs (#307).

octalide added 14 commits June 26, 2026 22:40
…shift

encode_shift resolved the value operand (rs1) with req_gpr, which rejects an
immediate, unlike every other reg-reg ALU encoder (encode_alu3, encode_addsub,
encode_compare, the divide family all use resolve_source). A constant value
shifted by a runtime amount (1 << node) reached the encoder as a bare immediate
and failed with 'encode: expected a register operand', surfaced whenever the
shift result fed a call-argument slot.

Resolve the value operand through resolve_source/SCRATCH2 so a constant is
materialized into the scratch register before the reg-reg sll/srl/sra, matching
the rest of the encoder. Covers all three shift forms (left, logical right,
arithmetic right) and the RV64 word forms. Adds a byte-exact regression test.

Closes #1657
…able

A format declares whether it is a container-free flat image (`produces_image`
true) or a relocatable-object format that round-trips through `.o` files. elf,
coff, and macho round-trip (false); raw is a flat image (true). The build
driver dispatches on this rather than assuming every target emits and re-parses
`.o` files.

refs #1616
Split the disk-input `link` into a shared `link_modules` core plus two entry
points: `link` reads and parses `.o` inputs from disk as before, and the new
`link_images` links an already-built `of.ObjectImage` array straight from
memory. `link_modules` never owns the modules - the caller frees them - so the
in-memory codegen images stay owned by the build driver. The merge, symbol
resolution, relocation patching, and segment layout are identical on both
paths, so the existing object-centric output is byte-unchanged.

refs #1616
When the target's object format is a flat image (`produces_image`), the build
links the in-memory codegen images directly through `linker.link_images`,
bypassing the per-module `.o` emit/parse round-trip a flat image has no parser
for. The relocatable formats (elf, coff, macho) keep writing and re-parsing
per-module objects unchanged. A flat image has only an executable form, so
library mode and `--emit obj` are rejected for it.

Closes #1616
`os_id_for` has accepted `freestanding` since #1613, but the unknown-os error
still read `(expected: linux, darwin, windows)`. List it.

Closes #1617
Add .github/ISSUE_TEMPLATE/ with per-type markdown templates for feature,
bug, problem, epic, rfc, and chore. Each one pre-attaches its type label
and scaffolds the body shape we use, and config.yml turns off blank
issues so the standard always applies. The fields a template cannot set
(the milestone and the area and target labels) are left to a sidebar
reminder and to the local mach-issue tooling.

Part of #1658
A minimal os=freestanding, of=raw x86_64 program (a counted loop summing 0..9,
then a raw exit syscall) that builds end to end to a flat image through the new
in-memory image link path. verify.sh asserts no .o was written (the round-trip
was bypassed), confirms the output is a container-free flat binary (no ELF
header), then mmaps the position-independent image and runs it to assert exit
code 45. A CI lane builds a compiler from source and runs it; it needs only a C
compiler for the loader harness.

refs #1616
Extend the freestanding rv64 fixture with na(node) = g(0, 1 << node, ...), the
exact #1657 pattern: a constant value shifted by a runtime amount used as a call
argument. Fold its result into the asserted exit code (45 + 8 = 53) and assert
the sll mnemonic is emitted. The unfixed backend fails to encode this fixture,
so the lane guards the regression end to end.
fix(target): raw flat-image build path via produces_image predicate
…allarg

fix(target/isa/riscv64): materialize const value operand of variable shift
chore(infra): add GitHub issue templates
@octalide octalide merged commit 9ebcabe into main Jun 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant