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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [ultrasp3.c] - Blame information for rev 868

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "" } */
2
/* { dg-options "-mcpu=ultrasparc -mv8plus" { target sparc-*-* } } */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
unsigned long long foo (unsigned long long x)
8
{
9
  return 0x73500000735LL * x;
10
}
11
 
12
unsigned long long a, b;
13
unsigned long p;
14
 
15
unsigned long long bar (void)
16
{
17
  unsigned long long c = a | b;
18
  return 0x73500000735LL * c;
19
}
20
 
21
unsigned long long baz (void)
22
{
23
  unsigned long long c = (p + 345) & -2;
24
  return c * a;
25
}
26
 
27
main ()
28
{
29
  if (foo (0x56789LL) != 0x26f32e5d26f32e5dLL)
30
    abort ();
31
  a = 0x8000000080000000LL;
32
  b = 0x0000000180000001LL;
33
  if (bar () != 0x120480000735LL)
34
    abort ();
35
  p = 0xffffffff;
36
  if (baz () != 0xac00000000LL)
37
    abort ();
38
  exit (0);
39
}

powered by: WebSVN 2.1.0

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