Enable some qemu fpu tests that were previously not working
This commit is contained in:
parent
e2a055481b
commit
18e7741f3f
|
@ -1,7 +1,5 @@
|
|||
|
||||
CC=gcc
|
||||
CC_I386=$(CC) -m32
|
||||
QEMU_INCLUDES += -I../..
|
||||
CFLAGS=-Wall -O2 -g -fno-strict-aliasing -static -mmmx -msse
|
||||
LDFLAGS=
|
||||
|
||||
|
@ -9,9 +7,8 @@ LDFLAGS=
|
|||
# i386/x86_64 emulation test (test various opcodes) */
|
||||
test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
|
||||
test-i386.h test-i386-shift.h test-i386-muldiv.h
|
||||
$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \
|
||||
$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ \
|
||||
$(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
|
||||
|
||||
|
||||
clean:
|
||||
rm -f test-i386
|
||||
|
|
|
@ -879,8 +879,8 @@ union float64u s_nan = { .l = 0xFFF0000000000000LL };
|
|||
|
||||
void test_fops(double a, double b)
|
||||
{
|
||||
//int ib = (int)b;
|
||||
//int dest = 0;
|
||||
int ib = (int)b;
|
||||
int dest = 0;
|
||||
|
||||
// XXX: Tests below are disabled since libc (which is statically linked)
|
||||
// contains sse instructions, some of which aren't supported.
|
||||
|
@ -891,34 +891,34 @@ void test_fops(double a, double b)
|
|||
printf("a=%f b=%f a/b=%f\n", a, b, a / b);
|
||||
printf("a=%f b=%f =%f\n", a, b, a + a + a + 3 * b / a * (a * a * a / b / b / (a + 1.0) - 3.5 + a * b / (3.7 * a / (a - b * b) + 6.5 * a / (b * b * a / -b - a * b) + 5.5 * (b - a))));
|
||||
printf("a=%f b=%f fmod(a, b)=%f\n", a, b, fmod(a, b));
|
||||
//printf("a=%f fma(a,b,a)=%f\n", a, fma(a, b, a));
|
||||
//printf("a=%f fdim(a,b)=%f\n", a, fdim(a, b));
|
||||
printf("a=%f fma(a,b,a)=%f\n", a, fma(a, b, a));
|
||||
printf("a=%f fdim(a,b)=%f\n", a, fdim(a, b));
|
||||
printf("a=%f copysign(a,b)=%f\n", a, copysign(a, b));
|
||||
printf("a=%f sqrt(a)=%f\n", a, sqrt(a));
|
||||
//printf("a=%f sin(a)=%f\n", a, sin(a));
|
||||
//printf("a=%f cos(a)=%f\n", a, cos(a));
|
||||
//printf("a=%f tan(a)=%f\n", a, tan(a));
|
||||
printf("a=%f sin(a)=%f\n", a, sin(a));
|
||||
printf("a=%f cos(a)=%f\n", a, cos(a));
|
||||
printf("a=%f tan(a)=%f\n", a, tan(a));
|
||||
//printf("a=%f log(a)=%f\n", a, log(a));
|
||||
//printf("a=%f log10(a)=%f\n", a, log10(a));
|
||||
//printf("a=%f log1p(a)=%f\n", a, log1p(a));
|
||||
//printf("a=%f log2(a)=%f\n", a, log2(a));
|
||||
//printf("a=%f logb(a)=%f\n", a, logb(a));
|
||||
//printf("a=%f ilogb(a)=%d\n", a, ilogb(a));
|
||||
printf("a=%f logb(a)=%f\n", a, logb(a));
|
||||
printf("a=%f ilogb(a)=%d\n", a, ilogb(a));
|
||||
printf("a=%f exp(a)=%f\n", a, exp(a));
|
||||
//printf("a=%f exp2(a)=%f\n", a, exp2(a));
|
||||
//printf("a=%f frexp(a)=%f, %d\n", a, frexp(a, &dest), dest);
|
||||
//printf("a=%f ldexp(a,b)=%f\n", a, ldexp(a, ib));
|
||||
//printf("a=%f scalbn(a,b)=%f\n", a, scalbn(a, ib));
|
||||
//printf("a=%f sihh(a)=%f\n", a, sinh(a));
|
||||
printf("a=%f exp2(a)=%f\n", a, exp2(a));
|
||||
printf("a=%f frexp(a)=%f, %d\n", a, frexp(a, &dest), dest);
|
||||
printf("a=%f ldexp(a,b)=%f\n", a, ldexp(a, ib));
|
||||
printf("a=%f scalbn(a,b)=%f\n", a, scalbn(a, ib));
|
||||
//printf("a=%f sinh(a)=%f\n", a, sinh(a));
|
||||
//printf("a=%f cosh(a)=%f\n", a, cosh(a));
|
||||
//printf("a=%f tanh(a)=%f\n", a, tanh(a));
|
||||
//printf("a=%f fabs(a)=%f\n", a, fabs(a));
|
||||
printf("a=%f tanh(a)=%f\n", a, tanh(a));
|
||||
printf("a=%f fabs(a)=%f\n", a, fabs(a));
|
||||
//printf("a=%f pow(a,b)=%f\n", a, pow(a,b));
|
||||
//printf("a=%f b=%f atan2(a, b)=%f\n", a, b, atan2(a, b));
|
||||
///* just to test some op combining */
|
||||
//printf("a=%f asin(sin(a))=%f\n", a, asin(sin(a)));
|
||||
//printf("a=%f acos(cos(a))=%f\n", a, acos(cos(a)));
|
||||
//printf("a=%f atan(tan(a))=%f\n", a, atan(tan(a)));
|
||||
printf("a=%f b=%f atan2(a, b)=%f\n", a, b, atan2(a, b));
|
||||
/* just to test some op combining */
|
||||
printf("a=%f asin(sin(a))=%f\n", a, asin(sin(a)));
|
||||
printf("a=%f acos(cos(a))=%f\n", a, acos(cos(a)));
|
||||
printf("a=%f atan(tan(a))=%f\n", a, atan(tan(a)));
|
||||
|
||||
}
|
||||
|
||||
|
@ -941,8 +941,7 @@ void fpu_clear_exceptions(void)
|
|||
}
|
||||
|
||||
/* XXX: display exception bits when supported */
|
||||
#define FPUS_EMASK 0x0000
|
||||
//#define FPUS_EMASK 0x007f
|
||||
#define FPUS_EMASK 0x007f
|
||||
|
||||
void test_fcmp(double a, double b)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue