In legion build config, updated path to GNU tools and updated deprecated Sun CC flag...
[OpenSPARC-T2-SAM] / sam-t2 / sam / devices / common / regdef / include / Datatype.h
CommitLineData
920dae64
AT
1/*
2* ========== Copyright Header Begin ==========================================
3*
4* OpenSPARC T2 Processor File: Datatype.h
5* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
6* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
7*
8* The above named program is free software; you can redistribute it and/or
9* modify it under the terms of the GNU General Public
10* License version 2 as published by the Free Software Foundation.
11*
12* The above named program is distributed in the hope that it will be
13* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15* General Public License for more details.
16*
17* You should have received a copy of the GNU General Public
18* License along with this work; if not, write to the Free Software
19* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20*
21* ========== Copyright Header End ============================================
22*/
23#ifndef __Datatype_h
24#define __Datatype_h
25
26#include <limits.h>
27
28/** @file Datatype.h
29 * Datatype.h defines useful primitive types and values.
30 */
31
32#ifndef __FixedSizeTypes
33#define __FixedSizeTypes
34typedef signed char int8;
35typedef short int16;
36typedef int int32;
37typedef long long int64;
38
39typedef unsigned char uchar, uint8;
40typedef unsigned short ushort, uint16;
41typedef unsigned int uint, uint32;
42
43#ifdef _LP64
44typedef unsigned long uint64;
45#else /* _ILP32 */
46#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
47typedef unsigned long long uint64;
48
49#endif
50#endif
51
52#endif
53
54typedef uint8 Byte;
55typedef uint64 Addr;
56typedef uint64 Data;
57typedef uint64 Identifier;
58
59typedef int64 Time; /* global simulation time (ticks of the root domain) */
60typedef double Period; /* period of a domain in cycles of the root domain */
61typedef double Freq; /* frequency in Hz of a particular domain */
62
63static const Addr MIN_ADDR = (Addr) 0;
64static const Addr MAX_ADDR = (Addr) ULLONG_MAX;
65
66static const Time NOT_A_TIME = (Time) LLONG_MIN;
67static const Time PAST_TIME = (Time) (LLONG_MIN +1);
68static const Time INITIAL_TIME = (Time) -1;
69static const Time FUTURE_TIME = (Time) LLONG_MAX;
70
71#endif