summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/frv/fr550-builtins-5.c
blob: ff75ea17dfee0904cefdc2fd080f1c34c6b0eaa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Test that __MADDACC only changes the registers it's supposed to.  */
/* { dg-do run } */
extern void abort (void);
extern void exit (int);

int
main ()
{
  __MWTACC (0, 1);
  __MWTACC (1, 1);
  __MWTACC (2, 1);
  __MWTACC (3, 1);
  __MWTACC (4, 1);
  __MWTACC (5, 1);
  __MWTACC (6, 1);
  __MWTACC (7, 1);
  __MADDACCS (0, 2);
  __MADDACCS (4, 6);
  if ((__MRDACC (0) - 2)
      | (__MRDACC (1) - 1)
      | (__MRDACC (4) - 2)
      | (__MRDACC (5) - 1))
    abort ();
  exit (0);
}