Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – /branches/algol60/src/installers/sparc/solaris/dw2_config.c – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | 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
			    VERSION INFORMATION
33
			    ===================
34
 
35
--------------------------------------------------------------------------
36
$Header: /u/g/release/CVSROOT/Source/src/installers/sparc/solaris/dw2_config.c,v 1.3 1998/03/11 11:04:05 pwe Exp $
37
--------------------------------------------------------------------------
38
$Log: dw2_config.c,v $
39
 * Revision 1.3  1998/03/11  11:04:05  pwe
40
 * DWARF optimisation info
41
 *
42
 * Revision 1.2  1998/01/21  10:30:14  pwe
43
 * labdiff change
44
 *
45
 * Revision 1.1.1.1  1998/01/17  15:55:53  release
46
 * First version to be checked into rolling release.
47
 *
48
 * Revision 1.7  1998/01/09  15:00:02  pwe
49
 * prep restructure
50
 *
51
 * Revision 1.6  1997/12/04  19:54:46  pwe
52
 * ANDF-DE V1.9
53
 *
54
 * Revision 1.5  1997/11/06  09:29:25  pwe
55
 * ANDF-DE V1.8
56
 *
57
 * Revision 1.4  1997/10/23  09:33:37  pwe
58
 * prep extra_diags
59
 *
60
 * Revision 1.3  1997/10/10  18:33:29  pwe
61
 * prep ANDF-DE revision
62
 *
63
 * Revision 1.2  1997/08/23  13:55:13  pwe
64
 * initial ANDF-DE
65
 *
66
 * Revision 1.1  1997/04/17  12:00:24  pwe
67
 * dwarf2 support
68
 *
69
--------------------------------------------------------------------------
70
*/
71
 
72
#include "config.h"
73
#include "dw2_config.h"
74
#include "translat.h"
75
#include "eval.h"
76
#include "flags.h"
77
#include "labels.h"
78
#include "basicread.h"
79
#include "target_v.h"
80
 
81
long dwarf_lab_num = 0;
82
 
83
void out8 
84
    PROTO_Z ()
85
{
86
  outs ( "\t.byte " ) ;
87
  return;
88
}
89
 
90
void out16 
91
    PROTO_Z ()
92
{
93
#ifdef NEEDS_DEBUG_ALIGN
94
  dot_align(2);
95
#endif
96
  outs ( "\t.half " ) ;
97
  return;
98
}
99
 
100
void out32 
101
    PROTO_Z ()
102
{
103
#ifdef NEEDS_DEBUG_ALIGN
104
  dot_align(4);
105
#endif
106
  outs ( "\t.word " ) ;
107
  return;
108
}
109
 
110
void dot_align 
111
    PROTO_N ( ( n ) )
112
    PROTO_T ( long n )
113
{
114
  outs ( "\t.align " ) ;
115
  outn (n);
116
  outnl();
117
  return;
118
}
119
 
120
void out_string 
121
    PROTO_N ( ( s ) )
122
    PROTO_T ( char * s )
123
{
124
  outs ("\t.asciz \"");
125
  outs (s);
126
  outs ("\"");
127
  d_outnl ();
128
  return;
129
}
130
 
131
void start_string
132
    PROTO_N ( (s) )
133
    PROTO_T ( char * s )
134
{
135
  outs ("\t.asciz \"");
136
  outs (s);
137
  return;
138
}
139
 
140
void end_string
141
    PROTO_Z ()
142
{
143
  outs ("\"");
144
  d_outnl ();
145
  return;
146
}
147
 
148
void enter_section 
149
    PROTO_N ( ( s ) )
150
    PROTO_T ( char * s )
151
{
152
  outs ("\t.section \".");
153
  outs (s);
154
  outs ("\"");
155
  d_outnl ();
156
  return;
157
}
158
 
159
void exit_section 
160
    PROTO_Z ()
161
{
162
  enum section old = current_section;
163
  current_section = no_section;
164
  insection (old);
165
  return;
166
}
167
 
168
void outnl_comment 
169
    PROTO_N ( ( s ) )
170
    PROTO_T ( char * s )
171
{
172
  outs ("\t!");
173
  outs (s);
174
  d_outnl ();
175
  return;
176
}
177
 
178
void outnl_comment_i 
179
    PROTO_N ( ( s, i ) )
180
    PROTO_T ( char * s X long i )
181
{
182
  outs ("\t!");
183
  outs (s);
184
  outs (" ");
185
  outn (i);
186
  d_outnl ();
187
  return;
188
}
189
 
190
void out_dwf_label 
191
    PROTO_N ( ( l, set ) )
192
    PROTO_T ( long l X int set )
193
{
194
  if (!l)
195
    failer ("unknown label");
196
  outs (".Ldw");
197
  outn (l);
198
  if (set) {
199
    outs (":");
200
    d_outnl ();
201
  }
202
  return;
203
}
204
 
205
void out_code_label
206
    PROTO_N ( ( l ) )
207
    PROTO_T ( long l )
208
{
209
  outs (lab_prefix);
210
  outn (l);
211
  return;
212
}
213
 
214
void out_dwf_dist_to_label 
215
    PROTO_N ( ( l ) )
216
    PROTO_T ( long l )
217
{
218
  out_dwf_label (l, 0);
219
  outs (" - . - 4");
220
  return;
221
}
222
 
223
void out_dwf_labdiff 
224
    PROTO_N ( ( lo, hi ) )
225
    PROTO_T ( long lo X long hi )
226
{
227
  if (hi == lo)
228
    outn ((long)0);
229
  else {
230
    out_dwf_label (hi, 0); 
231
    outs (" - ");
232
    out_dwf_label (lo, 0);
233
  }
234
  return;
235
}
236
 
237
void out_ext_label
238
    PROTO_N ( ( s ) )
239
    PROTO_T ( char * s )
240
{
241
  outs ("\t.global\t");
242
  outs (s);
243
  d_outnl ();
244
  outs (s);
245
  outs(":");
246
  d_outnl ();
247
  return;
248
}
249
 
250
void out_producer 
251
    PROTO_N ( ( s ) )
252
    PROTO_T ( char * s )
253
{
254
  outs ("\t.asciz \"");
255
  outs (s);
256
  outs ("   with TenDRA SPARC/Solaris installer ");
257
  outn ( target_version ) ;
258
  outs ( "." ) ;
259
  outn ( target_revision ) ;
260
  outs ("\"");
261
  d_outnl ();
262
  return;
263
}
264
 
265
 
266
static int first_data = 0;
267
static int first_ro = 0;
268
 
269
void note_data 
270
    PROTO_N ( ( ll, ro ) )
271
    PROTO_T ( int ll X bool ro )
272
{
273
  if (ro) {
274
    if (!first_ro)
275
      first_ro = ll;
276
  }
277
  else {
278
    if (!first_data)
279
      first_data = ll;
280
  }
281
  return;
282
}
283
 
284
void dw2_data_aranges 
285
    PROTO_Z ()
286
{
287
  long lab_data, lab_ro;
288
  if (first_data) {
289
    lab_data = next_dwarf_label ();
290
    if (do_prom) {
291
      outs ("\t.reserve\t");
292
      out_dwf_label (lab_data, 0);
293
      outs (", 0,\".bss\",4");
294
      d_outnl();
295
    }
296
    else {
297
      insection (data_section);
298
      out_dwf_label (lab_data, 1);
299
    }
300
  }
301
  if (first_ro) {
302
    lab_ro = next_dwarf_label ();
303
    insection (rodata_section);
304
    out_dwf_label (lab_ro, 1);
305
  }
306
  insection (text_section);
307
  enter_section ("debug_aranges");
308
  if (first_data) {
309
    out32 (); outlab (first_data); d_outnl ();
310
    out32 (); out_dwf_label (lab_data, 0); outs (" - ");
311
	outlab (first_data); d_outnl ();
312
  }
313
  if (first_ro) {
314
    out32 (); outlab (first_ro); d_outnl ();
315
    out32 (); out_dwf_label (lab_ro, 0); outs (" - ");
316
	outlab (first_ro); d_outnl ();
317
  }
318
  exit_section ();
319
  return;
320
}