1 /* This file is part of the program psim.
3 Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
4 Copyright (C) 1997, Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #ifndef _SIM_BASICS_H_
24 #define _SIM_BASICS_H_
27 /* Basic configuration */
33 /* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
34 bring potential conflicts out in the open */
47 /* Some versions of GCC include an attribute operator, define it */
49 #if !defined (__attribute__)
50 #if (!defined(__GNUC__) \
52 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
53 #define __attribute__(arg)
59 /* Memory management with an allocator that clears memory before use. */
61 void *zalloc (unsigned long size
);
63 #define ZALLOC(TYPE) (TYPE*)zalloc(sizeof (TYPE))
67 /* Turn VALUE into a string with commas. */
68 char *sim_add_commas (char *, int, unsigned long);
71 /* Utilities for elapsed time reporting. */
72 /* Opaque type, known only inside sim_elapsed_time_foo fns. */
73 typedef unsigned long SIM_ELAPSED_TIME
;
74 /* Get reference point for future call to sim_time_elapsed. */
75 SIM_ELAPSED_TIME
sim_elapsed_time_get (void);
76 /* Elapsed time in milliseconds since START. */
77 unsigned long sim_elapsed_time_since (SIM_ELAPSED_TIME start
);
80 /* Global types that code manipulates */
82 typedef struct _device device
;
85 /* Address access attributes */
86 typedef enum _access_type
{
90 access_read_write
= 3,
93 access_write_exec
= 6,
94 access_read_write_exec
= 7,
98 /* Address attachement types */
99 typedef enum _attach_type
{
108 /* Basic definitions - ordered so that nothing calls what comes after
114 #include "ansidecl.h"
115 #include "callback.h"
116 #include "remote-sim.h"
118 #include "sim-config.h"
120 #include "sim-module.h"
121 #include "sim-trace.h"
122 #include "sim-profile.h"
123 #include "sim-model.h"
124 #include "sim-base.h"
126 #include "sim-inline.h"
128 #include "sim-types.h"
129 #include "sim-bits.h"
130 #include "sim-endian.h"
132 #endif /* _SIM_BASICS_H_ */
This page took 0.031314 seconds and 4 git commands to generate.