Skip to content

Resolve ARM and Thumb VFP conditions through semantic flag groups - #8639

Open
plafosse wants to merge 1 commit into
devfrom
test_armv7_semantic_float_flags
Open

plafosse wants to merge 1 commit into
devfrom
test_armv7_semantic_float_flags

Conversation

@plafosse

@plafosse plafosse commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

ARM and Thumb GE after a VFP comparison currently expands into N == V, producing (a < b) == is_unordered(a, b) in higher IL. Emit semantic flag groups and classify VFP flag writes as floating point so the resolver can produce LLIL_FCMP_GE directly.

Map only predicates that exactly match the VFP NZCV outcomes. Conditions that include unordered outcomes, and conditions with mixed reaching flag definitions, retain the architectural flag expression. Integer condition mappings are preserved; VFP carry inversion uses boolean-width NOT.

@plafosse
plafosse force-pushed the test_armv7_semantic_float_flags branch from d156ff6 to 6de29f2 Compare October 7, 2026 13:11
Emit semantic condition groups in ARM and Thumb lifted IL and classify VFP comparison flag writes separately from integer writes. GE can then resolve directly to floating >= before MLIL or HLIL propagation.

Map only floating conditions that exactly match the architectural NZCV outcomes, preserving flag expansion for unordered-inclusive conditions and mixed definitions. Keep carry inversion boolean-sized and update lifting expectations.

Add public regression tests for all 14 conditions in ARM and Thumb mode at both floating widths, including NaNs, signed zero, infinities, overwritten flags, and integer comparison controls.

Validation: all 62 public semantic tests pass against the existing core, and the existing ARM/Thumb lifting suite passes.
@plafosse
plafosse force-pushed the test_armv7_semantic_float_flags branch from 6de29f2 to 48fdf1c Compare October 7, 2026 13:45
@plafosse
plafosse requested a review from zznop October 7, 2026 16:23
@plafosse plafosse self-assigned this Oct 7, 2026
@plafosse
plafosse marked this pull request as ready for review October 7, 2026 16:24

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.

1 participant