1 /* Types for Cpu tools GENerated simulators.
2 Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
3 Contributed by Cygnus Support.
5 This file is part of GDB, the GNU debugger.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 /* This file is not included with cgen-sim.h as it defines types
22 needed by sim-base.h. */
27 /* Miscellaneous cgen configury defined here as this file gets
28 included soon enough. */
30 /* Indicate we support --profile-model. */
32 #define SIM_HAVE_MODEL
34 /* Indicate we support --{profile,trace}-{range,function}. */
35 #undef SIM_HAVE_ADDR_RANGE
36 #define SIM_HAVE_ADDR_RANGE
48 /* Common mode types. */
49 /* ??? Target specific modes. */
50 typedef enum mode_type
{
52 MODE_QI
, MODE_HI
, MODE_SI
, MODE_DI
,
53 MODE_UQI
, MODE_UHI
, MODE_USI
, MODE_UDI
,
54 MODE_SF
, MODE_DF
, MODE_XF
, MODE_TF
,
55 MODE_TARGET_MAX
/* = MODE_TF? */,
56 /* These are host modes. */
57 MODE_INT
, MODE_UINT
, MODE_PTR
, /*??? MODE_ADDR, MODE_IADDR,*/
61 #define MAX_TARGET_MODES ((int) MODE_TARGET_MAX)
62 #define MAX_MODES ((int) MODE_MAX)
64 extern const char *mode_names
[];
65 #define MODE_NAME(m) (mode_names[m])
68 typedef unsigned char BI
;
72 typedef unsigned8 UQI
;
73 typedef unsigned16 UHI
;
74 typedef unsigned32 USI
;
78 typedef unsigned64 UDI
;
79 #define GETLODI(di) ((SI) (di))
80 #define GETHIDI(di) ((SI) ((UDI) (di) >> 32))
81 #define SETLODI(di, val) ((di) = (((di) & 0xffffffff00000000LL) | (val)))
82 #define SETHIDI(di, val) ((di) = (((di) & 0xffffffffLL) | (((DI) (val)) << 32)))
83 #define SETDI(di, hi, lo) ((di) = MAKEDI (hi, lo))
84 #define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo)))
86 /* DI mode support if "long long" doesn't exist.
87 At one point CGEN supported K&R C compilers, and ANSI C compilers without
88 "long long". One can argue the various merits of keeping this in or
89 throwing it out. I went to the trouble of adding it so for the time being
91 typedef struct { SI hi
,lo
; } DI
;
93 #define GETLODI(di) ((di).lo)
94 #define GETHIDI(di) ((di).hi)
95 #define SETLODI(di, val) ((di).lo = (val))
96 #define SETHIDI(di, val) ((di).hi = (val))
97 #define SETDI(di, hi, lo) ((di) = MAKEDI (hi, lo))
98 extern DI
make_struct_di (SI
, SI
);
99 #define MAKEDI(hi, lo) (make_struct_di ((hi), (lo)))
102 /* These are used to record extracted raw data from an instruction, among other
103 things. It must be a host data type, and not a target one. */
105 typedef unsigned int UINT
;
107 typedef unsigned_address ADDR
; /* FIXME: wip*/
108 typedef unsigned_address IADDR
; /* FIXME: wip*/
110 /* fp types are in cgen-fpu.h */
112 #endif /* CGEN_TYPES_H */
This page took 0.031533 seconds and 4 git commands to generate.