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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [frv/] [fr550-builtins-4.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test the __M{,D}{ADD,SUB}ACC functions.  */
2
/* { dg-do run } */
3
extern void abort (void);
4
extern void exit (int);
5
 
6
int
7
main ()
8
{
9
  __MWTACC (6, 10);
10
  __MWTACC (7, 25);
11
  __MADDACCS (5, 6);
12
  if (__MRDACC (5) != 35)
13
    abort ();
14
  __MSUBACCS (4, 6);
15
  if (__MRDACC (4) != -15)
16
    abort ();
17
  __MASACCS (4, 6);
18
  if (__MRDACC (4) != 35 || __MRDACC (5) != -15)
19
    abort ();
20
 
21
  __MWTACC (0, 100);
22
  __MWTACC (1, 150);
23
  __MWTACC (2, 1000);
24
  __MWTACC (3, 1500);
25
  __MDADDACCS (2, 0);
26
  if (__MRDACC (2) != 250 || __MRDACC (3) != 2500)
27
    abort ();
28
 
29
  __MWTACC (0, 100);
30
  __MWTACC (1, 150);
31
  __MWTACC (2, 1000);
32
  __MWTACC (3, 1500);
33
  __MDSUBACCS (2, 0);
34
  if (__MRDACC (2) != -50 || __MRDACC (3) != -500)
35
    abort ();
36
 
37
  __MWTACC (0, 100);
38
  __MWTACC (1, 150);
39
  __MWTACC (2, 1000);
40
  __MWTACC (3, 1500);
41
  __MDASACCS (0, 0);
42
  if (__MRDACC (0) != 250 || __MRDACC (1) != -50)
43
    abort ();
44
  if (__MRDACC (2) != 2500 || __MRDACC (3) != -500)
45
    abort ();
46
 
47
  exit (0);
48
}

powered by: WebSVN 2.1.0

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