Cygwin: access: Fix X_OK behaviour for backup operators and admins
[newlib-cygwin.git] / newlib / libc / sys / sysvi386 / fpx.c
blob957a9b8d83049fac5c1b0081c128c785735be0f0
1 #include <ieeefp.h>
2 #include <machine/registers.h>
5 fp_except fpsetmask (fp_except newmask)
8 fp_except oldmask;
9 v60_tkcw_type tkcw;
11 sysv60(0, 8, &tkcw);
12 oldmask = tkcw.fp_trap;
13 tkcw.fp_trap = newmask;
14 sysv60(0, 8, &tkcw);
15 return oldmask;
19 fp_except fpgetmask (void)
21 v60_tkcw_type tkcw;
22 sysv60(0, 8, &tkcw);
23 return tkcw.fp_trap;
27 fp_rnd fpgetround (void)
29 v60_tkcw_type tkcw;
30 sysv60(0, 8, &tkcw);
31 return tkcw.fp_rounding;
34 fp_rnd fpsetround (fp_rnd rnd)
36 fp_rnd oldrnd;
37 v60_tkcw_type tkcw;
39 sysv60(0, 8, &tkcw);
40 oldrnd = tkcw.fp_rounding;
41 tkcw.fp_rounding = rnd;
42 sysv60(0, 8, &tkcw);
43 return oldrnd;
50 fp_rdi fpgetroundtoi (void)
52 v60_tkcw_type tkcw;
53 sysv60(0, 8, &tkcw);
54 return tkcw.integer_rounding;
57 fp_rdi fpsetroundtoi (fp_rdi rnd)
59 fp_rdi oldrnd;
60 v60_tkcw_type tkcw;
62 sysv60(0, 8, &tkcw);
63 oldrnd = tkcw.integer_rounding;
64 tkcw.integer_rounding = rnd;
65 sysv60(0, 8, &tkcw);
66 return oldrnd;