Skip to content

chore: Update Arm64ValueAccumulator logics - #3283

Draft
filzrev wants to merge 9 commits into
dotnet:masterfrom
filzrev:chore-refactor-arm64valueaccumulator-logics
Draft

filzrev wants to merge 9 commits into
dotnet:masterfrom
filzrev:chore-refactor-arm64valueaccumulator-logics

Conversation

@filzrev

@filzrev filzrev commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains following changes.

What's changed in this PR

Reorganize exiting ValueAccumulator logics. and introduce following breaking changes.

Behavior Changes

1. ValueAccumulator return address as ulong
Change address Value type to ulong to align AsmArm64.
It's handled internally with ulong + long representation to support negative offset.

2. Remove expectedMovkShift variable.
Existing implementation assume LSL #16/#32/#48 instructions in sequencial order.
By this PR changes, It can accept MOVK instruction in any order and missing cases.

3. Broaden Arm64RegisterValueAccumulator tracking continuation

  • LookingForPossibleLdr reprocesses MOVZ/ADRP so a new constant load starts immediately
  • TBZ/TBNZ are treated as ignorable conditional branches (consistent with CBZ/CBNZ)
  • ExpectingAdd is included in HasValue, enabling address resolution for adrp; br tail calls
  • Overwrite check moved to a shared default branch with reprocessing.

4. Migrate BelongToGroup helper methods to use AsmArm64 implementation

5. Add shifted immediate value support for MOVZ/ADD instructions

@filzrev filzrev changed the title chore: Update Arm64ValueAccumulator logicso chore: Update Arm64ValueAccumulator logics Oct 6, 2026
@filzrev
filzrev force-pushed the chore-refactor-arm64valueaccumulator-logics branch from 6bd938b to 401f01d Compare October 16, 2026 20:16
@filzrev
filzrev force-pushed the chore-refactor-arm64valueaccumulator-logics branch from f0e7f03 to 1d43542 Compare October 16, 2026 20:40
@filzrev
filzrev force-pushed the chore-refactor-arm64valueaccumulator-logics branch from 1bf439e to d545ca6 Compare October 16, 2026 21:37
@timcassell

Copy link
Copy Markdown
Collaborator

I'm looking to release 0.16.0 before Nov 1, do you think this will be ready before that @filzrev?

This branch has not been deployed

No deployments
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.

2 participants