Repository navigation
x86: honor mandatory 66 prefix in 16-bit mode - #3184
ricardojrdez wants to merge 1 commit into
Conversation
|
Note that #3185 also modifies the same condition in |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #3184 +/- ##
=======================================
Coverage ? 61.88%
=======================================
Files ? 243
Lines ? 56934
Branches ? 10128
=======================================
Hits ? 35233
Misses ? 16498
Partials ? 5203 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
db4054f to
9a40e3d
Compare
| insns: [] | ||
| - | ||
| input: | ||
| name: "x86 (16-bit): 66 is the mandatory prefix of COMISD" |
There was a problem hiding this comment.
Also add a negative test (missing 66 prefix).
There was a problem hiding this comment.
Added the negative test case (0f 2f 00 -> comiss, dword operand).
Note that this case also passes without the fix, as its purpose is to act as a regression check ensuring that the fix doesn't mistakenly decode 0f 2f as COMISD when the 0x66 prefix is missing.
- 66 0f 2f 00 (16): the 66 prefix is now taken as the mandatory prefix in 16-bit mode when it selects another instruction, so this decodes as COMISD with a qword operand instead of COMISS. - 66 0f ef c0 (16): for the same reason, PXOR now uses the SSE2 xmm registers instead of the MMX ones.
9a40e3d to
1788db1
Compare
Your checklist for this pull request
Detailed description
in 16-bit mode when it selects another instruction, so this decodes as
COMISD with a qword operand instead of COMISS.
registers instead of the MMX ones.
Test plan
Added 4 regression tests in
tests/issues/x86-mandatory-prefixes.yamlto cover the fix. 3 of them fail before the change.