Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/tendra5/src/installers/alpha/common/addresstypes.h – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/* 	$Id: addresstypes.h,v 1.1.1.1 1998/01/17 15:55:58 release Exp $	 */
32
 
33
 
34
/*
35
 
36
  addresstypes.h
37
 
38
  Types for usable addressing modes are defined here :-
39
  baseoff, instore, freg, ans, where
40
 
41
*/
42
 
43
 
44
 
45
#ifndef addressingtkey
46
#define addressingtkey 1
47
#include "cross.h"
48
#include "common_types.h"
49
 
50
 
51
struct makeansst {
52
  int   lab;
53
  int   regmove;
54
};
55
typedef struct makeansst  makeans;
56
 
57
#define NOREG 100
58
 
59
struct baseofft {
60
  int   base;			/* base register for addressing */
61
  long  offset;			/* offset in words */
62
};
63
typedef struct baseofft baseoff;
64
 
65
typedef struct source_t{
66
  bool reg;
67
  int value;
68
} source;
69
 
70
 
71
 
72
struct instoret {
73
  baseoff b;
74
  bool adval;	/* if true then b is itself an address
75
		   value i.e not a pointer to a value */
76
};
77
 
78
typedef struct instoret instore;
79
 
80
typedef enum {
81
  VAX_single,VAX_double,IEEE_single,IEEE_double
82
} float_reg_contents;
83
 
84
 
85
typedef struct fregt{
86
  int fr;
87
  float_reg_contents type;
88
} freg;
89
 
90
 
91
typedef struct somefregt {
92
  int  *fr;
93
  float_reg_contents type;
94
} somefreg;
95
 
96
 
97
struct someregt {
98
  int  *r;
99
};		
100
 
101
typedef struct someregt somereg;
102
 
103
 
104
union anstu {
105
  int   regans;			/* register number */
106
  freg fregans;
107
  instore instoreans;
108
  somefreg somefregans;		
109
  somereg someregans;
110
};
111
 
112
enum ansdiscrim {
113
  inreg, infreg, notinreg,insomereg, insomefreg
114
};
115
 /* use to discriminate the above union type */
116
 
117
struct anst {
118
  enum ansdiscrim discrim;
119
  union anstu val;
120
};
121
typedef struct anst ans;	/* this type used as union of a fixpnt
122
				   reg, a float reg and an instore 
123
				   value */
124
 
125
struct wheret {
126
  ans answhere;			/* reg or store position */
127
  ash ashwhere;			/* size and alignment, see ashtypes.h */
128
};
129
 
130
typedef struct wheret where;
131
 
132
struct mmt {
133
  INT64  maxi;
134
  INT64  mini;
135
  char *fmt;
136
};
137
typedef struct mmt  mm;
138
 
139
/******************************************************************
140
macros for ease of use of unions, allow 'hiding' of discriminator.
141
******************************************************************/
142
 
143
#define regalt(x) (x).val.regans
144
#define fregalt(x) (x).val.fregans
145
#define insalt(x) (x).val.instoreans
146
#define someregalt(x) (x).val.someregans.r;
147
#define somefregalt(x) (x).val.somefregans;
148
 
149
/* assign to field of union, discriminator set as appropriate */
150
#define setregalt(x,y) (x).discrim = inreg; (x).val.regans = y
151
#define setfregalt(x,y) (x).discrim = infreg; (x).val.fregans = y
152
#define setinsalt(x,y) (x).discrim = notinreg; (x).val.instoreans =y
153
#define setsomeregalt(x,y) (x).discrim = insomereg; (x).val.someregans.r =y
154
#define setsomefregalt(x,y) (x).discrim = insomefreg; (x).val.somefregans=y
155
#endif
156
 
157