Repository navigation
Follow-up: design a V-native assembler (#28447) #29270
Replies: 2 comments
Sequencing updateThe native assembler remains the longer-term portability path. The diagnostics |
Revised sequenceOption 3 is now the selected path: define a V-native assembly IR and build a The IR and backend work should not require Perl in normal builds or contributor The native assembler work in this issue is therefore the backend and validation |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to #28447.
Context
#28447 documents and tests the C-backend paths for inline and external
assembly. A V-native, non-C-backend assembler was intentionally excluded and
needs a separate compiler design effort.
Goal
Provide a V-level assembly representation that can be validated and lowered
by native backends without requiring GNU inline assembly, MASM, or a C
compiler. The design should support crypto kernels without becoming a full
source-compatible clone of every external assembler.
Proposed implementation tasks
calling conventions, symbol visibility, labels, branches, memory operands,
fixed registers, clobbers, stack-frame control, and whether
callissupported in the first version.
the minimum instruction set, register classes, immediate ranges, alignment,
relocation, and object-format requirements for each target.
labels, directives, register constraints, clobbers, and ABI metadata. Keep
target-specific instruction validation in backend-owned tables.
operand widths, clobbers, addressing modes, labels, immediates, and ABI
usage before code generation.
instruction encoding or emission, relocations, symbol handling, and object
or executable integration.
callee-saved registers, stack alignment, return values, aggregates, and
platform-specific symbol naming.
operands, fixed-register constraints, clobbers, and relocation failures.
AST/checker while keeping register and instruction rules target-specific.
and the boundary between native assembly and the existing C-backend path.
Acceptance criteria
compiler, using the documented native backend path.
it, with tested stack alignment and callee-saved register behavior.
diagnostics.
target-specific rules correctly.
Non-goals
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
All reactions