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 |
/* 80x86/instr386decs.h */
|
|
|
32 |
|
|
|
33 |
/**********************************************************************
|
|
|
34 |
$Author: release $
|
|
|
35 |
$Date: 1998/01/17 15:55:51 $
|
|
|
36 |
$Revision: 1.1.1.1 $
|
|
|
37 |
$Log: instr386.h,v $
|
|
|
38 |
* Revision 1.1.1.1 1998/01/17 15:55:51 release
|
|
|
39 |
* First version to be checked into rolling release.
|
|
|
40 |
*
|
|
|
41 |
* Revision 1.17 1997/10/10 18:25:22 pwe
|
|
|
42 |
* prep ANDF-DE revision
|
|
|
43 |
*
|
|
|
44 |
* Revision 1.16 1996/11/08 16:19:19 pwe
|
|
|
45 |
* check_stack to check before modifying stack
|
|
|
46 |
*
|
|
|
47 |
* Revision 1.15 1996/07/31 12:57:19 pwe
|
|
|
48 |
* restore alloca stack after longjump
|
|
|
49 |
*
|
|
|
50 |
* Revision 1.14 1996/05/20 14:30:33 pwe
|
|
|
51 |
* improved 64-bit handling
|
|
|
52 |
*
|
|
|
53 |
* Revision 1.13 1996/05/13 12:51:59 pwe
|
|
|
54 |
* undo premature commit
|
|
|
55 |
*
|
|
|
56 |
* Revision 1.11 1996/01/10 14:00:01 pwe
|
|
|
57 |
* apply with varcallees within postlude
|
|
|
58 |
*
|
|
|
59 |
* Revision 1.10 1995/09/26 16:47:00 pwe
|
|
|
60 |
* compare with zero to ignore previous overflow
|
|
|
61 |
*
|
|
|
62 |
* Revision 1.9 1995/09/13 14:25:17 pwe
|
|
|
63 |
* tidy for gcc
|
|
|
64 |
*
|
|
|
65 |
* Revision 1.8 1995/09/08 12:51:22 pwe
|
|
|
66 |
* exceptions improved
|
|
|
67 |
*
|
|
|
68 |
* Revision 1.7 1995/09/05 16:25:03 pwe
|
|
|
69 |
* specials and exception changes
|
|
|
70 |
*
|
|
|
71 |
* Revision 1.6 1995/08/30 16:06:45 pwe
|
|
|
72 |
* prepare exception trapping
|
|
|
73 |
*
|
|
|
74 |
* Revision 1.5 1995/08/23 09:42:53 pwe
|
|
|
75 |
* track fpu control word for trap etc
|
|
|
76 |
*
|
|
|
77 |
* Revision 1.4 1995/08/14 13:53:51 pwe
|
|
|
78 |
* several corrections, tail calls and error jumps
|
|
|
79 |
*
|
|
|
80 |
* Revision 1.3 1995/08/04 08:29:35 pwe
|
|
|
81 |
* 4.0 general procs implemented
|
|
|
82 |
*
|
|
|
83 |
* Revision 1.2 1995/01/30 12:56:25 pwe
|
|
|
84 |
* Ownership -> PWE, tidy banners
|
|
|
85 |
*
|
|
|
86 |
* Revision 1.1 1994/10/27 14:15:22 jmf
|
|
|
87 |
* Initial revision
|
|
|
88 |
*
|
|
|
89 |
* Revision 1.1 1994/07/12 14:34:48 jmf
|
|
|
90 |
* Initial revision
|
|
|
91 |
*
|
|
|
92 |
**********************************************************************/
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
/**********************************************************************
|
|
|
96 |
instr386decs.h
|
|
|
97 |
|
|
|
98 |
declares the higher level routines which output 80x86 instructions.
|
|
|
99 |
|
|
|
100 |
**********************************************************************/
|
|
|
101 |
|
|
|
102 |
#ifndef i386_key
|
|
|
103 |
#define i386_key 1
|
|
|
104 |
|
|
|
105 |
|
|
|
106 |
extern void add PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
107 |
extern void absop PROTO_S ((shape sha, where a1, where dest));
|
|
|
108 |
extern void maxop PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
109 |
extern void minop PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
110 |
extern void sub PROTO_S ((shape sha, where min, where from, where dest));
|
|
|
111 |
extern void mult PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
112 |
extern void multiply PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
113 |
extern void div0 PROTO_S ((shape sha, where bottom, where top, where dest));
|
|
|
114 |
extern void div1 PROTO_S ((shape sha, where bottom, where top, where dest));
|
|
|
115 |
extern void div2 PROTO_S ((shape sha, where bottom, where top, where dest));
|
|
|
116 |
extern int cmp PROTO_S ((shape sha, where from, where min, int nt, exp e));
|
|
|
117 |
extern void negate PROTO_S ((shape sha, where a, where dest));
|
|
|
118 |
extern void move PROTO_S ((shape sha, where from, where to));
|
|
|
119 |
extern void mova PROTO_S ((where from, where to));
|
|
|
120 |
extern void and PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
121 |
extern void or PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
122 |
extern void xor PROTO_S ((shape sha, where a1, where a2, where dest));
|
|
|
123 |
extern void not PROTO_S ((shape sha, where a, where dest));
|
|
|
124 |
extern void change_var PROTO_S ((shape sha, where from, where to));
|
|
|
125 |
extern void change_var_check PROTO_S ((shape sha, where from, where to));
|
|
|
126 |
extern void change_var_sh PROTO_S ((shape sha, shape fsh, where from, where to));
|
|
|
127 |
extern void floater PROTO_S ((shape sha, where from, where to));
|
|
|
128 |
extern void frnd0 PROTO_S ((shape sha, where from, where to));
|
|
|
129 |
extern void frnd1 PROTO_S ((shape sha, where from, where to));
|
|
|
130 |
extern void frnd2 PROTO_S ((shape sha, where from, where to));
|
|
|
131 |
extern void frnd3 PROTO_S ((shape sha, where from, where to));
|
|
|
132 |
extern void frnd4 PROTO_S ((shape sha, where from, where to));
|
|
|
133 |
extern void changefl PROTO_S ((shape sha, where from, where to));
|
|
|
134 |
extern void shiftl PROTO_S ((shape sha, where wshift, where from, where to));
|
|
|
135 |
extern void shiftr PROTO_S ((shape sha, where wshift, where from, where to));
|
|
|
136 |
extern void rotatel PROTO_S ((shape sha, where wshift, where from, where to));
|
|
|
137 |
extern void rotater PROTO_S ((shape sha, where wshift, where from, where to));
|
|
|
138 |
extern void mod PROTO_S ((shape sha, where bottom, where top, where dest));
|
|
|
139 |
extern void rem2 PROTO_S ((shape sha, where bottom, where top, where dest));
|
|
|
140 |
extern void rem0 PROTO_S ((shape sha, where bottom, where top, where dest));
|
|
|
141 |
extern void long_jump PROTO_S ((exp e));
|
|
|
142 |
extern void initzeros PROTO_S ((void));
|
|
|
143 |
extern where zero;
|
|
|
144 |
extern where fzero;
|
|
|
145 |
extern where dzero;
|
|
|
146 |
extern exp zeroe;
|
|
|
147 |
extern where ind_reg0;
|
|
|
148 |
extern where ind_reg1;
|
|
|
149 |
extern where ind_sp;
|
|
|
150 |
extern where sp;
|
|
|
151 |
extern where bp;
|
|
|
152 |
extern where reg0;
|
|
|
153 |
extern where reg1;
|
|
|
154 |
extern where reg2;
|
|
|
155 |
extern where reg3;
|
|
|
156 |
extern where reg4;
|
|
|
157 |
extern where reg5;
|
|
|
158 |
extern where reg_wheres[7];
|
|
|
159 |
extern where pushdest;
|
|
|
160 |
extern where cond1;
|
|
|
161 |
extern where cond2a;
|
|
|
162 |
extern where cond2b;
|
|
|
163 |
extern int cond1_set;
|
|
|
164 |
extern int cond2_set;
|
|
|
165 |
extern void decstack PROTO_S ((int longs));
|
|
|
166 |
extern void callins PROTO_S ((int longs, exp ind, int ret_stack_dec));
|
|
|
167 |
extern void jumpins PROTO_S ((exp ind));
|
|
|
168 |
extern void retins PROTO_S ((void));
|
|
|
169 |
extern int inmem PROTO_S ((where w));
|
|
|
170 |
extern void fl_binop PROTO_S((unsigned char op, shape sha, where arg1, where arg2,
|
|
|
171 |
where dest, exp last_arg));
|
|
|
172 |
extern void fl_multop PROTO_S ((unsigned char op, shape sha, exp arglist, where dest));
|
|
|
173 |
extern void fl_neg PROTO_S ((shape sha, where from, where to));
|
|
|
174 |
extern void fl_abs PROTO_S ((shape sha, where from, where to));
|
|
|
175 |
extern void test PROTO_S ((shape sha, where a, where b));
|
|
|
176 |
extern void fl_comp PROTO_S ((shape sha, where pos, where neg, exp e));
|
|
|
177 |
extern where flstack;
|
|
|
178 |
extern int in_fl_reg PROTO_S ((exp e));
|
|
|
179 |
extern int in_fstack PROTO_S ((exp e));
|
|
|
180 |
extern void movecont PROTO_S ((where from, where to, where length, int nooverlap));
|
|
|
181 |
extern void load_stack0 PROTO_S ((void));
|
|
|
182 |
extern int in_reg PROTO_S ((exp e));
|
|
|
183 |
extern void end_contop PROTO_S ((void));
|
|
|
184 |
extern int top_regsinuse;
|
|
|
185 |
extern int lsmask[33];
|
|
|
186 |
extern int first_fl_reg;
|
|
|
187 |
extern int fstack_pos;
|
|
|
188 |
extern exp overflow_e;
|
|
|
189 |
extern void stack_return PROTO_S ((int longs));
|
|
|
190 |
extern int bad_from_reg PROTO_S ((where f));
|
|
|
191 |
|
|
|
192 |
extern void bits_to_mem PROTO_S ((exp e, exp d, ash stack));
|
|
|
193 |
extern void mem_to_bits PROTO_S ((exp e, shape sha, where dest, ash stack));
|
|
|
194 |
|
|
|
195 |
extern void setup_fl_ovfl PROTO_S ((exp e));
|
|
|
196 |
extern void test_fl_ovfl PROTO_S ((exp e, where dest));
|
|
|
197 |
extern void reset_fpucon PROTO_S ((void));
|
|
|
198 |
extern exp find_stlim_var PROTO_S ((void));
|
|
|
199 |
extern void checkalloc_stack PROTO_S ((where sz, int b)); /* uses reg1 */
|
|
|
200 |
extern void special_ins PROTO_S ((char * id, exp args, where dest));
|
|
|
201 |
|
|
|
202 |
extern exp ferrmem;
|
|
|
203 |
extern int ferrsize;
|
|
|
204 |
extern int fpucon;
|
|
|
205 |
extern int cmp_64hilab;
|
|
|
206 |
|
|
|
207 |
extern void save_stack PROTO_S ((void));
|
|
|
208 |
extern void restore_stack PROTO_S ((void));
|
|
|
209 |
|
|
|
210 |
extern void start_asm PROTO_S ((void));
|
|
|
211 |
extern void end_asm PROTO_S ((void));
|
|
|
212 |
extern void asm_ins PROTO_S ((exp e));
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
#endif
|
|
|
216 |
|