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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [compat/] [scalar-by-value-4_y.c] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 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);                                  \
29
  check##NAME (g02##NAME,  2);                                  \
30
  check##NAME (g03##NAME,  3);                                  \
31
  check##NAME (g04##NAME,  4);                                  \
32
  check##NAME (g05##NAME,  5);                                  \
33
  check##NAME (g06##NAME,  6);                                  \
34
  check##NAME (g07##NAME,  7);                                  \
35
  check##NAME (g08##NAME,  8);                                  \
36
  check##NAME (g09##NAME,  9);                                  \
37
  check##NAME (g10##NAME, 10);                                  \
38
  check##NAME (g11##NAME, 11);                                  \
39
  check##NAME (g12##NAME, 12);                                  \
40
  check##NAME (g13##NAME, 13);                                  \
41
  check##NAME (g14##NAME, 14);                                  \
42
  check##NAME (g15##NAME, 15);                                  \
43
  check##NAME (g16##NAME, 16);                                  \
44
}                                                               \
45
                                                                \
46
void                                                            \
47
test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04,             \
48
            TYPE x05, TYPE x06, TYPE x07, TYPE x08,             \
49
            TYPE x09, TYPE x10, TYPE x11, TYPE x12,             \
50
            TYPE x13, TYPE x14, TYPE x15, TYPE x16)             \
51
{                                                               \
52
  check##NAME (x01,  1);                                        \
53
  check##NAME (x02,  2);                                        \
54
  check##NAME (x03,  3);                                        \
55
  check##NAME (x04,  4);                                        \
56
  check##NAME (x05,  5);                                        \
57
  check##NAME (x06,  6);                                        \
58
  check##NAME (x07,  7);                                        \
59
  check##NAME (x08,  8);                                        \
60
  check##NAME (x09,  9);                                        \
61
  check##NAME (x10, 10);                                        \
62
  check##NAME (x11, 11);                                        \
63
  check##NAME (x12, 12);                                        \
64
  check##NAME (x13, 13);                                        \
65
  check##NAME (x14, 14);                                        \
66
  check##NAME (x15, 15);                                        \
67
  check##NAME (x16, 16);                                        \
68
}
69
 
70
#ifndef SKIP_COMPLEX_INT
71
T(cc, _Complex char, CINT (0, 1))
72
T(cs, _Complex short, CINT (1, 2))
73
#endif
74
T(cf, _Complex float, CDBL (6.0, 7.0))

powered by: WebSVN 2.1.0

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