Skip to content

frontend: Add NewLabelStatement and LabelType - #1064

Merged
flofriday merged 6 commits into
masterfrom
feature/newlabel-statement
Aug 31, 2026
Merged

frontend: Add NewLabelStatement and LabelType#1064
flofriday merged 6 commits into
masterfrom
feature/newlabel-statement

Conversation

@benjaminkasper99

@benjaminkasper99 benjaminkasper99 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This PR implements Solution 1 proposed in the comments of #148.

The introduced NewLabelStatement is lowered to the existing VIAM NewLabelNode, which is used by the LCB to emit assembly labels when expanding instruction sequences. This allows us to finally remove the HardcodeLGALabelPass.

Note that the spec changes of this PR break the rv32im assembler and linker in the sense that they produce incorrect binaries. Because of this I disabled two CodeEmitter tests. The issue will be fixed and the tests re-enabled with the follow-up PR #1071.

@benjaminkasper99 benjaminkasper99 linked an issue Aug 19, 2026 that may be closed by this pull request
@github-actions github-actions Bot added the enhancement New feature or request label Aug 19, 2026
@benjaminkasper99
benjaminkasper99 force-pushed the feature/newlabel-statement branch from e8e6650 to f84c317 Compare August 24, 2026 11:52
@benjaminkasper99
benjaminkasper99 marked this pull request as ready for review August 24, 2026 12:33

@flofriday flofriday left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall quite good, some issues need to be fixed but shouldn't be too much.

In the future, could you maybe turn off the automatic whole-file-formatting in your editor? The reformats were all fine so I left them now, but for one it makes reviewing harder because it's not initially clear why you even touched that code and secondly it clutters the git history.

I know it's a shame that our checkstyle rules aren't strict enough to not have catched them in the first place.

Comment thread vadl-frontend/main/vadl/ast/nodes/InstructionSequenceStatement.java Outdated
Comment thread vadl-frontend/main/vadl/ast/nodes/NewLabelStatement.java Outdated
Comment thread vadl-frontend/main/vadl/ast/nodes/PseudoInstructionDefinition.java
Comment thread vadl-frontend/main/vadl/ast/BehaviorLowering.java Outdated
Comment thread vadl-frontend/main/vadl/ast/BehaviorLowering.java Outdated
Comment thread vadl-frontend/main/vadl/ast/BehaviorLowering.java Outdated
Comment thread vadl/main/vadl/pass/order/ViamPassOrder.java
Comment thread vadl/main/vadl/types/LabelType.java
Comment thread vadl/main/vadl/types/LabelType.java
@github-actions github-actions Bot added the lcb This is LCB related label Aug 26, 2026
Comment thread vadl/main/vadl/viam/graph/dependency/LabelNode.java

@flofriday flofriday left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎂

@benjaminkasper99
benjaminkasper99 force-pushed the feature/newlabel-statement branch from e69dca0 to 15abc3e Compare August 28, 2026 06:10
@benjaminkasper99
benjaminkasper99 force-pushed the feature/newlabel-statement branch 2 times, most recently from e82676f to ca1506d Compare August 31, 2026 07:54
@benjaminkasper99
benjaminkasper99 force-pushed the feature/newlabel-statement branch from ca1506d to e9c236f Compare August 31, 2026 08:15
@flofriday
flofriday enabled auto-merge August 31, 2026 09:09
@flofriday
flofriday merged commit b48bb11 into master Aug 31, 2026
7 checks passed
@flofriday
flofriday deleted the feature/newlabel-statement branch August 31, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lcb This is LCB related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lcb: Wrong label for %pcrel_lo in -fPIC

3 participants