Skip to content

[x86] Render floating-point compare pseudo-ops and predicate enums - #8637

Open
zznop wants to merge 2 commits into
devfrom
test_float_cmp_pseudo_ops
Open

zznop wants to merge 2 commits into
devfrom
test_float_cmp_pseudo_ops

Conversation

@zznop

@zznop zznop commented Oct 6, 2026

Copy link
Copy Markdown
Member

Floating-point comparisons were displayed as _mm_cmpeq_* even when their predicate selected a different operation. This adds predicate-specific disassembly for SSE comparisons and VEX scalar comparisons, with symbolic predicate arguments in decompiled output. For example, cmpsd xmm0, xmm1, 6 renders as cmpnlesd xmm0, xmm1, and its intrinsic uses _mm_cmp_sd(..., CMP_NLE_US).

Disassembly and predicate enums share one definition table. Noncanonical immediate bytes remain explicit, and existing intrinsic IDs, operand widths, and lifting behavior are preserved.

This PR also contains a small fix for the Python API which now resolves ILIntrinsic.inputs and .outputs by numeric ID, preventing SSE and VEX intrinsics with shared display names from returning each other’s metadata.

Closes #4024

Before:
image

After:
image

@zznop zznop added this to the Langara milestone Oct 6, 2026
@zznop
zznop requested a review from plafosse October 6, 2026 17:51
@zznop zznop self-assigned this Oct 6, 2026
@zznop zznop added Arch: x86 Issues with the x86/x64 architecture plugin Impact: Medium Issue is impactful with a bad, or no, workaround labels Oct 6, 2026
zznop added 2 commits October 7, 2026 10:40
Use shared predicate definitions to render SSE and VEX scalar comparison
pseudo-ops in disassembly and lift them to matching intrinsics, such as
cmpeqsd(a, b).
Resolve ILIntrinsic.inputs and outputs by numeric intrinsic ID instead
of display name. This prevents intrinsics with shared names, such as
SSE and VEX comparisons, from exposing another intrinsic's signature.
@zznop
zznop force-pushed the test_float_cmp_pseudo_ops branch from 74a1796 to 828fbed Compare October 7, 2026 14:47
@zznop

zznop commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Updated PR to use an intrinsic for each pseudo op

image

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

Arch: x86 Issues with the x86/x64 architecture plugin Impact: Medium Issue is impactful with a bad, or no, workaround

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support compsd Pseudo-Op

1 participant