]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add a check for fsincos.
authorJulian Seward <jseward@acm.org>
Sat, 4 Feb 2006 15:43:14 +0000 (15:43 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 4 Feb 2006 15:43:14 +0000 (15:43 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5610

memcheck/tests/x86/fprem.c
memcheck/tests/x86/fprem.stdout.exp

index d48b49ad9d43256ed825f0ffe414268bbe0617d9..864c9b076bf321098ae40a853b49d7cc945e930f 100644 (file)
@@ -1,5 +1,6 @@
 
-/* Marginally test fprem/fprem1; these are hard to check otherwise */
+/* Marginally test fprem/fprem1/fsincos; these are hard to check
+   otherwise since compilers hardly ever generate them. */
 
 #include <stdio.h>
 
@@ -33,10 +34,24 @@ double do_fprem1 ( void )
   return res;
 }
 
+double do_fsincos ( void )
+{
+  double res;
+  __asm__ __volatile__(
+    "fldln2\n\t"
+    "fsincos\n\t"
+    "fsub %%st(1)\n\t"
+    "fstpl 0(%0)"
+    : : "r"(&res)  
+  );
+  return res;
+}
+
 int main ( void )
 {
   __asm__ __volatile__("finit");
-  printf("fprem  %f\n", do_fprem());
-  printf("fprem1 %f\n", do_fprem1());
+  printf("fprem   %f\n", do_fprem());
+  printf("fprem1  %f\n", do_fprem1());
+  printf("fsincos %f\n", do_fsincos());
   return 0;
 }
index 5ba92bfdd8cf1ab7317d8830e0ea5b0d3e64352b..dc7396c5e002fb20e06f705b09a4068e93e3d120 100644 (file)
@@ -1,2 +1,3 @@
-fprem  0.693147
-fprem1 0.693147
+fprem   0.693147
+fprem1  0.693147
+fsincos 0.130278