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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [frv/] [fr405-builtins-3.c] - Blame information for rev 712

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

Line No. Rev Author Line
1 691 jeremybenn
/* Test the remaining integer instructions.  */
2
/* { dg-options "-mcpu=fr405" } */
3
/* { dg-do run } */
4
extern void abort (void);
5
extern void exit (int);
6
 
7
int main ()
8
{
9
  if (__SLASS (0x112233, 4) != 0x1122330)
10
    abort ();
11
 
12
  if (__SLASS (0x7ffff, 12) != 0x7ffff000)
13
    abort ();
14
 
15
  if (__SLASS (0x80000, 12) != 0x7fffffff)
16
    abort ();
17
 
18
  if (__SLASS (-0x7ffff, 12) != -0x7ffff000)
19
    abort ();
20
 
21
  if (__SLASS (-0x80000, 12) != -0x7fffffff - 1)
22
    abort ();
23
 
24
  if (__SLASS (-0x80001, 12) != -0x7fffffff - 1)
25
    abort ();
26
 
27
  if (__ADDSS (0x7fffffff, 1) != 0x7fffffff)
28
    abort ();
29
 
30
  if (__ADDSS (0x7ffffffd, 1) != 0x7ffffffe)
31
    abort ();
32
 
33
  if (__ADDSS (-0x7fffffff, -2) != -0x7fffffff - 1)
34
    abort ();
35
 
36
  if (__ADDSS (-0x7ffffffd, -2) != -0x7fffffff)
37
    abort ();
38
 
39
  if (__SUBSS (0x7fffffff, -1) != 0x7fffffff)
40
    abort ();
41
 
42
  if (__SUBSS (0x7ffffffd, -1) != 0x7ffffffe)
43
    abort ();
44
 
45
  if (__SUBSS (-0x7fffffff, 2) != -0x7fffffff - 1)
46
    abort ();
47
 
48
  if (__SUBSS (-0x7ffffffd, 2) != -0x7fffffff)
49
    abort ();
50
 
51
  if (__SCAN (0x12345678, 0) != 3)
52
    abort ();
53
 
54
  if (__SCAN (0x12345678, 0x24680000) != 17)
55
    abort ();
56
 
57
  exit (0);
58
}

powered by: WebSVN 2.1.0

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