OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [darwin-longlong.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target powerpc*-*-* } } */
2
/* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "*" } { "" } } */
3
/* { dg-options "-mcpu=G5" } */
4
 
5
#include <signal.h>
6
#include <stdlib.h>
7
 
8
void
9
sig_ill_handler (int sig)
10
{
11
    exit(0);
12
}
13
 
14
 
15
int  msw(long long in)
16
{
17
  union {
18
    long long ll;
19
    int  i[2];
20
  } ud;
21
  ud.ll = in;
22
  return ud.i[0];
23
}
24
 
25
int main()
26
{
27
 
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);
36
 
37
  if (msw(1) != 0)
38
    abort();
39
  exit(0);
40
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.