summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-12-02 21:55:34 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-12-02 21:55:34 +0000
commit791c2261d6f1d9fbb1c6d1194129828009f9025e (patch)
treea7f6585311a26747e9691ac38c20b076ee1f20b5 /tests
parent163a7cb6207f3a412da54b8d213571812338a044 (diff)
more complete eflags testing for multiplication (P4 case only)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@479 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tests')
-rw-r--r--tests/test-i386.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/test-i386.c b/tests/test-i386.c
index 821b79b65..0718f5a0e 100644
--- a/tests/test-i386.c
+++ b/tests/test-i386.c
@@ -33,6 +33,7 @@
#define TEST_CMOV 0
#define TEST_FCOMI 0
//#define LINUX_VM86_IOPL_FIX
+//#define TEST_P4_FLAGS
#define xglue(x, y) x ## y
#define glue(x, y) xglue(x, y)
@@ -352,7 +353,11 @@ void test_jcc(void)
}
#undef CC_MASK
+#ifdef TEST_P4_FLAGS
+#define CC_MASK (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A)
+#else
#define CC_MASK (CC_O | CC_C)
+#endif
#define OP mul
#include "test-i386-muldiv.h"
@@ -360,15 +365,6 @@ void test_jcc(void)
#define OP imul
#include "test-i386-muldiv.h"
-#undef CC_MASK
-#define CC_MASK (0)
-
-#define OP div
-#include "test-i386-muldiv.h"
-
-#define OP idiv
-#include "test-i386-muldiv.h"
-
void test_imulw2(int op0, int op1)
{
int res, s1, s0, flags;
@@ -405,6 +401,15 @@ void test_imull2(int op0, int op1)
"imull", s0, s1, res, flags & CC_MASK);
}
+#undef CC_MASK
+#define CC_MASK (0)
+
+#define OP div
+#include "test-i386-muldiv.h"
+
+#define OP idiv
+#include "test-i386-muldiv.h"
+
void test_mul(void)
{
test_imulb(0x1234561d, 4);