Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / include / spixtypes.h
CommitLineData
920dae64
AT
1/* %COPYRIGHT% */
2
3/*
4** spixtypes.h - Basic types exported from spix library
5**
6** This file defines basic types used by interfaces to the spix
7** library.
8*/
9
10#ifndef SPIXTYPES_H
11#define SPIXTYPES_H
12
13#pragma ident "@(#)spixtypes.h 1.2"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19
20typedef signed char spix_int8_t;
21typedef unsigned char spix_uint8_t;
22typedef short spix_int16_t;
23typedef unsigned short spix_uint16_t;
24typedef int spix_int32_t;
25typedef unsigned spix_uint32_t;
26
27#ifndef SPIX_NOLONGLONG
28#define SPIX_I64
29typedef long long spix_int64_t;
30typedef unsigned long long spix_uint64_t;
31#endif /*SPIX_NOLONGLONG*/
32
33
34typedef float spix_real32_t;
35typedef double spix_real64_t;
36
37#ifndef SPIX_NOLONGDOUBLE
38#define SPIX_R128
39typedef long double spix_real128_t;
40#endif /*SPIX_NOLONGDOUBLE*/
41
42
43typedef spix_uint32_t spix_addr32_t;
44#ifdef SPIX_I64
45typedef spix_uint64_t spix_addr64_t;
46#endif
47
48#if SPIX_ADDR == 32
49 typedef spix_addr32_t spix_addr_t;
50#elif SPIX_ADDR == 64
51 typedef spix_addr64_t spix_addr_t;
52#endif
53
54
55#ifdef FALSE
56# if FALSE != 0
57# error "Conflict with constant FALSE"
58# endif
59# undef FALSE
60#endif
61
62#ifdef TRUE
63# if TRUE != 1
64# error "Conflict with constant TRUE"
65# endif
66# undef TRUE
67#endif
68
69#define FALSE 0
70#define TRUE 1
71
72typedef unsigned spix_bool_t;
73
74/* Spix5 types. */
75
76/* signed or unsigned, == 8 bits */
77#ifndef INT8
78#define INT8 char
79typedef INT8 int8;
80#endif
81
82/* unsigned, == 8 bits */
83#ifndef UINT8
84#define UINT8 unsigned char
85typedef UINT8 uint8;
86#endif
87
88/* signed, == 16 bits */
89#ifndef INT16
90#define INT16 short
91typedef INT16 int16;
92#endif
93
94/* unsigned, == 16 bits */
95#ifndef UINT16
96#define UINT16 unsigned short
97typedef UINT16 uint16;
98#endif
99
100/* signed, == 32 bits */
101#ifndef INT32
102#define INT32 int
103typedef INT32 int32;
104#endif
105
106/* unsigned, == 32 bits */
107#ifndef UINT32
108#define UINT32 unsigned
109typedef UINT32 uint32;
110#endif
111
112/* signed, == 64 bits */
113#ifndef INT64
114#define INT64 long long
115typedef INT64 int64;
116#endif
117
118/* unsigned, == 64 bits */
119#ifndef UINT64
120#define UINT64 unsigned long long
121typedef UINT64 uint64;
122#endif
123
124#ifndef REAL32
125#define REAL32 float
126typedef REAL32 real32;
127#endif
128
129#ifndef REAL64
130#define REAL64 double
131typedef REAL64 real64;
132#endif
133
134#ifndef REAL128
135#define REAL128 long double
136typedef REAL128 real128;
137#endif
138
139#ifdef __cplusplus
140}
141#endif
142
143#endif /*SPIXTYPES_H*/