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-1.c] - Blame information for rev 321

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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