Subversion Repositories tendra.SVN

Rev

Rev 2 | Go to most recent revision | Details | Compare with Previous | 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
/*
32
$Log: inst_fmt.h,v $
33
 * Revision 1.1.1.1  1998/01/17  15:56:02  release
34
 * First version to be checked into rolling release.
35
 *
36
 * Revision 1.2  1995/12/18  13:11:40  wfs
37
 * Put hppatrans uder cvs control. Major Changes made since last release
38
 * include:
39
 * (i) PIC code generation.
40
 * (ii) Profiling.
41
 * (iii) Dynamic Initialization.
42
 * (iv) Debugging of Exception Handling and Diagnostics.
43
 *
44
 * Revision 5.2  1995/10/20  13:58:40  wfs
45
 * Declared "reg_name()" and "call_ins()" for gcc compilation.
46
 *
47
 * Revision 5.1  1995/09/15  14:09:47  wfs
48
 * Extra function declarations added to stop gcc complaining.
49
 *
50
 * Revision 5.0  1995/08/25  13:42:58  wfs
51
 * Preperation for August 25 Glue release
52
 *
53
 * Revision 3.3  1995/08/25  11:12:16  wfs
54
 * *** empty log message ***
55
 *
56
 * Revision 3.3  1995/08/25  11:12:16  wfs
57
 * *** empty log message ***
58
 *
59
 * Revision 3.1  95/04/10  16:26:57  16:26:57  wfs (William Simmonds)
60
 * Apr95 tape version.
61
 * 
62
 * Revision 3.0  95/03/30  11:17:54  11:17:54  wfs (William Simmonds)
63
 * Mar95 tape version with CRCR95_178 bug fix.
64
 * 
65
 * Revision 2.0  95/03/15  15:27:41  15:27:41  wfs (William Simmonds)
66
 * spec 3.1 changes implemented, tests outstanding.
67
 * 
68
 * Revision 1.1  95/01/11  13:39:09  13:39:09  wfs (William Simmonds)
69
 * Initial revision
70
 * 
71
*/
72
 
73
 
74
#ifndef INST_FMT_INCLUDED
75
#define INST_FMT_INCLUDED
76
 
77
#include "addrtypes.h"
78
#include "hppains.h"
79
 
80
extern char *ext_name PROTO_S ( ( long ) ) ;
81
 
82
extern void ldmb_ins PROTO_S ( ( ins_p, int, int, int ) ) ;
83
extern void ld_ins PROTO_S ( ( ins_p, int, baseoff, int ) ) ;
84
 
85
extern void st_ins PROTO_S ( ( ins_p, int, baseoff ) ) ;
86
 
87
extern void riir_ins PROTO_S ( ( ins_p, ins_p, int, long, long, int ) ) ;
88
 
89
extern void ir_ins PROTO_S ( ( ins_p, ins_p, CONST char*, long, int ) ) ;
90
 
91
extern void imm_to_r PROTO_S ( ( long, int ) );
92
 
93
extern void set_ins PROTO_S ( ( char*, baseoff, int ) ) ;
94
extern void z_ins PROTO_S ( ( ins_p ) ) ;
95
 
96
extern void condrr_ins PROTO_S ( ( char, ins_p, int, int, int, int ) ) ;
97
extern void condri_ins PROTO_S ( ( ins_p, int, long, int ) ) ;
98
 
99
extern void extj_special_ins PROTO_S ( (CONST char *, int, char *, int ) ) ;
100
extern void extj_reg_ins PROTO_S ( ( ins_p, int ) ) ;
101
 
102
extern void ret_ins PROTO_S ( ( ins_p ) ) ;
103
 
104
extern void ldf_ro_ins PROTO_S ( ( ins_p, baseoff, int ) ) ;
105
extern void ldf_rr_ins PROTO_S ( ( ins_p,ins_p, int, int, int ) ) ;
106
extern void ldf_ins PROTO_S ( ( ins_p, baseoff, int ) ) ;
107
extern void stf_ro_ins PROTO_S ( ( ins_p, int, baseoff ) ) ;
108
extern void stf_rr_ins PROTO_S ( ( ins_p, int, int, int ) ) ;
109
extern void stf_ins PROTO_S ( ( ins_p, int, baseoff ) ) ;
110
 
111
extern void rrf_ins PROTO_S ( ( ins_p,ins_p,ins_p, int, int ) ) ;
112
extern void rrrf_ins PROTO_S ( ( ins_p, ins_p, int, int, int ) ) ;
113
 
114
extern void rrf_cmp_ins PROTO_S ( ( ins_p, int, int ) ) ;
115
extern void immr_ins PROTO_S ( ( ins_p, char*,char*,long,char*,int ) ) ;
116
extern void ld_immr_ins PROTO_S ( ( ins_p, char*,char*,long,char*,int,int ) ) ;
117
extern void st_immr_ins PROTO_S ( ( ins_p,int, char*,char*,long,char*,int ) ) ;
118
extern void iiir_ins PROTO_S ( ( ins_p,ins_p,int,int,int,int ) );
119
extern void bb_in PROTO_S ( ( ins_p,int,int,int ) );
120
extern void rr_ins PROTO_S (( ins_p, int, int ));
121
extern void rrr_ins PROTO_S (( ins_p, ins_p, int, int, int ));
122
extern void ub_ins PROTO_S (( CONST char*, int ));
123
extern void cj_ins PROTO_S (( CONST char*, int, int, int ));
124
extern void st_ir_ins PROTO_S (( ins_p, ins_p, int, ins_p, CONST char*, long, int ));
125
extern void ld_ir_ins PROTO_S (( ins_p, ins_p, ins_p, CONST char*, long, int, int ));
126
extern void comb_ins PROTO_S (( CONST char*, int, int, int ));
127
extern void cmp_rrf_ins PROTO_S (( ins_p, ins_p, ins_p, int, int ));
128
extern void rrir_ins PROTO_S (( ins_p, ins_p, int, int, long, int ));
129
extern void cij_ins PROTO_S (( CONST char*, long, int, int ));
130
extern void irr_ins PROTO_S (( ins_p, ins_p, ins_p, long, int, int ));
131
extern void ld_rr_ins PROTO_S (( ins_p, ins_p, int, int, int ));
132
extern void r_ins PROTO_S (( ins_p, int ));
133
extern void out_directive PROTO_S (( CONST char*, CONST char* ));
134
extern void iir_ins PROTO_S (( ins_p, ins_p, int, int, int ));
135
extern void rir_ins PROTO_S (( ins_p, ins_p, int, long, int ));
136
extern CONST char* reg_name PROTO_S (( int ));
137
extern void call_ins PROTO_S (( ins_p, char*, int, char* ));
138
extern void outlab PROTO_S (( char*, int ));
139
extern void bl_in PROTO_S (( ins_p, char*, int ));
140
extern void ble_in PROTO_S (( ins_p, char*, int, int ));
141
 
142
int line,lines,nLabels;
143
 
144
#if FS_NO_ANSI_ENVIRON
145
typedef long FILE_POSN ;
146
#define SET_FILE_POSN( A, B )		fseek ( ( A ), ( B ), SEEK_SET )
147
#define GET_FILE_POSN( A, B )		( B ) = ftell ( ( A ) )
148
#else
149
typedef fpos_t FILE_POSN ;
150
#define SET_FILE_POSN( A, B )		fsetpos ( ( A ), &( B ) )
151
#define GET_FILE_POSN( A, B )		fgetpos ( ( A ), &( B ) )
152
#endif
153
 
154
typedef struct {
155
   FILE_POSN fpos;     /* position in outf  */
156
   ins_p  ins;        /* instruction       */                    
157
   ins_p  cc;        /* condition code    */                    
158
   int    op[4];    /* operands          */
159
   int    lab;     /* label             */
160
} psuedoIn;
161
 
162
typedef psuedoIn *pIn;
163
 
164
/* #define BLOCK 131072 */
165
 
166
#define BLOCK 65536
167
#define INCR  4096
168
 
169
pIn *pCode;
170
int *labIntro;  /*  `labIntro[lab]' will record the line number on
171
                     which label `lab' was introduced. */
172
 
173
 
174
 
175
#endif /* INST_FMT_INCLUDED */