Subversion Repositories tendra.SVN

Rev

Rev 6 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 7u83 1
/*
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific, prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 *
29
 * $Id$
30
 */
31
/*
32
    		 Crown Copyright (c) 1997
33
 
34
    This TenDRA(r) Computer Program is subject to Copyright
35
    owned by the United Kingdom Secretary of State for Defence
36
    acting through the Defence Evaluation and Research Agency
37
    (DERA).  It is made available to Recipients with a
38
    royalty-free licence for its use, reproduction, transfer
39
    to other parties and amendment for any purpose not excluding
40
    product development provided that any such use et cetera
41
    shall be deemed to be acceptance of the following conditions:-
42
 
43
        (1) Its Recipients shall ensure that this Notice is
44
        reproduced upon any copies or amended versions of it;
45
 
46
        (2) Any amended version of it shall be clearly marked to
47
        show both the nature of and the organisation responsible
48
        for the relevant amendment or amendments;
49
 
50
        (3) Its onward transfer from a recipient to another
51
        party shall be deemed to be that party's acceptance of
52
        these conditions;
53
 
54
        (4) DERA gives no warranty or assurance as to its
55
        quality or suitability for any purpose and DERA accepts
56
        no liability whatsoever in relation to any use to which
57
        it may be put.
58
*/
59
 
60
 
61
/* 80x86/instr386decs.h */
62
 
63
/**********************************************************************
64
$Author: release $
65
$Date: 1998/01/17 15:55:51 $
66
$Revision: 1.1.1.1 $
67
$Log: instr386.h,v $
68
 * Revision 1.1.1.1  1998/01/17  15:55:51  release
69
 * First version to be checked into rolling release.
70
 *
71
 * Revision 1.17  1997/10/10  18:25:22  pwe
72
 * prep ANDF-DE revision
73
 *
74
 * Revision 1.16  1996/11/08  16:19:19  pwe
75
 * check_stack to check before modifying stack
76
 *
77
 * Revision 1.15  1996/07/31  12:57:19  pwe
78
 * restore alloca stack after longjump
79
 *
80
 * Revision 1.14  1996/05/20  14:30:33  pwe
81
 * improved 64-bit handling
82
 *
83
 * Revision 1.13  1996/05/13  12:51:59  pwe
84
 * undo premature commit
85
 *
86
 * Revision 1.11  1996/01/10  14:00:01  pwe
87
 * apply with varcallees within postlude
88
 *
89
 * Revision 1.10  1995/09/26  16:47:00  pwe
90
 * compare with zero to ignore previous overflow
91
 *
92
 * Revision 1.9  1995/09/13  14:25:17  pwe
93
 * tidy for gcc
94
 *
95
 * Revision 1.8  1995/09/08  12:51:22  pwe
96
 * exceptions improved
97
 *
98
 * Revision 1.7  1995/09/05  16:25:03  pwe
99
 * specials and exception changes
100
 *
101
 * Revision 1.6  1995/08/30  16:06:45  pwe
102
 * prepare exception trapping
103
 *
104
 * Revision 1.5  1995/08/23  09:42:53  pwe
105
 * track fpu control word for trap etc
106
 *
107
 * Revision 1.4  1995/08/14  13:53:51  pwe
108
 * several corrections, tail calls and error jumps
109
 *
110
 * Revision 1.3  1995/08/04  08:29:35  pwe
111
 * 4.0 general procs implemented
112
 *
113
 * Revision 1.2  1995/01/30  12:56:25  pwe
114
 * Ownership -> PWE, tidy banners
115
 *
116
 * Revision 1.1  1994/10/27  14:15:22  jmf
117
 * Initial revision
118
 *
119
 * Revision 1.1  1994/07/12  14:34:48  jmf
120
 * Initial revision
121
 *
122
**********************************************************************/
123
 
124
 
125
/**********************************************************************
126
                        instr386decs.h
127
 
128
   declares the higher level routines which output 80x86 instructions.
129
 
130
**********************************************************************/
131
 
132
#ifndef i386_key
133
#define i386_key 1
134
 
135
 
136
extern void add(shape sha, where a1, where a2, where dest);
137
extern void absop(shape sha, where a1, where dest);
138
extern void maxop(shape sha, where a1, where a2, where dest);
139
extern void minop(shape sha, where a1, where a2, where dest);
140
extern void sub(shape sha, where min, where from, where dest);
141
extern void mult(shape sha, where a1, where a2, where dest);
142
extern void multiply(shape sha, where a1, where a2, where dest);
143
extern void div0(shape sha, where bottom, where top, where dest);
144
extern void div1(shape sha, where bottom, where top, where dest);
145
extern void div2(shape sha, where bottom, where top, where dest);
146
extern int cmp(shape sha, where from, where min, int nt, exp e);
147
extern void negate(shape sha, where a, where dest);
148
extern void move(shape sha, where from, where to);
149
extern void mova(where from, where to);
150
extern void and(shape sha, where a1, where a2, where dest);
151
extern void or(shape sha, where a1, where a2, where dest);
152
extern void xor(shape sha, where a1, where a2, where dest);
153
extern void not(shape sha, where a, where dest);
154
extern void change_var(shape sha, where from, where to);
155
extern void change_var_check(shape sha, where from, where to);
156
extern void change_var_sh(shape sha, shape fsh, where from, where to);
157
extern void floater(shape sha, where from, where to);
158
extern void frnd0(shape sha, where from, where to);
159
extern void frnd1(shape sha, where from, where to);
160
extern void frnd2(shape sha, where from, where to);
161
extern void frnd3(shape sha, where from, where to);
162
extern void frnd4(shape sha, where from, where to);
163
extern void changefl(shape sha, where from, where to);
164
extern void shiftl(shape sha, where wshift, where from, where to);
165
extern void shiftr(shape sha, where wshift, where from, where to);
166
extern void rotatel(shape sha, where wshift, where from, where to);
167
extern void rotater(shape sha, where wshift, where from, where to);
168
extern void mod(shape sha, where bottom, where top, where dest);
169
extern void rem2(shape sha, where bottom, where top, where dest);
170
extern void rem0(shape sha, where bottom, where top, where dest);
171
extern void long_jump(exp e);
172
extern void initzeros(void);
173
extern where zero;
174
extern where fzero;
175
extern where dzero;
176
extern exp zeroe;
177
extern where ind_reg0;
178
extern where ind_reg1;
179
extern where ind_sp;
180
extern where sp;
181
extern where bp;
182
extern where reg0;
183
extern where reg1;
184
extern where reg2;
185
extern where reg3;
186
extern where reg4;
187
extern where reg5;
188
extern where reg_wheres[7];
189
extern where pushdest;
190
extern where cond1;
191
extern where cond2a;
192
extern where cond2b;
193
extern int cond1_set;
194
extern int cond2_set;
195
extern void decstack(int longs);
196
extern void callins(int longs, exp ind, int ret_stack_dec);
197
extern void jumpins(exp ind);
198
extern void retins(void);
199
extern int inmem(where w);
200
extern void fl_binop(unsigned char op, shape sha, where arg1, where arg2,
201
		     where dest, exp last_arg);
202
extern void fl_multop(unsigned char op, shape sha, exp arglist, where dest);
203
extern void fl_neg(shape sha, where from, where to);
204
extern void fl_abs(shape sha, where from, where to);
205
extern void test(shape sha, where a, where b);
206
extern void fl_comp(shape sha, where pos, where neg, exp e);
207
extern where flstack;
208
extern int in_fl_reg(exp e);
209
extern int in_fstack(exp e);
210
extern void movecont(where from, where to, where length, int nooverlap);
211
extern void load_stack0(void);
212
extern int in_reg(exp e);
213
extern void end_contop(void);
214
extern int top_regsinuse;
215
extern int lsmask[33];
216
extern int first_fl_reg;
217
extern int fstack_pos;
218
extern exp overflow_e;
219
extern void stack_return(int longs);
220
extern int bad_from_reg(where f);
221
 
222
extern void bits_to_mem(exp e, exp d, ash stack);
223
extern void mem_to_bits(exp e, shape sha, where dest, ash stack);
224
 
225
extern void setup_fl_ovfl(exp e);
226
extern void test_fl_ovfl(exp e, where dest);
227
extern void reset_fpucon(void);
228
extern exp find_stlim_var(void);
229
extern void checkalloc_stack(where sz, int b);	/* uses reg1 */
230
extern void special_ins(char *id, exp args, where dest);
231
 
232
extern exp ferrmem;
233
extern int ferrsize;
234
extern int fpucon;
235
extern int cmp_64hilab;
236
 
237
extern void save_stack(void);
238
extern void restore_stack(void);
239
 
240
extern void start_asm(void);
241
extern void end_asm(void);
242
extern void asm_ins(exp e);
243
 
244
 
245
#endif
246