Skip to content

fix(s3): cover INT_EQUAL/INT_NOTEQUAL in opflags_for seam shim (#150 regression) - #152

Merged
mahaloz merged 1 commit into
mainfrom
fix/opflags-int-equal
Jul 8, 2026
Merged

mahaloz merged 1 commit into
mainfrom
fix/opflags-int-equal

Conversation

@mahaloz

@mahaloz mahaloz commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Regression

decompile-all fmt --json started erroring functions with a panic:

ruleaction_3::opflags_for: no W6 opflags entry for CPUI_INT_EQUAL
(a rule produced an opcode not covered by this seam shim)

opflags_for (the W6 TypeOp-flags seam) enumerated the ordering comparisons (INT_LESS/INT_LESSEQUAL/INT_SLESS/INT_SLESSEQUAL) but not the equality comparisons, and its unlisted arm panic!s. The markLabelBumpUp port (#150) hoists loop-head labels out of loop conditions — typically ==/!= guards — which drives a rule to re-set such a guard's opcode through this seam, so an INT_EQUAL now reaches opflags_for. Pre-#150 no fmt function exercised that path (I ran decompile-all fmt --json cleanly on the pre-#150 base).

Fix

Add INT_EQUAL | INT_NOTEQUAL => binary | booloutput | commutative, matching Ghidra TypeOpEqual/TypeOpNotEqual (typeop.cc:929/993, both opflags = binary | booloutput | commutative).

After the fix decompile-all fmt --json completes with 160/160 functions, 0 errored.

Tests / gates

  • New direct regression unit test opflags_for_covers_int_equality.
  • make test — 675/675, PARITY OK
  • make test-stages — 256/256, PARITY OK
  • make rust-test — 4241 passed, 0 failed

🤖 Generated with Claude Code

https://claude.ai/code/session_01JJimTmF4YYsbdAumrkyPoL

 regression)

`decompile-all fmt --json` began erroring functions with a panic:

  ruleaction_3::opflags_for: no W6 opflags entry for CPUI_INT_EQUAL
  (a rule produced an opcode not covered by this seam shim)

`opflags_for` (the W6 TypeOp-flags seam) enumerated the ordering comparisons
(INT_LESS / INT_LESSEQUAL / INT_SLESS / INT_SLESSEQUAL) but not the equality
comparisons, and its unlisted arm panics. The `markLabelBumpUp` port (#150)
hoists loop-head labels out of loop *conditions* — typically `==`/`!=` guards —
which drives a rule to re-set such a guard's opcode through this seam, so an
INT_EQUAL now reaches `opflags_for` and panics. Pre-#150 no fmt function
exercised that path.

Add `INT_EQUAL | INT_NOTEQUAL => binary | booloutput | commutative`, matching
Ghidra `TypeOpEqual`/`TypeOpNotEqual` (typeop.cc:929/993). After the fix
`decompile-all fmt --json` completes with 160/160 functions, 0 errored.

Gates: make test 675/675 PARITY OK; make test-stages 256/256 PARITY OK;
make rust-test 4241/0 (adds a direct opflags_for regression unit test).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01JJimTmF4YYsbdAumrkyPoL
@mahaloz
mahaloz merged commit 922aa29 into main Jul 8, 2026
@mahaloz
mahaloz deleted the fix/opflags-int-equal branch July 29, 2026 08:01
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.

1 participant