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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [921029-1.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
typedef unsigned long long ULL;
2
ULL back;
3
ULL hpart, lpart;
4
ULL
5
build(long h, long l)
6
{
7
  hpart = h;
8
  hpart <<= 32;
9
  lpart = l;
10
  lpart &= 0xFFFFFFFFLL;
11
  back = hpart | lpart;
12
  return back;
13
}
14
 
15
main()
16
{
17
  if (build(0, 1) != 0x0000000000000001LL)
18
    abort();
19
  if (build(0, 0) != 0x0000000000000000LL)
20
    abort();
21
  if (build(0, 0xFFFFFFFF) != 0x00000000FFFFFFFFLL)
22
    abort();
23
  if (build(0, 0xFFFFFFFE) != 0x00000000FFFFFFFELL)
24
    abort();
25
  if (build(1, 1) != 0x0000000100000001LL)
26
    abort();
27
  if (build(1, 0) != 0x0000000100000000LL)
28
    abort();
29
  if (build(1, 0xFFFFFFFF) != 0x00000001FFFFFFFFLL)
30
    abort();
31
  if (build(1, 0xFFFFFFFE) != 0x00000001FFFFFFFELL)
32
    abort();
33
  if (build(0xFFFFFFFF, 1) != 0xFFFFFFFF00000001LL)
34
    abort();
35
  if (build(0xFFFFFFFF, 0) != 0xFFFFFFFF00000000LL)
36
    abort();
37
  if (build(0xFFFFFFFF, 0xFFFFFFFF) != 0xFFFFFFFFFFFFFFFFLL)
38
    abort();
39
  if (build(0xFFFFFFFF, 0xFFFFFFFE) != 0xFFFFFFFFFFFFFFFELL)
40
    abort();
41
  exit(0);
42
}

powered by: WebSVN 2.1.0

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