Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    Copyright (c) 1993 Open Software Foundation, Inc.
3
 
4
 
5
    All Rights Reserved
6
 
7
 
8
    Permission to use, copy, modify, and distribute this software
9
    and its documentation for any purpose and without fee is hereby
10
    granted, provided that the above copyright notice appears in all
11
    copies and that both the copyright notice and this permission
12
    notice appear in supporting documentation.
13
 
14
 
15
    OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
16
    ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
17
    PARTICULAR PURPOSE.
18
 
19
 
20
    IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
21
    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22
    LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
23
    NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
24
    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25
*/
26
 
27
/*
28
    		 Crown Copyright (c) 1997
29
 
30
    This TenDRA(r) Computer Program is subject to Copyright
31
    owned by the United Kingdom Secretary of State for Defence
32
    acting through the Defence Evaluation and Research Agency
33
    (DERA).  It is made available to Recipients with a
34
    royalty-free licence for its use, reproduction, transfer
35
    to other parties and amendment for any purpose not excluding
36
    product development provided that any such use et cetera
37
    shall be deemed to be acceptance of the following conditions:-
38
 
39
        (1) Its Recipients shall ensure that this Notice is
40
        reproduced upon any copies or amended versions of it;
41
 
42
        (2) Any amended version of it shall be clearly marked to
43
        show both the nature of and the organisation responsible
44
        for the relevant amendment or amendments;
45
 
46
        (3) Its onward transfer from a recipient to another
47
        party shall be deemed to be that party's acceptance of
48
        these conditions;
49
 
50
        (4) DERA gives no warranty or assurance as to its
51
        quality or suitability for any purpose and DERA accepts
52
        no liability whatsoever in relation to any use to which
53
        it may be put.
54
*/
55
 
56
 
57
 
58
/**********************************************************************
59
$Author: release $
60
$Date: 1998/02/04 15:48:39 $
61
$Revision: 1.2 $
62
$Log: addresstypes.h,v $
63
 * Revision 1.2  1998/02/04  15:48:39  release
64
 * Added OSF copyright message.
65
 *
66
 * Revision 1.1.1.1  1998/01/17  15:55:56  release
67
 * First version to be checked into rolling release.
68
 *
69
 * Revision 1.2  1996/10/04  15:59:28  pwe
70
 * add banners and mod for PWE ownership
71
 *
72
**********************************************************************/
73
 
74
 
75
#include "localtypes.h"
76
 
77
#ifndef addressingtkey
78
#define addressingtkey 1
79
 
80
struct makeansst
81
{
82
  int lab;
83
  int regmove;
84
};
85
typedef struct makeansst makeans;
86
 
87
#define NOREG 100
88
 
89
struct baseofft
90
{
91
  int base;			/* base register for addressing */
92
  long offset;			/* offset in words */
93
};
94
typedef struct baseofft baseoff;
95
 
96
struct instoret
97
{
98
  baseoff b;
99
  bool adval;			/* if true then b is itself an address value
100
				 * i.e not a pointer to a value */
101
};
102
typedef struct instoret instore;
103
 
104
struct fregt
105
{
106
  int fr;			/* floating point reg (actually fr*2) */
107
  bool dble;			/* double precision */
108
};
109
typedef struct fregt freg;
110
 
111
struct somefregt
112
{
113
  int *fr;
114
  bool dble;
115
};
116
typedef struct somefregt somefreg;
117
 
118
struct someregt
119
{
120
  int *r;
121
};
122
typedef struct someregt somereg;
123
 
124
 
125
union anstu
126
{
127
  int regans;			/* register number */
128
  freg fregans;
129
  instore instoreans;
130
  somefreg somefregans;		/* not yet used */
131
  somereg someregans;
132
};
133
 
134
enum ansdiscrim
135
{
136
  inreg, 
137
  infreg, 
138
  notinreg, 
139
  insomereg, 
140
  insomefreg
141
};
142
 
143
/* use to discriminate the above union type */
144
struct anst
145
{
146
  enum ansdiscrim discrim;
147
  union anstu val;
148
};
149
typedef struct anst ans;	/* this type used as union of a fixpnt reg,
150
				 *  float reg and an instore value */
151
 
152
struct wheret
153
{
154
  ans answhere;			/* reg or store position */
155
  ash ashwhere;			/* size and alignment */
156
};
157
 
158
typedef struct wheret where;
159
 
160
struct mmt
161
{
162
  long maxi;
163
  long mini;
164
  char *fmt;
165
};
166
typedef struct mmt mm;
167
 
168
/******************************************************************
169
macros for ease of use of unions, allow 'hiding' of discriminator.
170
******************************************************************/
171
 
172
#define regalt(x) (x).val.regans
173
#define fregalt(x) (x).val.fregans
174
#define insalt(x) (x).val.instoreans
175
#define someregalt(x) (x).val.someregans.r;
176
#define somefregalt(x) (x).val.somefregans;
177
 
178
/* assign to field of union, discriminator set as appropriate */
179
#define setregalt(x,y) (x).discrim = inreg; (x).val.regans = y
180
#define setfregalt(x,y) (x).discrim = infreg; (x).val.fregans = y
181
#define setinsalt(x,y) (x).discrim = notinreg; (x).val.instoreans =y
182
#define setsomeregalt(x,y) (x).discrim = insomereg; (x).val.someregans.r =y
183
#define setsomefregalt(x,y) (x).discrim = insomefreg; (x).val.somefregans=y
184
#endif