aboutsummaryrefslogtreecommitdiff
path: root/tests/test-i386.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-12 11:38:00 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-12 11:38:00 +0000
commit665656a99becf2aa688f434de137be4a530021eb (patch)
treef970a97c95708fd4f814d378ba4f97ab7d730fed /tests/test-i386.c
parent658c8bdadc04fc3d66bad80c1234fea8cc7cca41 (diff)
ffree test
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@920 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tests/test-i386.c')
-rw-r--r--tests/test-i386.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-i386.c b/tests/test-i386.c
index f7e268652f..73a701fcfa 100644
--- a/tests/test-i386.c
+++ b/tests/test-i386.c
@@ -688,6 +688,14 @@ void test_fenv(void)
TEST_ENV(&float_env16, "data16 fnsave", "data16 frstor");
TEST_ENV(&float_env32, "fnstenv", "fldenv");
TEST_ENV(&float_env32, "fnsave", "frstor");
+
+ /* test for ffree */
+ for(i=0;i<5;i++)
+ asm volatile ("fldl %0" : : "m" (dtab[i]));
+ asm volatile("ffree %st(2)");
+ asm volatile ("fnstenv %0\n" : : "m" (float_env32));
+ asm volatile ("fninit");
+ printf("fptag=%04x\n", float_env32.fptag);
}