Conversation
…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
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(release): v2.8.0
chore(infra): add GitHub issue templates
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.
Integration merge of dev into main for the v2.8.0 release.
Since v2.7.0:
produces_imagepredicate) enabling realos=freestanding, of=rawbuilds (target: raw object format has no path through the object-centric build pipeline #1616)1 << node) as a call argument fails to materialize the value operand #1657)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).