drd/tests/Makefile.am: Use -faligned-new for C++ code if supported
[valgrind.git] / VEX / test / fldenv.c
blob4f37d61e7893675f5d47a1db827a6823128c80f1
2 #include <stdio.h>
3 #include <stdlib.h>
5 void do_fstenv ( void* p )
7 asm("movl 8(%esp), %eax ; fstenv (%eax)");
10 void do_fldenv ( void* p )
12 asm("movl 8(%esp), %eax ; fldenv (%eax)");
15 int main ( void )
17 int i;
18 unsigned short* buf = malloc(14*sizeof(short));
19 for (i = 0; i < 14; i++)
20 buf[i] = i;
21 buf[0] = 0x037f;
23 do_fldenv(buf);
24 do_fstenv(buf);
25 for (i = 0; i < 14; i++) {
26 printf("%04x ", buf[i]);
27 if (i > 0 && ((i % 12) == 11))
28 printf("\n");
30 printf("\n");
31 return 0;