2 |
7u83 |
1 |
/*
|
7 |
7u83 |
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 |
/*
|
2 |
7u83 |
32 |
Crown Copyright (c) 1997
|
7 |
7u83 |
33 |
|
2 |
7u83 |
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:-
|
7 |
7u83 |
42 |
|
2 |
7u83 |
43 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
44 |
reproduced upon any copies or amended versions of it;
|
7 |
7u83 |
45 |
|
2 |
7u83 |
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;
|
7 |
7u83 |
49 |
|
2 |
7u83 |
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;
|
7 |
7u83 |
53 |
|
2 |
7u83 |
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 |
/**********************************************************************
|
|
|
62 |
$Author: pwe $
|
|
|
63 |
$Date: 1998/03/15 16:00:28 $
|
|
|
64 |
$Revision: 1.4 $
|
|
|
65 |
$Log: dw2_config.h,v $
|
|
|
66 |
* Revision 1.4 1998/03/15 16:00:28 pwe
|
|
|
67 |
* regtrack dwarf dagnostics added
|
|
|
68 |
*
|
|
|
69 |
* Revision 1.3 1998/03/11 11:03:14 pwe
|
|
|
70 |
* DWARF optimisation info
|
|
|
71 |
*
|
|
|
72 |
* Revision 1.2 1998/02/18 11:22:07 pwe
|
|
|
73 |
* test corrections
|
|
|
74 |
*
|
|
|
75 |
* Revision 1.1.1.1 1998/01/17 15:55:53 release
|
|
|
76 |
* First version to be checked into rolling release.
|
|
|
77 |
*
|
|
|
78 |
* Revision 1.10 1998/01/09 14:47:57 pwe
|
|
|
79 |
* prep restructure
|
|
|
80 |
*
|
|
|
81 |
* Revision 1.9 1997/12/04 20:01:33 pwe
|
|
|
82 |
* ANDF-DE V1.9
|
|
|
83 |
*
|
|
|
84 |
* Revision 1.8 1997/10/28 10:26:51 pwe
|
|
|
85 |
* correct extra diags / locations
|
|
|
86 |
*
|
|
|
87 |
* Revision 1.7 1997/10/23 09:37:32 pwe
|
|
|
88 |
* extra_diags
|
|
|
89 |
*
|
|
|
90 |
* Revision 1.6 1997/10/10 18:26:05 pwe
|
|
|
91 |
* prep ANDF-DE revision
|
|
|
92 |
*
|
|
|
93 |
* Revision 1.5 1997/08/23 13:46:07 pwe
|
|
|
94 |
* initial ANDF-DE
|
|
|
95 |
*
|
|
|
96 |
* Revision 1.4 1997/04/17 11:56:09 pwe
|
|
|
97 |
* dwarf2 improvements
|
|
|
98 |
*
|
|
|
99 |
* Revision 1.3 1997/04/02 10:33:46 pwe
|
|
|
100 |
* diagnose pl_tests
|
|
|
101 |
*
|
|
|
102 |
* Revision 1.2 1997/03/24 11:15:50 pwe
|
|
|
103 |
* dwarf2 option/default
|
|
|
104 |
*
|
|
|
105 |
* Revision 1.1 1997/03/20 16:24:41 pwe
|
|
|
106 |
* dwarf2
|
|
|
107 |
*
|
|
|
108 |
**********************************************************************/
|
|
|
109 |
|
|
|
110 |
#ifndef dw2_config_key
|
|
|
111 |
#define dw2_config_key 1
|
|
|
112 |
|
|
|
113 |
#include "config.h"
|
|
|
114 |
#include "common_types.h"
|
|
|
115 |
#include "out.h"
|
|
|
116 |
#include "assembler.h"
|
|
|
117 |
#include "localflags.h"
|
|
|
118 |
#include "dw2_iface.h"
|
|
|
119 |
|
|
|
120 |
#define DWARF_MOD_VERSION DWARF_VERSION
|
|
|
121 |
#define DW_CIE_MOD_VERSION DW_CIE_VERSION
|
|
|
122 |
|
|
|
123 |
|
7 |
7u83 |
124 |
#define d_outnl()outs("\n")
|
2 |
7u83 |
125 |
|
7 |
7u83 |
126 |
extern void out_string(char *s);
|
|
|
127 |
extern void start_string(char *s);
|
|
|
128 |
extern void end_string(void);
|
|
|
129 |
extern void enter_section(char *s);
|
|
|
130 |
extern void exit_section(void);
|
|
|
131 |
extern void outnl_comment(char *s);
|
|
|
132 |
extern void outnl_comment_i(char *s, long i);
|
|
|
133 |
extern void out_dwf_label(long l, int set);
|
|
|
134 |
extern void out_code_label(long l);
|
|
|
135 |
extern void out_dwf_dist_to_label(long l);
|
|
|
136 |
extern void out_dwf_labdiff(long lo, long hi);
|
|
|
137 |
extern void out_ext_label(char *s);
|
|
|
138 |
extern void out_producer(char *s);
|
2 |
7u83 |
139 |
|
7 |
7u83 |
140 |
extern int dw_is_const(exp e);
|
|
|
141 |
extern exp dw_has_location(exp e);
|
|
|
142 |
extern void dw2_locate_exp(exp e, int locate_const, int cx);
|
|
|
143 |
extern void dw2_prepare_locate(exp id);
|
|
|
144 |
extern void dw_at_procdetails(void);
|
|
|
145 |
extern void dw2_locate_result(shape sha);
|
|
|
146 |
extern void dw2_locate_val(dg_where v);
|
|
|
147 |
extern void dw2_offset_exp(exp e);
|
|
|
148 |
extern void dw2_data_aranges(void);
|
2 |
7u83 |
149 |
|
7 |
7u83 |
150 |
extern void dw2_cie(void);
|
|
|
151 |
extern void trace_dw_branch_exits(exp e);
|
2 |
7u83 |
152 |
|
7 |
7u83 |
153 |
extern int dw_loc_equivalence(exp a, exp b);
|
|
|
154 |
extern void dw_allocated(dg_name nm, exp id);
|
|
|
155 |
extern void dw_deallocated(dg_name nm);
|
|
|
156 |
extern void dw_all_deallocated(void);
|
2 |
7u83 |
157 |
|
|
|
158 |
|
|
|
159 |
extern long dwarf_lab_num;
|
|
|
160 |
|
7 |
7u83 |
161 |
#define min_instr_size 1
|
|
|
162 |
#define framecode_factor 1
|
|
|
163 |
#define framedata_factor -4 /* registers are stored -ve from CFA */
|
|
|
164 |
#define next_dwarf_label() (++dwarf_lab_num)
|
|
|
165 |
#define out8() outbyte()
|
|
|
166 |
#define out16() outshort()
|
|
|
167 |
#define out32() outlong()
|
2 |
7u83 |
168 |
|
7 |
7u83 |
169 |
#define dw_line_base -16 /* small negative for short loop
|
|
|
170 |
end-conditions */
|
|
|
171 |
#define dw_line_range 128 /* large, since we don't calculate
|
|
|
172 |
instruction lengths */
|
2 |
7u83 |
173 |
|
|
|
174 |
|
|
|
175 |
extern long instr_count;
|
|
|
176 |
#define any_output instr_count
|
|
|
177 |
#define reset_any_output instr_count = 0
|
|
|
178 |
|
|
|
179 |
|
7 |
7u83 |
180 |
extern void note_data(char *s);
|
|
|
181 |
extern void note_ro(char *s);
|
2 |
7u83 |
182 |
|
|
|
183 |
|
|
|
184 |
|
|
|
185 |
#endif
|