diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2024-09-07 12:57:38 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2024-09-07 12:57:38 +0100 |
commit | 43c64eee8dd08d61d029be5a30c0edc098d282ab (patch) | |
tree | a71e412b1fefd3abf89093ca4830a5cf3ba1c46e /test | |
parent | 8bb4226f07b1e9ee79f3429a1495eaa694b13334 (diff) |
Un-break and re-fix x86
The last fix was, uh, not good. With any luck this is actually correct
now. Certainly, running many millions of test cases fails to find any
mismatch with udis, so it's at least a lot less wrong than it was.
Diffstat (limited to 'test')
-rw-r--r-- | test/x86.test.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/x86.test.c b/test/x86.test.c index c0c825a..bf6e6e8 100644 --- a/test/x86.test.c +++ b/test/x86.test.c @@ -37,9 +37,14 @@ TEST("mov AL, moff8 instructions should be decoded correctly") { return true; } -TEST("fiadd [off16] instructions should be decoded correctly") { +TEST("16-bit MRM instructions should be decoded correctly") { const uchar fiadd_off16[] = HEXBYTES(67, DA, 06, DF, 11); - return x86_len(fiadd_off16) == 5; + const uchar fld_tword[] = HEXBYTES(67, DB, 2E, 99, C4); + const uchar add_off16_bl[] = HEXBYTES(67, 00, 1E, F5, BB); + if (x86_len(fiadd_off16) != 5) return false; + if (x86_len(fld_tword) != 5) return false; + if (x86_len(add_off16_bl) != 5) return false; + return true; } // vi: sw=4 ts=4 noet tw=80 cc=80 |