Skip to content

Diff ARM punctuation - #424

Merged
LagoLunatic merged 1 commit into
encounter:mainfrom
AetiasHax:diff-arm-punctuation
Oct 19, 2026
Merged

LagoLunatic merged 1 commit into
encounter:mainfrom
AetiasHax:diff-arm-punctuation

Conversation

@AetiasHax

Copy link
Copy Markdown
Contributor

When two ARM32 instructions differ only by punctuation, the diff algorithm considers them equivalent. This PR fixes that by overriding more functions from unarm::FormatIns to cause such punctuation to be opaque arguments rather than basic text.

A couple examples:

Before After
image image
image image

More precisely, the following instruction fragments went from basic text to opaque arguments:

  • Deref brackets: [ and ]
  • Writeback flag: !
  • RRX shift op: rrx
  • LDM/STM user mode flag: ^
  • Deref negative offset flag: - as in [rn, -rm]
  • Optional ROR shift op in unsigned-extend instructions (UXTB, UXTH, etc.): ror

This change is based on the newly released unarm 2.3.0 which adds some of the FormatIns functions that were overriden here. A side effect of this version bump is that unarm 2.2.0 fixes some obscure bugs not related to this PR.

Treats `[`, `]`, `!`, `rrx`, `^` and `-` (as in `[rn, -rm]` derefs) as opaque arguments so they are included in the diff algo
@LagoLunatic
LagoLunatic merged commit 6629a9b into encounter:main Oct 19, 2026
23 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.

2 participants