OSDN Git Service

Formatting fixes.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / compile / 20001205-1.c
1 /* This does not work on m68hc11 due to the asm statement which forces
2    two 'long' (32-bits) variables to go in registers.  */
3 /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
4
5 static inline unsigned long rdfpcr(void)
6 {
7         unsigned long tmp, ret;
8         __asm__ ("" : "=r"(tmp), "=r"(ret));
9         return ret;
10 }
11
12 static inline unsigned long
13 swcr_update_status(unsigned long swcr, unsigned long fpcr)
14 {
15         swcr &= ~0x7e0000ul;
16         swcr |= (fpcr >> 3) & 0x7e0000ul;
17         return swcr;
18 }
19
20 unsigned long osf_getsysinfo(unsigned long flags)
21 {
22         unsigned long w;
23         w = swcr_update_status(flags, rdfpcr());
24         return w;
25 }