]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
more complete eflags testing for multiplication (P4 case only)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 2 Dec 2003 21:55:34 +0000 (21:55 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 2 Dec 2003 21:55:34 +0000 (21:55 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@479 c046a42c-6fe2-441c-8c8c-71466251a162

tests/test-i386.c

index 821b79b65d5f19b227d3c9825151c8709ddafb73..0718f5a0e51fc7f30470d659b894706d5b2a85d2 100644 (file)
@@ -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);