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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [frv/] [fr450-builtins-5.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test that all accumulator registers are accessible.  */
2
/* { dg-options "-mcpu=fr450" } */
3
/* { dg-do run } */
4
extern void abort (void);
5
extern void exit (int);
6
 
7
#define TEST_ACC(X) \
8
  (__MWTACC (X, 0x11220000 | X), __MRDACC (X) ^ (0x11220000 | X))
9
 
10
#define TEST_ACCG(X) \
11
  (__MWTACCG (X, X), __MRDACCG (X) ^ X)
12
 
13
#define ZERO_ACC(X) \
14
  (__MRDACC (X) | __MRDACCG (X))
15
 
16
int
17
main ()
18
{
19
  if (TEST_ACC (0) | TEST_ACC (1) | TEST_ACC (2) | TEST_ACC (3))
20
    abort ();
21
  if (TEST_ACC (8) | TEST_ACC (9) | TEST_ACC (10) | TEST_ACC (11))
22
    abort ();
23
  if (TEST_ACCG (0) | TEST_ACCG (1) | TEST_ACCG (2) | TEST_ACCG (3))
24
    abort ();
25
  if (TEST_ACCG (8) | TEST_ACCG (9) | TEST_ACCG (10) | TEST_ACCG (11))
26
    abort ();
27
 
28
  __MCLRACCA ();
29
  if (ZERO_ACC (0) | ZERO_ACC (1) | ZERO_ACC (2) | ZERO_ACC (3))
30
    abort ();
31
  if (ZERO_ACC (8) | ZERO_ACC (9) | ZERO_ACC (10) | ZERO_ACC (11))
32
    abort ();
33
 
34
  exit (0);
35
}

powered by: WebSVN 2.1.0

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