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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [ultrasp3.c] - Blame information for rev 691

Details | Compare with Previous | View Log

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