X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fppc%2Fbasics.h;h=2b923ea3cc3eb71f4e08d9ee93e4fbd18f2952f1;hb=5fd104addfddb68844fb8df67be832ee98ad9888;hp=db1d4506f051dc8ed9bd1fc076ef73e8fc8f583a;hpb=fa803dc60f0bf01297674c41d001798e18ade4dc;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/ppc/basics.h b/sim/ppc/basics.h index db1d4506f0..2b923ea3cc 100644 --- a/sim/ppc/basics.h +++ b/sim/ppc/basics.h @@ -1,10 +1,10 @@ /* This file is part of the program psim. - Copyright (C) 1994-1995, Andrew Cagney + Copyright (C) 1994-1997, Andrew Cagney This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + along with this program; if not, see . */ @@ -22,20 +21,34 @@ #ifndef _BASICS_H_ #define _BASICS_H_ -#include "config.h" -#include "words.h" -#include "ppc-endian.h" -#include "debug.h" -#include "bits.h" -#include "sim_callbacks.h" -#ifndef NULL -#define NULL 0 +/* from Michael Meissner, macro's to handle concating symbols better */ + +#if defined(__STDC__) || defined(ALMOST_STDC) +#define CONCAT2(a,b) a##b +#define CONCAT3(a,b,c) a##b##c +#define CONCAT4(a,b,c,d) a##b##c##d +#else +#define CONCAT2(a,b) a/**/b +#define CONCAT3(a,b,c) a/**/b/**/c +#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d #endif -/* many things pass around the cpu type without knowing what it is */ +#define XCONCAT2(a,b) CONCAT2(a,b) +#define XCONCAT3(a,b,c) CONCAT3(a,b,c) +#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d) + + +/* many things pass around the cpu and psim object with out knowing + what it is */ typedef struct _cpu cpu; +typedef struct _psim psim; +typedef struct _device device; +typedef struct _device_instance device_instance; +typedef struct _event_queue event_queue; +typedef struct _event_entry_tag *event_entry_tag; + /* many things are moving data between the host and target */ @@ -44,10 +57,83 @@ typedef enum { raw_transfer, } transfer_mode; + /* possible exit statuses */ typedef enum { was_continuing, was_trap, was_exited, was_signalled } stop_reason; + +/* disposition of an object when things are next restarted */ + +typedef enum { + permenant_object, + tempoary_object, +} object_disposition; + + +/* directions */ + +typedef enum { + bidirect_port, + input_port, + output_port, +} port_direction; + + + +/* Basic configuration */ + +#include "config.h" +#include "ppc-config.h" +#include "inline.h" + + +/* Basic host dependant mess - hopefully + will + bring potential conflicts out in the open */ + +#include +#include +#include + + +#ifndef NORETURN +#define NORETURN +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#if !defined (__attribute__) +#if (!defined(__GNUC__) \ + || (__GNUC__ < 2) \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)) +#define __attribute__(arg) +#endif +#endif + +#if !defined (UNUSED) +#if (!defined(__GNUC__) \ + || (__GNUC__ < 2) \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) +#define UNUSED +#else +#define UNUSED __attribute__((__unused__)) +#endif +#endif + + +/* Basic definitions - ordered so that nothing calls what comes after + it */ + +#include "sim_callbacks.h" + +#include "debug.h" + +#include "words.h" +#include "bits.h" +#include "sim-endian.h" + #endif /* _BASICS_H_ */