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
This commit is contained in:
bellard 2003-12-02 21:55:34 +00:00
parent 163a7cb620
commit 791c2261d6
1 changed files with 14 additions and 9 deletions

View 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);