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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [ppc/] [basics.h] - Diff between revs 24 and 157

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 157
/*  This file is part of the program psim.
/*  This file is part of the program psim.
 
 
    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
    Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
 
 
    This program is free software; you can redistribute it and/or modify
    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
    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 2 of the License, or
    (at your option) any later version.
    (at your option) any later version.
 
 
    This program is distributed in the hope that it will be useful,
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    GNU General Public License for more details.
 
 
    You should have received a copy of the GNU General Public License
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 
    */
    */
 
 
 
 
#ifndef _BASICS_H_
#ifndef _BASICS_H_
#define _BASICS_H_
#define _BASICS_H_
 
 
 
 
/* from Michael Meissner, macro's to handle concating symbols better */
/* from Michael Meissner, macro's to handle concating symbols better */
 
 
#if defined(__STDC__) || defined(ALMOST_STDC)
#if defined(__STDC__) || defined(ALMOST_STDC)
#define CONCAT2(a,b)     a##b
#define CONCAT2(a,b)     a##b
#define CONCAT3(a,b,c)   a##b##c
#define CONCAT3(a,b,c)   a##b##c
#define CONCAT4(a,b,c,d) a##b##c##d
#define CONCAT4(a,b,c,d) a##b##c##d
#else
#else
#define CONCAT2(a,b)     a/**/b
#define CONCAT2(a,b)     a/**/b
#define CONCAT3(a,b,c)   a/**/b/**/c
#define CONCAT3(a,b,c)   a/**/b/**/c
#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
#endif
#endif
 
 
#define XCONCAT2(a,b)     CONCAT2(a,b)
#define XCONCAT2(a,b)     CONCAT2(a,b)
#define XCONCAT3(a,b,c)   CONCAT3(a,b,c)
#define XCONCAT3(a,b,c)   CONCAT3(a,b,c)
#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d)
#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d)
 
 
 
 
/* many things pass around the cpu and psim object with out knowing
/* many things pass around the cpu and psim object with out knowing
   what it is */
   what it is */
 
 
typedef struct _cpu cpu;
typedef struct _cpu cpu;
typedef struct _psim psim;
typedef struct _psim psim;
typedef struct _device device;
typedef struct _device device;
typedef struct _device_instance device_instance;
typedef struct _device_instance device_instance;
typedef struct _event_queue event_queue;
typedef struct _event_queue event_queue;
typedef struct _event_entry_tag *event_entry_tag;
typedef struct _event_entry_tag *event_entry_tag;
 
 
 
 
/* many things are moving data between the host and target */
/* many things are moving data between the host and target */
 
 
typedef enum {
typedef enum {
  cooked_transfer,
  cooked_transfer,
  raw_transfer,
  raw_transfer,
} transfer_mode;
} transfer_mode;
 
 
 
 
/* possible exit statuses */
/* possible exit statuses */
 
 
typedef enum {
typedef enum {
  was_continuing, was_trap, was_exited, was_signalled
  was_continuing, was_trap, was_exited, was_signalled
} stop_reason;
} stop_reason;
 
 
 
 
/* disposition of an object when things are next restarted */
/* disposition of an object when things are next restarted */
 
 
typedef enum {
typedef enum {
  permenant_object,
  permenant_object,
  tempoary_object,
  tempoary_object,
} object_disposition;
} object_disposition;
 
 
 
 
/* directions */
/* directions */
 
 
typedef enum {
typedef enum {
  bidirect_port,
  bidirect_port,
  input_port,
  input_port,
  output_port,
  output_port,
} port_direction;
} port_direction;
 
 
 
 
 
 
/* Basic configuration */
/* Basic configuration */
 
 
#include "config.h"
#include "config.h"
#include "ppc-config.h"
#include "ppc-config.h"
#include "inline.h"
#include "inline.h"
 
 
 
 
/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will
   bring potential conflicts out in the open */
   bring potential conflicts out in the open */
 
 
#include <stdarg.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
 
 
 
 
#ifndef NORETURN
#ifndef NORETURN
#define NORETURN
#define NORETURN
#endif
#endif
 
 
#ifndef NULL
#ifndef NULL
#define NULL 0
#define NULL 0
#endif
#endif
 
 
#if !defined (__attribute__)
#if !defined (__attribute__)
#if (!defined(__GNUC__) \
#if (!defined(__GNUC__) \
     || (__GNUC__ < 2) \
     || (__GNUC__ < 2) \
     || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
     || (__GNUC__ == 2 && __GNUC_MINOR__ < 6))
#define __attribute__(arg)
#define __attribute__(arg)
#endif
#endif
#endif
#endif
 
 
#if !defined (UNUSED)
#if !defined (UNUSED)
#if (!defined(__GNUC__) \
#if (!defined(__GNUC__) \
     || (__GNUC__ < 2) \
     || (__GNUC__ < 2) \
     || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
     || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
#define UNUSED
#define UNUSED
#else
#else
#define UNUSED __attribute__((__unused__))
#define UNUSED __attribute__((__unused__))
#endif
#endif
#endif
#endif
 
 
 
 
/* Basic definitions - ordered so that nothing calls what comes after
/* Basic definitions - ordered so that nothing calls what comes after
   it */
   it */
 
 
#include "sim_callbacks.h"
#include "sim_callbacks.h"
 
 
#include "debug.h"
#include "debug.h"
 
 
#include "words.h"
#include "words.h"
#include "bits.h"
#include "bits.h"
#include "sim-endian.h"
#include "sim-endian.h"
 
 
#endif /* _BASICS_H_ */
#endif /* _BASICS_H_ */
 
 

powered by: WebSVN 2.1.0

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