Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.target / powerpc / darwin-longlong.c
blob866fb6c0b94cbdde5c411d461f1b9386ac1bea93
1 /* { dg-do run { target powerpc*-*-* } } */
2 /* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "*" } { "" } } */
3 /* { dg-options "-mcpu=G5" } */
5 #include <signal.h>
6 #include <stdlib.h>
8 void
9 sig_ill_handler (int sig)
11 exit(0);
15 int msw(long long in)
17 union {
18 long long ll;
19 int i[2];
20 } ud;
21 ud.ll = in;
22 return ud.i[0];
25 int main()
28 /* Exit on systems without 64bit instructions. */
29 signal (SIGILL, sig_ill_handler);
30 #ifdef __MACH__
31 asm volatile ("extsw r0,r0");
32 #else
33 asm volatile ("extsw 0,0");
34 #endif
35 signal (SIGILL, SIG_DFL);
37 if (msw(1) != 0)
38 abort();
39 exit(0);