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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [mips/] [timode-2.c] - Blame information for rev 378

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

Line No. Rev Author Line
1 321 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-mgp64" } */
3
typedef int int128_t __attribute__((mode(TI)));
4
typedef unsigned int uint128_t __attribute__((mode(TI)));
5
 
6
#define UINT128_CONST(A, B) \
7
  (((uint128_t) (0x ## A ## ULL) << 64) | (0x ## B ## ULL))
8
 
9
volatile uint128_t a = UINT128_CONST (1111111111111111, a222222222222222);
10
volatile uint128_t b = UINT128_CONST (0000000000000005, 0000000000000003);
11
volatile uint128_t c = UINT128_CONST (5dddddddddddddde, e666666666666666);
12
volatile uint128_t d = UINT128_CONST (e612340000000000, 5000000000234500);
13
volatile uint128_t e = UINT128_CONST (43f011dddddddddf, 366666666689ab66);
14
volatile uint128_t f = UINT128_CONST (4210100000000000, 1000000000010100);
15
volatile uint128_t g = UINT128_CONST (a5e225dddddddddf, 6666666666aaee66);
16
volatile uint128_t h = UINT128_CONST (e7f235dddddddddf, 7666666666abef66);
17
volatile uint128_t i = UINT128_CONST (5e225dddddddddf6, 666666666aaee660);
18
volatile uint128_t j = UINT128_CONST (0a5e225ddddddddd, f6666666666aaee6);
19
volatile uint128_t k = UINT128_CONST (fa5e225ddddddddd, f6666666666aaee6);
20
 
21
volatile int amount = 4;
22
 
23
volatile uint128_t result;
24
 
25
int
26
main (void)
27
{
28
  result = a * b;
29
  if (result != c)
30
    return 1;
31
 
32
  result = c + d;
33
  if (result != e)
34
    return 1;
35
 
36
  result = e - d;
37
  if (result != c)
38
    return 1;
39
 
40
  result = d & e;
41
  if (result != f)
42
    return 1;
43
 
44
  result = d ^ e;
45
  if (result != g)
46
    return 1;
47
 
48
  result = d | e;
49
  if (result != h)
50
    return 1;
51
 
52
  result = g << amount;
53
  if (result != i)
54
    return 1;
55
 
56
  result = g >> amount;
57
  if (result != j)
58
    return 1;
59
 
60
  result = (int128_t) g >> amount;
61
  if (result != k)
62
    return 1;
63
 
64
  return 0;
65
}

powered by: WebSVN 2.1.0

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