OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [compat/] [scalar-return-2_y.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
#include <stdarg.h>
2
 
3
#include "compat-common.h"
4
 
5
#ifdef SKIP_VA
6
const int test_va = 0;
7
#else
8
const int test_va = 1;
9
#endif
10
 
11
#define T(NAME, TYPE, INITVAL)                                  \
12
extern TYPE g01##NAME, g02##NAME, g03##NAME, g04##NAME;         \
13
extern TYPE g05##NAME, g06##NAME, g07##NAME, g08##NAME;         \
14
extern TYPE g09##NAME, g10##NAME, g11##NAME, g12##NAME;         \
15
extern TYPE g13##NAME, g14##NAME, g15##NAME, g16##NAME;         \
16
                                                                \
17
extern void check##NAME (TYPE x, TYPE v);                       \
18
                                                                \
19
void                                                            \
20
init##NAME (TYPE *p, TYPE v)                                    \
21
{                                                               \
22
  *p = v + INITVAL;                                             \
23
}                                                               \
24
                                                                \
25
void                                                            \
26
checkg##NAME (void)                                             \
27
{                                                               \
28
  check##NAME (g01##NAME,  1+INITVAL);                          \
29
  check##NAME (g02##NAME,  2+INITVAL);                          \
30
  check##NAME (g03##NAME,  3+INITVAL);                          \
31
  check##NAME (g04##NAME,  4+INITVAL);                          \
32
  check##NAME (g05##NAME,  5+INITVAL);                          \
33
  check##NAME (g06##NAME,  6+INITVAL);                          \
34
  check##NAME (g07##NAME,  7+INITVAL);                          \
35
  check##NAME (g08##NAME,  8+INITVAL);                          \
36
  check##NAME (g09##NAME,  9+INITVAL);                          \
37
  check##NAME (g10##NAME, 10+INITVAL);                          \
38
  check##NAME (g11##NAME, 11+INITVAL);                          \
39
  check##NAME (g12##NAME, 12+INITVAL);                          \
40
  check##NAME (g13##NAME, 13+INITVAL);                          \
41
  check##NAME (g14##NAME, 14+INITVAL);                          \
42
  check##NAME (g15##NAME, 15+INITVAL);                          \
43
  check##NAME (g16##NAME, 16+INITVAL);                          \
44
}                                                               \
45
                                                                \
46
TYPE                                                            \
47
test0##NAME (void)                                              \
48
{                                                               \
49
  return g01##NAME;                                             \
50
}                                                               \
51
                                                                \
52
TYPE                                                            \
53
test1##NAME (TYPE x01)                                          \
54
{                                                               \
55
  return x01;                                                   \
56
}
57
 
58
T(c, char, 21)
59
T(uc, unsigned char, 22)
60
T(sc, signed char, (-33))
61
T(us, unsigned short, 41)
62
T(ss, short, (-44))
63
T(f, float, 90.0)

powered by: WebSVN 2.1.0

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