Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line -... Line 1...
-
 
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
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
Line 101... Line 131...
101
 
131
 
102
#ifndef i386_key
132
#ifndef i386_key
103
#define i386_key 1
133
#define i386_key 1
104
 
134
 
105
 
135
 
106
extern  void add PROTO_S ((shape sha, where a1, where a2, where dest));
136
extern  void add(shape sha, where a1, where a2, where dest);
107
extern  void absop PROTO_S ((shape sha, where a1, where dest));
137
extern  void absop(shape sha, where a1, where dest);
108
extern  void maxop PROTO_S ((shape sha, where a1, where a2, where dest));
138
extern  void maxop(shape sha, where a1, where a2, where dest);
109
extern  void minop PROTO_S ((shape sha, where a1, where a2, where dest));
139
extern  void minop(shape sha, where a1, where a2, where dest);
110
extern  void sub PROTO_S ((shape sha, where min, where from, where dest));
140
extern  void sub(shape sha, where min, where from, where dest);
111
extern  void mult PROTO_S ((shape sha, where a1, where a2, where dest));
141
extern  void mult(shape sha, where a1, where a2, where dest);
112
extern  void multiply PROTO_S ((shape sha, where a1, where a2, where dest));
142
extern  void multiply(shape sha, where a1, where a2, where dest);
113
extern  void div0 PROTO_S ((shape sha, where bottom, where top, where dest));
143
extern  void div0(shape sha, where bottom, where top, where dest);
114
extern  void div1 PROTO_S ((shape sha, where bottom, where top, where dest));
144
extern  void div1(shape sha, where bottom, where top, where dest);
115
extern  void div2 PROTO_S ((shape sha, where bottom, where top, where dest));
145
extern  void div2(shape sha, where bottom, where top, where dest);
116
extern  int cmp PROTO_S ((shape sha, where from, where min, int nt, exp e));
146
extern  int cmp(shape sha, where from, where min, int nt, exp e);
117
extern  void negate PROTO_S ((shape sha, where a, where dest));
147
extern  void negate(shape sha, where a, where dest);
118
extern  void move PROTO_S ((shape sha, where from, where to));
148
extern  void move(shape sha, where from, where to);
119
extern  void mova PROTO_S ((where from, where to));
149
extern  void mova(where from, where to);
120
extern  void and PROTO_S ((shape sha, where a1, where a2, where dest));
150
extern  void and(shape sha, where a1, where a2, where dest);
121
extern  void or PROTO_S ((shape sha, where a1, where a2, where dest));
151
extern  void or(shape sha, where a1, where a2, where dest);
122
extern  void xor PROTO_S ((shape sha, where a1, where a2, where dest));
152
extern  void xor(shape sha, where a1, where a2, where dest);
123
extern  void not PROTO_S ((shape sha, where a, where dest));
153
extern  void not(shape sha, where a, where dest);
124
extern  void change_var PROTO_S ((shape sha, where from, where to));
154
extern  void change_var(shape sha, where from, where to);
125
extern  void change_var_check PROTO_S ((shape sha, where from, where to));
155
extern  void change_var_check(shape sha, where from, where to);
126
extern  void change_var_sh PROTO_S ((shape sha, shape fsh, where from, where to));
156
extern  void change_var_sh(shape sha, shape fsh, where from, where to);
127
extern  void floater PROTO_S ((shape sha, where from, where to));
157
extern  void floater(shape sha, where from, where to);
128
extern  void frnd0 PROTO_S ((shape sha, where from, where to));
158
extern  void frnd0(shape sha, where from, where to);
129
extern  void frnd1 PROTO_S ((shape sha, where from, where to));
159
extern  void frnd1(shape sha, where from, where to);
130
extern  void frnd2 PROTO_S ((shape sha, where from, where to));
160
extern  void frnd2(shape sha, where from, where to);
131
extern  void frnd3 PROTO_S ((shape sha, where from, where to));
161
extern  void frnd3(shape sha, where from, where to);
132
extern  void frnd4 PROTO_S ((shape sha, where from, where to));
162
extern  void frnd4(shape sha, where from, where to);
133
extern  void changefl PROTO_S ((shape sha, where from, where to));
163
extern  void changefl(shape sha, where from, where to);
134
extern  void shiftl PROTO_S ((shape sha, where wshift, where from, where to));
164
extern  void shiftl(shape sha, where wshift, where from, where to);
135
extern  void shiftr PROTO_S ((shape sha, where wshift, where from, where to));
165
extern  void shiftr(shape sha, where wshift, where from, where to);
136
extern  void rotatel PROTO_S ((shape sha, where wshift, where from, where to));
166
extern  void rotatel(shape sha, where wshift, where from, where to);
137
extern  void rotater PROTO_S ((shape sha, where wshift, where from, where to));
167
extern  void rotater(shape sha, where wshift, where from, where to);
138
extern  void mod PROTO_S ((shape sha, where bottom, where top, where dest));
168
extern  void mod(shape sha, where bottom, where top, where dest);
139
extern  void rem2 PROTO_S ((shape sha, where bottom, where top, where dest));
169
extern  void rem2(shape sha, where bottom, where top, where dest);
140
extern  void rem0 PROTO_S ((shape sha, where bottom, where top, where dest));
170
extern  void rem0(shape sha, where bottom, where top, where dest);
141
extern  void long_jump PROTO_S ((exp e));
171
extern  void long_jump(exp e);
142
extern  void initzeros PROTO_S ((void));
172
extern  void initzeros(void);
143
extern  where zero;
173
extern  where zero;
144
extern  where fzero;
174
extern  where fzero;
145
extern  where dzero;
175
extern  where dzero;
146
extern  exp zeroe;
176
extern  exp zeroe;
147
extern  where ind_reg0;
177
extern  where ind_reg0;
Line 160... Line 190...
160
extern  where cond1;
190
extern  where cond1;
161
extern  where cond2a;
191
extern  where cond2a;
162
extern  where cond2b;
192
extern  where cond2b;
163
extern  int cond1_set;
193
extern  int cond1_set;
164
extern  int cond2_set;
194
extern  int cond2_set;
165
extern  void decstack PROTO_S ((int longs));
195
extern  void decstack(int longs);
166
extern  void callins PROTO_S ((int longs, exp ind, int ret_stack_dec));
196
extern  void callins(int longs, exp ind, int ret_stack_dec);
167
extern  void jumpins PROTO_S ((exp ind));
197
extern  void jumpins(exp ind);
168
extern  void retins PROTO_S ((void));
198
extern  void retins(void);
169
extern  int inmem PROTO_S ((where w));
199
extern  int inmem(where w);
170
extern  void fl_binop PROTO_S((unsigned char op, shape sha, where arg1, where arg2,
200
extern  void fl_binop (unsigned char op, shape sha, where arg1, where arg2,
171
          where dest, exp last_arg));
201
          where dest, exp last_arg);
172
extern  void fl_multop PROTO_S ((unsigned char op, shape sha, exp arglist, where dest));
202
extern  void fl_multop(unsigned char op, shape sha, exp arglist, where dest);
173
extern  void fl_neg PROTO_S ((shape sha, where from, where to));
203
extern  void fl_neg(shape sha, where from, where to);
174
extern  void fl_abs PROTO_S ((shape sha, where from, where to));
204
extern  void fl_abs(shape sha, where from, where to);
175
extern  void test PROTO_S ((shape sha, where a, where b));
205
extern  void test(shape sha, where a, where b);
176
extern  void fl_comp PROTO_S ((shape sha, where pos, where neg, exp e));
206
extern  void fl_comp(shape sha, where pos, where neg, exp e);
177
extern  where flstack;
207
extern  where flstack;
178
extern  int in_fl_reg PROTO_S ((exp e));
208
extern  int in_fl_reg(exp e);
179
extern  int in_fstack PROTO_S ((exp e));
209
extern  int in_fstack(exp e);
180
extern  void movecont PROTO_S ((where from, where to, where length, int nooverlap));
210
extern  void movecont(where from, where to, where length, int nooverlap);
181
extern  void load_stack0 PROTO_S ((void));
211
extern  void load_stack0(void);
182
extern  int in_reg PROTO_S ((exp e));
212
extern  int in_reg(exp e);
183
extern  void end_contop PROTO_S ((void));
213
extern  void end_contop(void);
184
extern  int top_regsinuse;
214
extern  int top_regsinuse;
185
extern  int lsmask[33];
215
extern  int lsmask[33];
186
extern  int first_fl_reg;
216
extern  int first_fl_reg;
187
extern  int fstack_pos;
217
extern  int fstack_pos;
188
extern  exp overflow_e;
218
extern  exp overflow_e;
189
extern  void stack_return PROTO_S ((int longs));
219
extern  void stack_return(int longs);
190
extern  int bad_from_reg PROTO_S ((where f));
220
extern  int bad_from_reg(where f);
191
 
221
 
192
extern  void bits_to_mem PROTO_S ((exp e, exp d, ash stack));
222
extern  void bits_to_mem(exp e, exp d, ash stack);
193
extern  void mem_to_bits PROTO_S ((exp e, shape sha, where dest, ash stack));
223
extern  void mem_to_bits(exp e, shape sha, where dest, ash stack);
194
 
224
 
195
extern  void setup_fl_ovfl PROTO_S ((exp e));
225
extern  void setup_fl_ovfl(exp e);
196
extern  void test_fl_ovfl PROTO_S ((exp e, where dest));
226
extern  void test_fl_ovfl(exp e, where dest);
197
extern void reset_fpucon PROTO_S ((void));
227
extern void reset_fpucon(void);
198
extern exp find_stlim_var PROTO_S ((void));
228
extern exp find_stlim_var(void);
199
extern void checkalloc_stack PROTO_S ((where sz, int b));	/* uses reg1 */
229
extern void checkalloc_stack (where sz, int b);	/* uses reg1 */
200
extern void special_ins PROTO_S ((char * id, exp args, where dest));
230
extern void special_ins(char * id, exp args, where dest);
201
 
231
 
202
extern exp ferrmem;
232
extern exp ferrmem;
203
extern int ferrsize;
233
extern int ferrsize;
204
extern int fpucon;
234
extern int fpucon;
205
extern int cmp_64hilab;
235
extern int cmp_64hilab;
206
 
236
 
207
extern void save_stack PROTO_S ((void));
237
extern void save_stack(void);
208
extern void restore_stack PROTO_S ((void));
238
extern void restore_stack(void);
209
 
239
 
210
extern void start_asm PROTO_S ((void));
240
extern void start_asm(void);
211
extern void end_asm PROTO_S ((void));
241
extern void end_asm(void);
212
extern void asm_ins PROTO_S ((exp e));
242
extern void asm_ins(exp e);
213
 
243
 
214
 
244
 
215
#endif
245
#endif
216
 
246