Commit 665656a99becf2aa688f434de137be4a530021eb
1 parent
658c8bda
ffree test
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@920 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
8 additions
and
0 deletions
tests/test-i386.c
... | ... | @@ -688,6 +688,14 @@ void test_fenv(void) |
688 | 688 | TEST_ENV(&float_env16, "data16 fnsave", "data16 frstor"); |
689 | 689 | TEST_ENV(&float_env32, "fnstenv", "fldenv"); |
690 | 690 | TEST_ENV(&float_env32, "fnsave", "frstor"); |
691 | + | |
692 | + /* test for ffree */ | |
693 | + for(i=0;i<5;i++) | |
694 | + asm volatile ("fldl %0" : : "m" (dtab[i])); | |
695 | + asm volatile("ffree %st(2)"); | |
696 | + asm volatile ("fnstenv %0\n" : : "m" (float_env32)); | |
697 | + asm volatile ("fninit"); | |
698 | + printf("fptag=%04x\n", float_env32.fptag); | |
691 | 699 | } |
692 | 700 | |
693 | 701 | ... | ... |