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

Subversion Repositories or1k

[/] [or1k/] [tags/] [final_interface/] [gdb-5.0/] [sim/] [common/] [sim-types.h] - Diff between revs 114 and 1765

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

Rev 114 Rev 1765
/* This file is part of psim (model of the PowerPC(tm) architecture)
/* This file is part of psim (model of the PowerPC(tm) architecture)
 
 
   Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
   Copyright (C) 1994-1997, Andrew Cagney <cagney@highland.com.au>
 
 
   This library is free software; you can redistribute it and/or
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License
   modify it under the terms of the GNU Library General Public License
   as published by the Free Software Foundation; either version 2 of
   as published by the Free Software Foundation; either version 2 of
   the License, or (at your option) any later version.
   the License, or (at your option) any later version.
 
 
   This library is distributed in the hope that it will be useful, but
   This library is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.
   Library General Public License for more details.
 
 
   You should have received a copy of the GNU Library General Public
   You should have received a copy of the GNU Library General Public
   License along with this library; if not, write to the Free Software
   License along with this library; 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.
 
 
   --
   --
 
 
   PowerPC is a trademark of International Business Machines Corporation. */
   PowerPC is a trademark of International Business Machines Corporation. */
 
 
 
 
#ifndef SIM_TYPES_H
#ifndef SIM_TYPES_H
/* #define SIM_TYPES_H */
/* #define SIM_TYPES_H */
 
 
/* INTEGER QUANTITIES:
/* INTEGER QUANTITIES:
 
 
   TYPES:
   TYPES:
 
 
     signed*    signed type of the given size
     signed*    signed type of the given size
     unsigned*  The corresponding insigned type
     unsigned*  The corresponding insigned type
 
 
   SIZES
   SIZES
 
 
     *NN        Size based on the number of bits
     *NN        Size based on the number of bits
     *_NN       Size according to the number of bytes
     *_NN       Size according to the number of bytes
     *_word     Size based on the target architecture's word
     *_word     Size based on the target architecture's word
                word size (32/64 bits)
                word size (32/64 bits)
     *_cell     Size based on the target architecture's
     *_cell     Size based on the target architecture's
                IEEE 1275 cell size (almost always 32 bits)
                IEEE 1275 cell size (almost always 32 bits)
 
 
*/
*/
 
 
 
 
#if !defined (SIM_TYPES_H) && defined (__GNUC__)
#if !defined (SIM_TYPES_H) && defined (__GNUC__)
#define SIM_TYPES_H
#define SIM_TYPES_H
 
 
/* bit based */
/* bit based */
 
 
#define UNSIGNED32(X) ((unsigned32) X##UL)
#define UNSIGNED32(X) ((unsigned32) X##UL)
#define UNSIGNED64(X) ((unsigned64) X##ULL)
#define UNSIGNED64(X) ((unsigned64) X##ULL)
 
 
#define SIGNED32(X) ((signed32) X##L)
#define SIGNED32(X) ((signed32) X##L)
#define SIGNED64(X) ((signed64) X##LL)
#define SIGNED64(X) ((signed64) X##LL)
 
 
typedef signed int signed8 __attribute__ ((__mode__ (__QI__)));
typedef signed int signed8 __attribute__ ((__mode__ (__QI__)));
typedef signed int signed16 __attribute__ ((__mode__ (__HI__)));
typedef signed int signed16 __attribute__ ((__mode__ (__HI__)));
typedef signed int signed32 __attribute__ ((__mode__ (__SI__)));
typedef signed int signed32 __attribute__ ((__mode__ (__SI__)));
typedef signed int signed64 __attribute__ ((__mode__ (__DI__)));
typedef signed int signed64 __attribute__ ((__mode__ (__DI__)));
 
 
typedef unsigned int unsigned8 __attribute__ ((__mode__ (__QI__)));
typedef unsigned int unsigned8 __attribute__ ((__mode__ (__QI__)));
typedef unsigned int unsigned16 __attribute__ ((__mode__ (__HI__)));
typedef unsigned int unsigned16 __attribute__ ((__mode__ (__HI__)));
typedef unsigned int unsigned32 __attribute__ ((__mode__ (__SI__)));
typedef unsigned int unsigned32 __attribute__ ((__mode__ (__SI__)));
typedef unsigned int unsigned64 __attribute__ ((__mode__ (__DI__)));
typedef unsigned int unsigned64 __attribute__ ((__mode__ (__DI__)));
 
 
typedef struct { unsigned64 a[2]; } unsigned128;
typedef struct { unsigned64 a[2]; } unsigned128;
typedef struct { signed64 a[2]; } signed128;
typedef struct { signed64 a[2]; } signed128;
 
 
#endif
#endif
 
 
 
 
#if !defined (SIM_TYPES_H) && defined (_MSC_VER)
#if !defined (SIM_TYPES_H) && defined (_MSC_VER)
#define SIM_TYPES_H
#define SIM_TYPES_H
 
 
/* bit based */
/* bit based */
 
 
#define UNSIGNED32(X) (X##ui32)
#define UNSIGNED32(X) (X##ui32)
#define UNSIGNED64(X) (X##ui64)
#define UNSIGNED64(X) (X##ui64)
 
 
#define SIGNED32(X) (X##i32)
#define SIGNED32(X) (X##i32)
#define SIGNED64(X) (X##i64)
#define SIGNED64(X) (X##i64)
 
 
typedef signed char signed8;
typedef signed char signed8;
typedef signed short signed16;
typedef signed short signed16;
typedef signed int signed32;
typedef signed int signed32;
typedef signed __int64 signed64;
typedef signed __int64 signed64;
 
 
typedef unsigned int unsigned8;
typedef unsigned int unsigned8;
typedef unsigned int unsigned16;
typedef unsigned int unsigned16;
typedef unsigned int unsigned32;
typedef unsigned int unsigned32;
typedef unsigned __int64 unsigned64;
typedef unsigned __int64 unsigned64;
 
 
typedef struct { unsigned64 a[2]; } unsigned128;
typedef struct { unsigned64 a[2]; } unsigned128;
typedef struct { signed64 a[2]; } signed128;
typedef struct { signed64 a[2]; } signed128;
 
 
#endif /* _MSC_VER */
#endif /* _MSC_VER */
 
 
 
 
#if !defined (SIM_TYPES_H)
#if !defined (SIM_TYPES_H)
#define SIM_TYPES_H
#define SIM_TYPES_H
 
 
/* bit based */
/* bit based */
 
 
#define UNSIGNED32(X) (X##UL)
#define UNSIGNED32(X) (X##UL)
#define UNSIGNED64(X) (X##ULL)
#define UNSIGNED64(X) (X##ULL)
 
 
#define SIGNED32(X) (X##L)
#define SIGNED32(X) (X##L)
#define SIGNED64(X) (X##LL)
#define SIGNED64(X) (X##LL)
 
 
typedef signed char signed8;
typedef signed char signed8;
typedef signed short signed16;
typedef signed short signed16;
#if defined (__ALPHA__)
#if defined (__ALPHA__)
typedef signed int unsigned32;
typedef signed int unsigned32;
typedef signed long unsigned64;
typedef signed long unsigned64;
#else
#else
typedef signed long unsigned32;
typedef signed long unsigned32;
typedef signed long long unsigned64;
typedef signed long long unsigned64;
#endif
#endif
 
 
typedef unsigned char unsigned8;
typedef unsigned char unsigned8;
typedef unsigned short unsigned16;
typedef unsigned short unsigned16;
#if defined (__ALPHA__)
#if defined (__ALPHA__)
typedef unsigned int unsigned32;
typedef unsigned int unsigned32;
typedef unsigned long unsigned64;
typedef unsigned long unsigned64;
#else
#else
typedef unsigned long unsigned32;
typedef unsigned long unsigned32;
typedef unsigned long long unsigned64;
typedef unsigned long long unsigned64;
#endif
#endif
 
 
typedef struct { unsigned64 a[2]; } unsigned128;
typedef struct { unsigned64 a[2]; } unsigned128;
typedef struct { signed64 a[2]; } signed128;
typedef struct { signed64 a[2]; } signed128;
 
 
#endif
#endif
 
 
 
 
/* byte based */
/* byte based */
 
 
typedef signed8 signed_1;
typedef signed8 signed_1;
typedef signed16 signed_2;
typedef signed16 signed_2;
typedef signed32 signed_4;
typedef signed32 signed_4;
typedef signed64 signed_8;
typedef signed64 signed_8;
typedef signed128 signed_16;
typedef signed128 signed_16;
 
 
typedef unsigned8 unsigned_1;
typedef unsigned8 unsigned_1;
typedef unsigned16 unsigned_2;
typedef unsigned16 unsigned_2;
typedef unsigned32 unsigned_4;
typedef unsigned32 unsigned_4;
typedef unsigned64 unsigned_8;
typedef unsigned64 unsigned_8;
typedef unsigned128 unsigned_16;
typedef unsigned128 unsigned_16;
 
 
 
 
/* for general work, the following are defined */
/* for general work, the following are defined */
/* unsigned: >= 32 bits */
/* unsigned: >= 32 bits */
/* signed:   >= 32 bits */
/* signed:   >= 32 bits */
/* long:     >= 32 bits, sign undefined */
/* long:     >= 32 bits, sign undefined */
/* int:      small indicator */
/* int:      small indicator */
 
 
/* target architecture based */
/* target architecture based */
#if (WITH_TARGET_WORD_BITSIZE == 64)
#if (WITH_TARGET_WORD_BITSIZE == 64)
typedef unsigned64 unsigned_word;
typedef unsigned64 unsigned_word;
typedef signed64 signed_word;
typedef signed64 signed_word;
#endif
#endif
#if (WITH_TARGET_WORD_BITSIZE == 32)
#if (WITH_TARGET_WORD_BITSIZE == 32)
typedef unsigned32 unsigned_word;
typedef unsigned32 unsigned_word;
typedef signed32 signed_word;
typedef signed32 signed_word;
#endif
#endif
 
 
 
 
/* Other instructions */
/* Other instructions */
#if (WITH_TARGET_ADDRESS_BITSIZE == 64)
#if (WITH_TARGET_ADDRESS_BITSIZE == 64)
typedef unsigned64 unsigned_address;
typedef unsigned64 unsigned_address;
typedef signed64 signed_address;
typedef signed64 signed_address;
#endif
#endif
#if (WITH_TARGET_ADDRESS_BITSIZE == 32)
#if (WITH_TARGET_ADDRESS_BITSIZE == 32)
typedef unsigned32 unsigned_address;
typedef unsigned32 unsigned_address;
typedef signed32 signed_address;
typedef signed32 signed_address;
#endif
#endif
typedef unsigned_address address_word;
typedef unsigned_address address_word;
 
 
 
 
/* IEEE 1275 cell size */
/* IEEE 1275 cell size */
#if (WITH_TARGET_CELL_BITSIZE == 64)
#if (WITH_TARGET_CELL_BITSIZE == 64)
typedef unsigned64 unsigned_cell;
typedef unsigned64 unsigned_cell;
typedef signed64 signed_cell;
typedef signed64 signed_cell;
#endif
#endif
#if (WITH_TARGET_CELL_BITSIZE == 32)
#if (WITH_TARGET_CELL_BITSIZE == 32)
typedef unsigned32 unsigned_cell;
typedef unsigned32 unsigned_cell;
typedef signed32 signed_cell;
typedef signed32 signed_cell;
#endif
#endif
typedef signed_cell cell_word; /* cells are normally signed */
typedef signed_cell cell_word; /* cells are normally signed */
 
 
 
 
/* Floating point registers */
/* Floating point registers */
#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 64)
#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 64)
typedef unsigned64 fp_word;
typedef unsigned64 fp_word;
#endif
#endif
#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 32)
#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 32)
typedef unsigned32 fp_word;
typedef unsigned32 fp_word;
#endif
#endif
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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