33 |
#define TEST_CMOV 0 |
#define TEST_CMOV 0 |
34 |
#define TEST_FCOMI 0 |
#define TEST_FCOMI 0 |
35 |
//#define LINUX_VM86_IOPL_FIX |
//#define LINUX_VM86_IOPL_FIX |
36 |
|
//#define TEST_P4_FLAGS |
37 |
|
|
38 |
#define xglue(x, y) x ## y |
#define xglue(x, y) x ## y |
39 |
#define glue(x, y) xglue(x, y) |
#define glue(x, y) xglue(x, y) |
353 |
} |
} |
354 |
|
|
355 |
#undef CC_MASK |
#undef CC_MASK |
356 |
|
#ifdef TEST_P4_FLAGS |
357 |
|
#define CC_MASK (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A) |
358 |
|
#else |
359 |
#define CC_MASK (CC_O | CC_C) |
#define CC_MASK (CC_O | CC_C) |
360 |
|
#endif |
361 |
|
|
362 |
#define OP mul |
#define OP mul |
363 |
#include "test-i386-muldiv.h" |
#include "test-i386-muldiv.h" |
365 |
#define OP imul |
#define OP imul |
366 |
#include "test-i386-muldiv.h" |
#include "test-i386-muldiv.h" |
367 |
|
|
|
#undef CC_MASK |
|
|
#define CC_MASK (0) |
|
|
|
|
|
#define OP div |
|
|
#include "test-i386-muldiv.h" |
|
|
|
|
|
#define OP idiv |
|
|
#include "test-i386-muldiv.h" |
|
|
|
|
368 |
void test_imulw2(int op0, int op1) |
void test_imulw2(int op0, int op1) |
369 |
{ |
{ |
370 |
int res, s1, s0, flags; |
int res, s1, s0, flags; |
401 |
"imull", s0, s1, res, flags & CC_MASK); |
"imull", s0, s1, res, flags & CC_MASK); |
402 |
} |
} |
403 |
|
|
404 |
|
#undef CC_MASK |
405 |
|
#define CC_MASK (0) |
406 |
|
|
407 |
|
#define OP div |
408 |
|
#include "test-i386-muldiv.h" |
409 |
|
|
410 |
|
#define OP idiv |
411 |
|
#include "test-i386-muldiv.h" |
412 |
|
|
413 |
void test_mul(void) |
void test_mul(void) |
414 |
{ |
{ |
415 |
test_imulb(0x1234561d, 4); |
test_imulb(0x1234561d, 4); |