Home | History | Annotate | Download | only in x86
      1 #include "tests/asm.h"
      2 #include <stdio.h>
      3 
      4 double zzz;
      5 
      6 int main ( void )
      7 {
      8   zzz = 1.234;
      9   printf("zzz = %f\n", zzz);
     10   __asm__ __volatile__(
     11     "finit\n\t"
     12     "fldpi\n\t"
     13     "fldl2e\n\t"
     14     "pushl %esi\n\t"
     15     "movl $0,%esi\n\t"
     16     "add %esi,%esi\n\t"
     17     "fcmovnu %st(1), %st(0)\n\t"
     18     "fstl " VG_SYM(zzz) "\n\t"
     19     "finit\n\t"
     20     "popl %esi\n\t"
     21     );
     22   printf("zzz = %f\n", zzz);
     23   return 0;
     24 }
     25