blob: 013089770c3635aa49979d19e9e14d03c6348b53 [file] [log] [blame]
sewardjd01a9632004-11-30 13:18:37 +00001
2#include <stdio.h>
3
4void fldcw_default ( void )
5{
6 asm(" pushw $0x037F ; fldcw (%esp) ; addl $2, %esp");
7}
8
9void fldcw_exns ( void )
10{
11 asm(" pushw $0x037E ; fldcw (%esp) ; addl $2, %esp");
12}
13
14void fldcw_precision ( void )
15{
16 asm(" pushw $0x007F ; fldcw (%esp) ; addl $2, %esp");
17}
18
19void fldcw_rounding ( void )
20{
21 asm(" pushw $0x077F ; fldcw (%esp) ; addl $2, %esp");
22}
23
24int main ( void )
25{
26 printf("default\n");
27 fldcw_default();
28 printf("\n");
29
30 printf("exns\n");
31 fldcw_exns();
32 printf("\n");
33
34 printf("precision\n");
35 fldcw_precision();
36 printf("\n");
37
38 printf("rounding\n");
39 fldcw_rounding();
40 printf("\n");
41
42 return 0;
43}