1 /* Asm operands that are given as hard registers must keep the same
2 hard register all the way through compilation. Example derived
4 /* { dg-do compile { target alpha*-*-* } } */
5 /* { dg-options "-O2 -frename-registers -fcprop-registers" } */
6 /* { dg-final { scan-assembler "callsys1 .0 .19 .0 .16 .17" } } */
7 /* { dg-final { scan-assembler "callsys2 .0 .19 .0 .16 .17" } } */
17 extern int xstat_conv (int vers
, struct kernel_stat
*kbuf
, void *ubuf
);
18 extern int *__errno_location (void) __attribute__ ((__const__
));
21 __fxstat (int vers
, int fd
, struct stat
*buf
)
23 struct kernel_stat kbuf
;
29 long _sc_ret
, _sc_err
;
31 register long _sc_0
__asm__("$0");
32 register long _sc_16
__asm__("$16");
33 register long _sc_17
__asm__("$17");
34 register long _sc_19
__asm__("$19");
37 _sc_17
= (long) (((struct kernel_stat
*) buf
));
38 __asm__("callsys1 %0 %1 %2 %3 %4"
39 : "=r"(_sc_0
), "=r"(_sc_19
)
40 : "0"(_sc_0
), "r"(_sc_16
), "r"(_sc_17
)
41 : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
42 "$22", "$23", "$24", "$25", "$27", "$28", "memory");
43 _sc_ret
= _sc_0
, _sc_err
= _sc_19
;
47 (*__errno_location ()) = (_sc_ret
);
55 long _sc_ret
, _sc_err
;
57 register long _sc_0
__asm__("$0");
58 register long _sc_16
__asm__("$16");
59 register long _sc_17
__asm__("$17");
60 register long _sc_19
__asm__("$19");
63 _sc_17
= (long) ((&kbuf
));
64 __asm__("callsys2 %0 %1 %2 %3 %4"
65 : "=r"(_sc_0
), "=r"(_sc_19
)
66 : "0"(_sc_0
), "r"(_sc_16
), "r"(_sc_17
)
67 : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",
68 "$22", "$23", "$24", "$25", "$27", "$28", "memory");
69 _sc_ret
= _sc_0
, _sc_err
= _sc_19
;
73 (*__errno_location ()) = (_sc_ret
);
79 result
= xstat_conv (vers
, &kbuf
, buf
);