OSDN Git Service

gcc/
[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 } */
4 /* { dg-xfail-if "" { m6811-*-* m6812-*-* } { "*" } { "" } } */
5
6 static inline unsigned long rdfpcr(void)
7 {
8         unsigned long tmp, ret;
9         __asm__ ("" : "=r"(tmp), "=r"(ret));
10         return ret;
11 }
12
13 static inline unsigned long
14 swcr_update_status(unsigned long swcr, unsigned long fpcr)
15 {
16         swcr &= ~0x7e0000ul;
17         swcr |= (fpcr >> 3) & 0x7e0000ul;
18         return swcr;
19 }
20
21 unsigned long osf_getsysinfo(unsigned long flags)
22 {
23         unsigned long w;
24         w = swcr_update_status(flags, rdfpcr());
25         return w;
26 }