Repository navigation
fix(s3): cover INT_EQUAL/INT_NOTEQUAL in opflags_for seam shim (#150 regression) - #152
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regression
decompile-all fmt --jsonstarted erroring functions with a panic:opflags_for(the W6TypeOp-flags seam) enumerated the ordering comparisons (INT_LESS/INT_LESSEQUAL/INT_SLESS/INT_SLESSEQUAL) but not the equality comparisons, and its unlisted armpanic!s. ThemarkLabelBumpUpport (#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 anINT_EQUALnow reachesopflags_for. Pre-#150 nofmtfunction exercised that path (I randecompile-all fmt --jsoncleanly on the pre-#150 base).Fix
Add
INT_EQUAL | INT_NOTEQUAL => binary | booloutput | commutative, matching GhidraTypeOpEqual/TypeOpNotEqual(typeop.cc:929/993, bothopflags = binary | booloutput | commutative).After the fix
decompile-all fmt --jsoncompletes with 160/160 functions, 0 errored.Tests / gates
opflags_for_covers_int_equality.make test— 675/675, PARITY OKmake test-stages— 256/256, PARITY OKmake rust-test— 4241 passed, 0 failed🤖 Generated with Claude Code
https://claude.ai/code/session_01JJimTmF4YYsbdAumrkyPoL