From 43c64eee8dd08d61d029be5a30c0edc098d282ab Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 7 Sep 2024 12:57:38 +0100 Subject: 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. --- test/x86.test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3