Subversion Repositories tendra.SVN

Rev

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

Rev 5 Rev 6
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 70... Line 100...
70
 * Revision 5.8  1995/10/16  14:43:24  wfs
100
 * Revision 5.8  1995/10/16  14:43:24  wfs
71
 * *** empty log message ***
101
 * *** empty log message ***
72
 *
102
 *
73
 * Revision 5.7  1995/10/09  12:54:58  wfs
103
 * Revision 5.7  1995/10/09  12:54:58  wfs
74
 * Cosmetic changes.
104
 * Cosmetic changes.
75
 *
105
 *
76
 * Revision 5.6  1995/10/05  09:03:06  wfs
106
 * Revision 5.6  1995/10/05  09:03:06  wfs
77
 * Refinements to procedure translation ordering - can now translate
107
 * Refinements to procedure translation ordering - can now translate
78
 * according to source file ordering (for XDB) or can translate global
108
 * according to source file ordering (for XDB) or can translate global
79
 * procedures first (aids compilation and linking of large programs such
109
 * procedures first (aids compilation and linking of large programs such
80
 * as tdfc's "trans_unit.c").
110
 * as tdfc's "trans_unit.c").
Line 99... Line 129...
99
 *
129
 *
100
 * Revision 5.0  1995/08/25  13:42:58  wfs
130
 * Revision 5.0  1995/08/25  13:42:58  wfs
101
 * Preperation for August 25 Glue release
131
 * Preperation for August 25 Glue release
102
 *
132
 *
103
 * Revision 3.3  1995/08/25  10:37:30  wfs
133
 * Revision 3.3  1995/08/25  10:37:30  wfs
104
 * "find_tg" added. Changes to the diagnostics interface. Cosmetic
134
 * "find_tg" added. Changes to the diagnostics interface. Cosmetic
105
 * changes. Register allocation is done differently now.
135
 * changes. Register allocation is done differently now.
106
 *
136
 *
107
 * Revision 3.3  1995/08/25  10:37:30  wfs
137
 * Revision 3.3  1995/08/25  10:37:30  wfs
108
 * "find_tg" added. Changes to the diagnostics interface. Cosmetic
138
 * "find_tg" added. Changes to the diagnostics interface. Cosmetic
109
 * changes. Register allocation is done differently now.
139
 * changes. Register allocation is done differently now.
110
 *
140
 *
111
 * Revision 3.1  95/04/10  16:28:36  16:28:36  wfs (William Simmonds)
141
 * Revision 3.1  95/04/10  16:28:36  16:28:36  wfs (William Simmonds)
112
 * Apr95 tape version.
142
 * Apr95 tape version.
113
 * 
143
 *
114
 * Revision 3.0  95/03/30  11:19:09  11:19:09  wfs (William Simmonds)
144
 * Revision 3.0  95/03/30  11:19:09  11:19:09  wfs (William Simmonds)
115
 * Mar95 tape version with CRCR95_178 bug fix.
145
 * Mar95 tape version with CRCR95_178 bug fix.
116
 * 
146
 *
117
 * Revision 2.0  95/03/15  15:29:03  15:29:03  wfs (William Simmonds)
147
 * Revision 2.0  95/03/15  15:29:03  15:29:03  wfs (William Simmonds)
118
 * spec 3.1 changes implemented, tests outstanding.
148
 * spec 3.1 changes implemented, tests outstanding.
119
 * 
149
 *
120
 * Revision 1.3  95/02/10  11:38:54  11:38:54  wfs (William Simmonds)
150
 * Revision 1.3  95/02/10  11:38:54  11:38:54  wfs (William Simmonds)
121
 * Rewrote the inner level initializations previously handled by calls
151
 * Rewrote the inner level initializations previously handled by calls
122
 * to evaluated().
152
 * to evaluated().
123
 * 
153
 *
124
 * Revision 1.2  95/01/17  17:31:02  17:31:02  wfs (William Simmonds)
154
 * Revision 1.2  95/01/17  17:31:02  17:31:02  wfs (William Simmonds)
125
 * Changed name of an included header file.
155
 * Changed name of an included header file.
126
 * 
156
 *
127
 * Revision 1.1  95/01/11  12:59:09  12:59:09  wfs (William Simmonds)
157
 * Revision 1.1  95/01/11  12:59:09  12:59:09  wfs (William Simmonds)
128
 * Initial revision
158
 * Initial revision
129
 * 
159
 *
130
*/
160
*/
131
 
161
 
132
 
162
 
133
#define HPPATRANS_CODE
163
#define HPPATRANS_CODE
134
/*
164
/*
Line 248... Line 278...
248
#include "getregs.h"
278
#include "getregs.h"
249
#include "special.h"
279
#include "special.h"
250
#include "oprators.h"
280
#include "oprators.h"
251
#include "time.h"
281
#include "time.h"
252
 
282
 
253
extern dec *diag_def ;
283
extern dec *diag_def;
254
 
284
 
255
 
285
 
256
 
286
 
257
int optim_level;		/* optimisation level from -O# option */
287
int optim_level;		/* optimisation level from -O# option */
258
int maxfix_tregs;		/* the number of t regs allocatable */
288
int maxfix_tregs;		/* the number of t regs allocatable */
Line 261... Line 291...
261
char export[128];
291
char export[128];
262
labexp current,first;
292
labexp current,first;
263
 
293
 
264
int nexps;
294
int nexps;
265
 
295
 
266
extern baseoff boff PROTO_S ( ( exp ) ) ;
296
extern baseoff boff(exp);
267
extern int res_label;
297
extern int res_label;
268
 
298
 
269
FILE *outf = NULL;/* assembler output file */
299
FILE *outf = NULL;/* assembler output file */
270
dec **main_globals;
300
dec **main_globals;
271
int main_globals_index;
301
int main_globals_index;
272
 
302
 
273
procrec *procrecs,*cpr;
303
procrec *procrecs,*cpr;
274
 
304
 
275
dec *diag_def = NULL ;	/* diagnostics definition */
305
dec *diag_def = NULL ;	/* diagnostics definition */
276
 
306
 
277
#define is_zero( e ) is_comm( e )
307
#define is_zero(e)is_comm(e)
278
#define TRANSLATE_GLOBALS_FIRST 1
308
#define TRANSLATE_GLOBALS_FIRST 1
279
 
309
 
280
ash ashof 
310
ash ashof
281
    PROTO_N ( ( s ) )
-
 
282
    PROTO_T ( shape s )
311
(shape s)
283
{
312
{
284
  ash a;
313
  ash a;
285
 
314
 
286
  a.ashsize = shape_size(s);
315
  a.ashsize = shape_size(s);
287
  a.ashalign = shape_align(s);
316
  a.ashalign = shape_align(s);
288
  return a;
317
  return a;
289
}
318
}
290
 
319
 
291
 
320
 
292
/* is shape 'sha' of unknown size? */
321
/* is shape 'sha' of unknown size? */
293
static bool varsize 
322
static bool varsize
294
    PROTO_N ( ( sha ) )
-
 
295
    PROTO_T ( shape sha )
323
(shape sha)
296
{
324
{
297
  switch (name(sha))
325
  switch (name(sha))
298
  {
326
  {
299
    case cpdhd:
327
    case cpdhd:
300
    {
328
    {
Line 319... Line 347...
319
  default:
347
  default:
320
    return 0;
348
    return 0;
321
  }
349
  }
322
}
350
}
323
 
351
 
324
void insection 
352
void insection
325
    PROTO_N ( ( s ) )
-
 
326
    PROTO_T ( enum section s )
353
(enum section s)
327
{
354
{
328
  static enum section current_section = no_section;
355
  static enum section current_section = no_section;
329
 
356
 
330
  if (s == current_section)
357
  if (s == current_section)
331
    return;
358
    return;
Line 339... Line 366...
339
	 outs("\t.SHORTDATA\n");
366
	 outs("\t.SHORTDATA\n");
340
	 return;
367
	 return;
341
       }
368
       }
342
       case data_section:
369
       case data_section:
343
       {
370
       {
344
	 outs("\t.DATA\n");  
371
	 outs("\t.DATA\n");
345
	 return;
372
	 return;
346
       }
373
       }
347
       case text_section:
374
       case text_section:
348
       {
375
       {
349
	 outs("\t.CODE\n");
376
	 outs("\t.CODE\n");
Line 371... Line 398...
371
       default: {}
398
       default: {}
372
    }
399
    }
373
    failer("bad \".section\" name");
400
    failer("bad \".section\" name");
374
}
401
}
375
 
402
 
376
void mark_unaliased 
403
void mark_unaliased
377
    PROTO_N ( ( e ) )
-
 
378
    PROTO_T ( exp e )
404
(exp e)
379
{
405
{
380
  exp p = pt(e);
406
  exp p = pt(e);
381
  bool ca = 1;
407
  bool ca = 1;
382
  assert(!separate_units);	/* don't know about aliases in other units */
408
  assert(!separate_units);	/* don't know about aliases in other units */
383
  while (p != nilexp && ca)
409
  while (p != nilexp && ca)
Line 398... Line 424...
398
    setcaonly(e);
424
    setcaonly(e);
399
  return;
425
  return;
400
}
426
}
401
 
427
 
402
baseoff find_tg
428
baseoff find_tg
403
    PROTO_N ( (n) )
-
 
404
    PROTO_T ( char *n )
429
(char *n)
405
{
430
{
406
   int i;
431
   int i;
407
   for(i=0;i<main_globals_index;i++) 
432
   for (i=0;i<main_globals_index;i++)
408
   {
433
   {
409
      exp tg = main_globals[i] -> dec_u.dec_val.dec_exp;
434
      exp tg = main_globals[i] -> dec_u.dec_val.dec_exp;
410
      char *id = main_globals[i] -> dec_u.dec_val.dec_id;
435
      char *id = main_globals[i] -> dec_u.dec_val.dec_id;
411
      if ( strcmp(id,n)==0 )
436
      if (strcmp(id,n) ==0)
412
      {
437
      {
413
	 return boff(tg); 
438
	 return boff(tg);
414
      }
439
      }
415
   }
440
   }
416
   failer("Extension name not declared ");
441
   failer("Extension name not declared ");
417
   exit(EXIT_FAILURE);
442
   exit(EXIT_FAILURE);
418
}	
443
}
419
 
444
 
420
 
445
 
421
/* translate the TDF */
446
/* translate the TDF */
422
void translate_capsule 
447
void translate_capsule
423
    PROTO_Z ()
448
(void)
424
{
449
{
425
  int noprocs;
450
  int noprocs;
426
  int procno;
451
  int procno;
427
  int i;
452
  int i;
428
  dec *crt_def,**proc_def_trans_order;
453
  dec *crt_def,**proc_def_trans_order;
Line 431... Line 456...
431
  int r;
456
  int r;
432
  static int capn=0;
457
  static int capn=0;
433
  capn++;
458
  capn++;
434
 
459
 
435
  /* mark the as output as TDF compiled */
460
  /* mark the as output as TDF compiled */
436
  outs("\t;  Produced by the DERA TDF->HP PA-RISC translator ") ;
461
  outs("\t;  Produced by the DERA TDF->HP PA-RISC translator ");
437
  fprintf(outf,"%d.%d",MAJOR,MINOR) ;
462
  fprintf(outf,"%d.%d",MAJOR,MINOR);
438
  outnl();
463
  outnl();
439
  outnl();
464
  outnl();
440
  outnl();
465
  outnl();
441
  outs("\t.SPACE  $TEXT$,SORT=8\n" );
466
  outs("\t.SPACE  $TEXT$,SORT=8\n");
442
  outs("\t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY,SORT=24\n" );
467
  outs("\t.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY,SORT=24\n");
443
  outnl();
468
  outnl();
444
  outs("\t.SPACE  $PRIVATE$,SORT=16\n");
469
  outs("\t.SPACE  $PRIVATE$,SORT=16\n");
445
  outs("\t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16\n\n");
470
  outs("\t.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31,SORT=16\n\n");
446
  outs("\t.IMPORT\t$$dyncall,CODE\n");
471
  outs("\t.IMPORT\t$$dyncall,CODE\n");
447
  if (do_profile)
472
  if (do_profile)
Line 455... Line 480...
455
  outs("\tldo\tR'TARGET(%r1),%r1\n");
480
  outs("\tldo\tR'TARGET(%r1),%r1\n");
456
  outs("\tbv\t0(%r1)\n");
481
  outs("\tbv\t0(%r1)\n");
457
  outs("\tnop\n");
482
  outs("\tnop\n");
458
  outnl();
483
  outnl();
459
#endif
484
#endif
460
 
485
 
461
  /* Begin diagnostics if necessary. */
486
  /* Begin diagnostics if necessary. */
462
  if ( diagnose )
487
  if (diagnose)
463
  {
488
  {
464
     outs("\t.CODE\n");
489
     outs("\t.CODE\n");
465
     outnl();
490
     outnl();
466
     init_stab_aux() ;
491
     init_stab_aux();
467
     outnl();
492
     outnl();
468
     outnl();
493
     outnl();
469
  }
494
  }
470
 
495
 
471
  setregalt(nowhere.answhere, 0);
496
  setregalt(nowhere.answhere, 0);
472
  nowhere.ashwhere.ashsize = 0;
497
  nowhere.ashwhere.ashsize = 0;
473
  nowhere.ashwhere.ashsize = 0;
498
  nowhere.ashwhere.ashsize = 0;
474
 
499
 
475
  if ( !diagnose )
500
  if (!diagnose)
476
     opt_all_exps();  /* optimise */
501
     opt_all_exps();  /* optimise */
477
  /* mark static unaliased; count procs */
502
  /* mark static unaliased; count procs */
478
  noprocs = 0;
503
  noprocs = 0;
479
  for (crt_def = top_def; crt_def != (dec *) 0; crt_def = crt_def->def_next)
504
  for (crt_def = top_def; crt_def != (dec *)0; crt_def = crt_def->def_next)
480
  {
505
  {
481
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
506
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
482
    exp scexp = son( crt_exp );
507
    exp scexp = son(crt_exp);
483
    if ( scexp != nilexp)
508
    if (scexp != nilexp)
484
    {
509
    {
485
      if ( !diagnose && !separate_units && 
510
      if (!diagnose && !separate_units &&
486
	  !crt_def->dec_u.dec_val.extnamed && isvar(crt_exp))
511
	  !crt_def->dec_u.dec_val.extnamed && isvar(crt_exp))
487
	mark_unaliased(crt_exp);
512
	mark_unaliased(crt_exp);
488
      if (name(scexp) == proc_tag || name(scexp)== general_proc_tag )
513
      if (name(scexp) == proc_tag || name(scexp) == general_proc_tag)
489
      {
514
      {
490
	noprocs++;
515
	noprocs++;
491
	if ( !strncmp("__I.TDF",crt_def->dec_u.dec_val.dec_id,7) )
516
	if (!strncmp("__I.TDF",crt_def->dec_u.dec_val.dec_id,7))
492
	{
517
	{
493
	   char *s;
518
	   char *s;
494
	   static char dyn = 0;
519
	   static char dyn = 0;
495
	   if (!dyn)
520
	   if (!dyn)
496
	   {
521
	   {
497
	      outs("\t.SPACE  $PRIVATE$,SORT=16\n");
522
	      outs("\t.SPACE  $PRIVATE$,SORT=16\n");
498
	      outs("\t.SUBSPA $DYNDATA$,QUAD=1,ALIGN=4,ACCESS=31,SORT=16\n");
523
	      outs("\t.SUBSPA $DYNDATA$,QUAD=1,ALIGN=4,ACCESS=31,SORT=16\n");
499
	      outnl();
524
	      outnl();
500
	      dyn = 1;
525
	      dyn = 1;
501
	   }
526
	   }
502
	   s = (char*) xcalloc(64,sizeof(char));
527
	   s = (char*)xcalloc(64,sizeof(char));
503
	   sprintf(s,"_GLOBAL_$I%d",capn);
528
	   sprintf(s,"_GLOBAL_$I%d",capn);
504
	   strcat(s,crt_def->dec_u.dec_val.dec_id+7);
529
	   strcat(s,crt_def->dec_u.dec_val.dec_id+7);
505
	   crt_def->dec_u.dec_val.dec_id = s;
530
	   crt_def->dec_u.dec_val.dec_id = s;
506
	   if (!gcc_assembler)
531
	   if (!gcc_assembler)
507
	      fprintf(outf,"\t.WORD\t%s\n",s);
532
	      fprintf(outf,"\t.WORD\t%s\n",s);
Line 510... Line 535...
510
    }
535
    }
511
  };
536
  };
512
  outnl();
537
  outnl();
513
 
538
 
514
  /* alloc memory */
539
  /* alloc memory */
515
  procrecs = (procrec *) xcalloc(noprocs, sizeof (procrec));
540
  procrecs = (procrec *)xcalloc(noprocs, sizeof(procrec));
516
 
541
 
517
  proc_def_trans_order = (dec**) xcalloc(noprocs, sizeof (dec*));
542
  proc_def_trans_order = (dec**)xcalloc(noprocs, sizeof(dec*));
518
  if ( xdb )
543
  if (xdb)
519
  {
544
  {
520
     src_line = (int*) xcalloc(noprocs,sizeof(int));
545
     src_line = (int*)xcalloc(noprocs,sizeof(int));
521
  }
546
  }
522
 
547
 
523
  /* number proc defs */
548
  /* number proc defs */
524
  procno = 0;
549
  procno = 0;
525
  for (crt_def = top_def; crt_def != (dec *) 0; crt_def = crt_def->def_next)
550
  for (crt_def = top_def; crt_def != (dec *)0; crt_def = crt_def->def_next)
526
  {
551
  {
527
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
552
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
528
 
553
 
529
    if (son(crt_exp) != nilexp && ( name(son(crt_exp)) == proc_tag ||
554
    if (son(crt_exp)!= nilexp && (name(son(crt_exp)) == proc_tag ||
530
				    name(son(crt_exp))== general_proc_tag ) )
555
				    name(son(crt_exp)) == general_proc_tag))
531
    {
556
    {
532
      procrec *pr = &procrecs[procno];
557
      procrec *pr = &procrecs[procno];
533
      proc_def_trans_order[procno] = crt_def; 
558
      proc_def_trans_order[procno] = crt_def;
534
      if (xdb)
559
      if (xdb)
535
      {
560
      {
536
	 /* Retrieve diagnostic info neccessary to comply with xdb's
561
	 /* Retrieve diagnostic info neccessary to comply with xdb's
537
	    requirement that procedures be compiled in source file order. */
562
	    requirement that procedures be compiled in source file order. */
538
	 diag_descriptor * dd =  crt_def -> dec_u.dec_val.diag_info;
563
	 diag_descriptor * dd =  crt_def -> dec_u.dec_val.diag_info;
539
	 if ( dd != (diag_descriptor*)0 )
564
	 if (dd != (diag_descriptor*)0)
540
	 {
565
	 {
541
	    sourcemark *sm = &dd -> data.id.whence;
566
	    sourcemark *sm = &dd -> data.id.whence;
542
	    src_line[procno] = sm->line_no.nat_val.small_nat; 
567
	    src_line[procno] = sm->line_no.nat_val.small_nat;
543
	 }
568
	 }
544
	 else
569
	 else
545
	    src_line[procno] = 0;
570
	    src_line[procno] = 0;
546
      }
571
      }
547
      pr->nameproc = bro(crt_exp);
572
      pr->nameproc = bro(crt_exp);
Line 555... Line 580...
555
   * space needs.
580
   * space needs.
556
   */
581
   */
557
 
582
 
558
  /*
583
  /*
559
   *      First work out which fixed point t-regs, i.e. those not preserved
584
   *      First work out which fixed point t-regs, i.e. those not preserved
560
   *  over calls, can be used. This needs to be done before scan() which 
585
   *  over calls, can be used. This needs to be done before scan() which
561
   *  adds idents so temp reg needs are within available temp reg set.
586
   *  adds idents so temp reg needs are within available temp reg set.
562
   *
587
   *
563
   */
588
   */
564
 
589
 
565
  /* initial reg sets */
590
  /* initial reg sets */
Line 587... Line 612...
587
  comment4("maxfix_tregs=%d(%#x) maxfloat_tregs=%d(%#x)",
612
  comment4("maxfix_tregs=%d(%#x) maxfloat_tregs=%d(%#x)",
588
	   maxfix_tregs, tempregs.fixed, MAXFLOAT_TREGS, tempregs.flt);
613
	   maxfix_tregs, tempregs.fixed, MAXFLOAT_TREGS, tempregs.flt);
589
 
614
 
590
  /* scan all the procs, to put everything in HP_PA form */
615
  /* scan all the procs, to put everything in HP_PA form */
591
  nexps = 0;
616
  nexps = 0;
592
  for (crt_def = top_def; crt_def != (dec *) 0; crt_def = crt_def->def_next)
617
  for (crt_def = top_def; crt_def != (dec *)0; crt_def = crt_def->def_next)
593
  {
618
  {
594
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
619
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
595
    if (son(crt_exp) != nilexp && ( name(son(crt_exp)) == proc_tag ||
620
    if (son(crt_exp)!= nilexp && (name(son(crt_exp)) == proc_tag ||
596
				    name(son(crt_exp))== general_proc_tag ) )
621
				    name(son(crt_exp)) == general_proc_tag))
597
    {
622
    {
598
      procrec *pr = &procrecs[no(son(crt_exp))];
623
      procrec *pr = &procrecs[no(son(crt_exp))];
599
      exp *st = &son(crt_exp);
624
      exp *st = &son(crt_exp);
600
      cpr = pr;
625
      cpr = pr;
601
      cpr->Has_ll = 0;
626
      cpr->Has_ll = 0;
Line 606... Line 631...
606
      pr->needsproc.builtin=builtin;
631
      pr->needsproc.builtin=builtin;
607
    }
632
    }
608
  }
633
  }
609
 
634
 
610
  /* calculate the break points for register allocation */
635
  /* calculate the break points for register allocation */
611
  for (crt_def = top_def; crt_def != (dec *) 0; crt_def = crt_def->def_next)
636
  for (crt_def = top_def; crt_def != (dec *)0; crt_def = crt_def->def_next)
612
  {
637
  {
613
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
638
    exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
614
 
639
 
615
    if (son(crt_exp) != nilexp && ( name(son(crt_exp)) == proc_tag ||
640
    if (son(crt_exp)!= nilexp && (name(son(crt_exp)) == proc_tag ||
616
				    name(son(crt_exp))== general_proc_tag ) )
641
				    name(son(crt_exp)) == general_proc_tag))
617
    {
642
    {
618
      procrec *pr = &procrecs[no(son(crt_exp))];
643
      procrec *pr = &procrecs[no(son(crt_exp))];
619
      needs * ndpr = & pr->needsproc;
644
      needs * ndpr = & pr->needsproc;
620
      long pprops = (ndpr->propsneeds);
645
      long pprops = (ndpr->propsneeds);
621
      bool leaf = (pprops & anyproccall) == 0;
646
      bool leaf = (pprops & anyproccall) == 0;
Line 629... Line 654...
629
 
654
 
630
      /* free s registers = GR3,GR4,..,GR18 */
655
      /* free s registers = GR3,GR4,..,GR18 */
631
      freefixed = 16;
656
      freefixed = 16;
632
 
657
 
633
      if (Has_fp) /* Has frame pointer */
658
      if (Has_fp) /* Has frame pointer */
634
      { 
659
      {
635
	 freefixed--;
660
	 freefixed--;
636
	 /* reserve GR3 as frame pointer (i.e. points to bottom of stack) */
661
	 /* reserve GR3 as frame pointer (i.e. points to bottom of stack) */
637
      }
662
      }
638
      if (Has_vsp) /* Has variable stack pointer */
663
      if (Has_vsp) /* Has variable stack pointer */
639
      { 
664
      {
640
	 freefixed--;
665
	 freefixed--;
641
	 /* reserve GR4 for use as copy of the original stack pointer */
666
	 /* reserve GR4 for use as copy of the original stack pointer */
642
      }
667
      }
643
      if (is_PIC_and_calls)
668
      if (is_PIC_and_calls)
644
      {
669
      {
Line 646... Line 671...
646
	 /* best reserve GR5 for use as a copy of GR19 */
671
	 /* best reserve GR5 for use as a copy of GR19 */
647
      }
672
      }
648
      if (Has_vcallees)
673
      if (Has_vcallees)
649
      {
674
      {
650
	 pr->callee_sz = 0; /*  Don't know callee_sz  */
675
	 pr->callee_sz = 0; /*  Don't know callee_sz  */
651
      }
676
      }
652
 
677
 
653
      real_reg[1] = GR4;
678
      real_reg[1] = GR4;
654
      real_reg[2] = GR5;
679
      real_reg[2] = GR5;
655
      if (Has_fp)
680
      if (Has_fp)
656
      {
681
      {
657
	 if (is_PIC_and_calls && !Has_vsp)
682
	 if (is_PIC_and_calls && !Has_vsp)
Line 663... Line 688...
663
	 {
688
	 {
664
	    if (is_PIC_and_calls)
689
	    if (is_PIC_and_calls)
665
	       real_reg[2] = GR3;
690
	       real_reg[2] = GR3;
666
	    else
691
	    else
667
	       real_reg[1] = GR3;
692
	       real_reg[1] = GR3;
668
	 }
693
	 }
669
	 else
694
	 else
670
	 if (is_PIC_and_calls)
695
	 if (is_PIC_and_calls)
671
	 {
696
	 {
672
	    real_reg[1] = GR3;
697
	    real_reg[1] = GR3;
673
	    real_reg[2] = GR4;
698
	    real_reg[2] = GR4;
674
	 }
699
	 }
675
      }
700
      }
676
 
701
 
677
      /* +++ create float s regs for leaf? */
702
      /* +++ create float s regs for leaf? */
678
      freefloat = 0;		/* none, always the same */
703
      freefloat = 0;		/* none, always the same */
679
      
704
 
680
      /* estimate usage of tags in body of proc */
705
      /* estimate usage of tags in body of proc */
681
      if (!No_S)
706
      if (!No_S)
682
	 w = weightsv(UNITWEIGHT, bro(son(son(crt_exp))));
707
	 w = weightsv(UNITWEIGHT, bro(son(son(crt_exp))));
683
 
708
 
684
      /* reg and stack allocation for tags */
709
      /* reg and stack allocation for tags */
Line 692... Line 717...
692
  }
717
  }
693
 
718
 
694
 
719
 
695
  /*  Set up main_globals and output global definitions. */
720
  /*  Set up main_globals and output global definitions. */
696
  i = 0;
721
  i = 0;
697
  for(crt_def=top_def; crt_def!=(dec*)0; crt_def=crt_def->def_next)
722
  for (crt_def=top_def; crt_def!= (dec*)0; crt_def=crt_def->def_next)
698
  {
723
  {
699
     i++;
724
     i++;
700
  }
725
  }
701
  main_globals_index = i;
726
  main_globals_index = i;
702
  main_globals = (dec**) xcalloc(main_globals_index,sizeof(dec*));
727
  main_globals = (dec**)xcalloc(main_globals_index,sizeof(dec*));
703
  i = 0;
728
  i = 0;
704
  for (crt_def = top_def; crt_def != (dec *) 0; crt_def = crt_def->def_next)
729
  for (crt_def = top_def; crt_def != (dec *)0; crt_def = crt_def->def_next)
705
  {
730
  {
706
     main_globals[i] = crt_def;
731
     main_globals[i] = crt_def;
707
     main_globals[i]->dec_u.dec_val.sym_number = i;
732
     main_globals[i] ->dec_u.dec_val.sym_number = i;
708
     i++;
733
     i++;
709
  }
734
  }
710
 
735
 
711
  for (crt_def = top_def; crt_def != (dec *) 0; crt_def = crt_def->def_next)
736
  for (crt_def = top_def; crt_def != (dec *)0; crt_def = crt_def->def_next)
712
  {
737
  {
713
     exp tg = crt_def->dec_u.dec_val.dec_exp;
738
     exp tg = crt_def->dec_u.dec_val.dec_exp;
714
     char *id = crt_def->dec_u.dec_val.dec_id;
739
     char *id = crt_def->dec_u.dec_val.dec_id;
715
     bool extnamed = (bool) crt_def->dec_u.dec_val.extnamed;
740
     bool extnamed = (bool)crt_def->dec_u.dec_val.extnamed;
716
     if ( son(tg)==nilexp && no(tg)!=0 && extnamed )
741
     if (son(tg) ==nilexp && no(tg)!=0 && extnamed)
717
     {
742
     {
718
	outs("\t.IMPORT\t");
743
	outs("\t.IMPORT\t");
719
	outs(id);
744
	outs(id);
720
	outs( name(sh(tg))==prokhd ? (isvar(tg) ? ",DATA\n" : ",CODE\n") : ",DATA\n" );
745
	outs(name(sh(tg)) ==prokhd ?(isvar(tg)? ",DATA\n" : ",CODE\n"): ",DATA\n");
721
     }
746
     }
722
     else
747
     else
723
     if ( son(tg) != nilexp && (extnamed || no(tg) != 0))
748
     if (son(tg)!= nilexp && (extnamed || no(tg)!= 0))
724
     {
749
     {
725
	if (name(son(tg)) != proc_tag && name(son(tg)) != general_proc_tag)
750
	if (name(son(tg))!= proc_tag && name(son(tg))!= general_proc_tag)
726
	{
751
	{
727
	   /* evaluate all outer level constants */
752
	   /* evaluate all outer level constants */
728
	   instore is;
753
	   instore is;
729
	   long symdef = crt_def->dec_u.dec_val.sym_number + 1;
754
	   long symdef = crt_def->dec_u.dec_val.sym_number + 1;
730
	   if ( isvar ( tg ) )
755
	   if (isvar(tg))
731
	      symdef = -symdef ;
756
	      symdef = -symdef;
732
	   if (extnamed && !(is_zero(son(tg))))
757
	   if (extnamed && !(is_zero(son(tg))))
733
	   {
758
	   {
734
     	      outs("\t.EXPORT\t");
759
     	      outs("\t.EXPORT\t");
735
	      outs(id ) ;
760
	      outs(id);
736
	      outs(",DATA\n"); 
761
	      outs(",DATA\n");
737
	   }
762
	   }
738
	   is = evaluated(son(tg),symdef);
763
	   is = evaluated(son(tg),symdef);
739
	   if (diagnose)
764
	   if (diagnose)
740
	   {
765
	   {
741
	      diag_def = crt_def ;
766
	      diag_def = crt_def;
742
	      stab_global(son(tg), id, extnamed);
767
	      stab_global(son(tg), id, extnamed);
743
	   }
768
	   }
744
 
769
 
745
	   if (is.adval)
770
	   if (is.adval)
746
	   {
771
	   {
747
	      setvar(tg);
772
	      setvar(tg);
748
	   }
773
	   }
749
	} 
774
	}
750
     }
775
     }
751
  }
776
  }
752
 
777
 
753
 
778
 
754
  /* Uninitialized data local to module. */
779
  /* Uninitialized data local to module. */
755
 
780
 
756
  for ( crt_def=top_def; crt_def != (dec *) 0; crt_def=crt_def->def_next )
781
  for (crt_def=top_def; crt_def != (dec *)0; crt_def=crt_def->def_next)
757
  {
782
  {
758
     exp tg = crt_def->dec_u.dec_val.dec_exp;
783
     exp tg = crt_def->dec_u.dec_val.dec_exp;
759
     char *id = crt_def->dec_u.dec_val.dec_id;
784
     char *id = crt_def->dec_u.dec_val.dec_id;
760
     bool extnamed = (bool) crt_def->dec_u.dec_val.extnamed;
785
     bool extnamed = (bool)crt_def->dec_u.dec_val.extnamed;
761
     if (son(tg) == nilexp && no(tg)!=0 && !extnamed )
786
     if (son(tg) == nilexp && no(tg)!=0 && !extnamed)
762
     {
787
     {
763
	shape s = crt_def->dec_u.dec_val.dec_shape;
788
	shape s = crt_def->dec_u.dec_val.dec_shape;
764
	ash a;
789
	ash a;
765
	long size;
790
	long size;
766
	int align;
791
	int align;
767
	a = ashof(s);
792
	a = ashof(s);
768
	size = (a.ashsize + 7) >> 3;
793
	size = (a.ashsize + 7) >> 3;
769
	align = ( ( a.ashalign > 32 || a.ashsize > 32 ) ? 8 : 4 ) ;
794
	align = ((a.ashalign > 32 || a.ashsize > 32)? 8 : 4);
770
	if (size>8)
795
	if (size>8)
771
	   insection( bss_section );
796
	   insection(bss_section);
772
	else
797
	else
773
	   insection( shortbss_section );
798
	   insection(shortbss_section);
774
	outs("\t.ALIGN\t");
799
	outs("\t.ALIGN\t");
775
	outn( align);
800
	outn(align);
776
	outs(id);
801
	outs(id);
777
	outs("\t.BLOCKZ\t");
802
	outs("\t.BLOCKZ\t");
778
	outn( size) ;
803
	outn(size);
779
     }
804
     }
780
  }
805
  }
781
 
806
 
782
  /* Translate the procedures. */
807
  /* Translate the procedures. */
783
 
808
 
Line 787... Line 812...
787
	 that they appear in the c source file.  */
812
	 that they appear in the c source file.  */
788
     int n,j;
813
     int n,j;
789
     for (n=0; n<noprocs; n++)
814
     for (n=0; n<noprocs; n++)
790
	for (j=n+1; j<noprocs; j++)
815
	for (j=n+1; j<noprocs; j++)
791
	{
816
	{
792
	   if ( src_line[n] > src_line[j] )
817
	   if (src_line[n] > src_line[j])
793
	   {
818
	   {
794
	      int srcl = src_line[n];
819
	      int srcl = src_line[n];
795
	      dec *pdef;
820
	      dec *pdef;
796
	      src_line[n] = src_line[j];
821
	      src_line[n] = src_line[j];
797
	      src_line[j] = srcl;
822
	      src_line[j] = srcl;
798
	      pdef = proc_def_trans_order[n];
823
	      pdef = proc_def_trans_order[n];
799
	      proc_def_trans_order[n] = proc_def_trans_order[j];
824
	      proc_def_trans_order[n] = proc_def_trans_order[j];
800
	      proc_def_trans_order[j] = pdef;
825
	      proc_def_trans_order[j] = pdef;
801
	      
826
 
802
	   }
827
	   }
803
	}
828
	}
804
   }
829
   }
805
   else
830
   else
806
   {
831
   {
807
#if TRANSLATE_GLOBALS_FIRST
832
#if TRANSLATE_GLOBALS_FIRST
808
      /*  Translate the global procedures first.  */  
833
      /*  Translate the global procedures first.  */
809
      int fstat = 0, lglob = noprocs-1;
834
      int fstat = 0, lglob = noprocs-1;
810
      while ( fstat<lglob )
835
      while (fstat<lglob)
811
      {
836
      {
812
	 while( fstat<noprocs && proc_def_trans_order[fstat]->dec_u.dec_val.extnamed )
837
	 while (fstat<noprocs && proc_def_trans_order[fstat] ->dec_u.dec_val.extnamed)
813
	    fstat++;
838
	    fstat++;
814
	 while( lglob>0 && !proc_def_trans_order[lglob]->dec_u.dec_val.extnamed )
839
	 while (lglob>0 && !proc_def_trans_order[lglob] ->dec_u.dec_val.extnamed)
815
	    lglob--;
840
	    lglob--;
816
	 if ( fstat<lglob )
841
	 if (fstat<lglob)
817
	 {
842
	 {
818
	    dec *pdef;
843
	    dec *pdef;
819
	    pdef = proc_def_trans_order[fstat];
844
	    pdef = proc_def_trans_order[fstat];
820
	    proc_def_trans_order[fstat] = proc_def_trans_order[lglob];
845
	    proc_def_trans_order[fstat] = proc_def_trans_order[lglob];
821
	    proc_def_trans_order[lglob] = pdef;
846
	    proc_def_trans_order[lglob] = pdef;
Line 824... Line 849...
824
	 }
849
	 }
825
      }
850
      }
826
#endif
851
#endif
827
   }
852
   }
828
 
853
 
829
  for( next_proc_def=0; next_proc_def < procno; next_proc_def++ )
854
  for (next_proc_def=0; next_proc_def < procno; next_proc_def++)
830
  {
855
  {
831
     exp tg, crt_exp;
856
     exp tg, crt_exp;
832
     char *id;
857
     char *id;
833
     bool extnamed;
858
     bool extnamed;
834
     procrec *pr;
859
     procrec *pr;
835
     crt_def = proc_def_trans_order[next_proc_def];
860
     crt_def = proc_def_trans_order[next_proc_def];
836
     tg = crt_def->dec_u.dec_val.dec_exp;
861
     tg = crt_def->dec_u.dec_val.dec_exp;
837
     id = crt_def->dec_u.dec_val.dec_id;
862
     id = crt_def->dec_u.dec_val.dec_id;
838
     extnamed = (bool) crt_def->dec_u.dec_val.extnamed;
863
     extnamed = (bool)crt_def->dec_u.dec_val.extnamed;
839
 
864
 
840
     if ( no(tg)!=0 || extnamed )
865
     if (no(tg)!=0 || extnamed)
841
     {
866
     {
842
	crt_exp = crt_def->dec_u.dec_val.dec_exp;
867
	crt_exp = crt_def->dec_u.dec_val.dec_exp;
843
	pr = & procrecs[no(son(crt_exp))];
868
	pr = & procrecs[no(son(crt_exp))];
844
	insection(text_section);    
869
	insection(text_section);
845
	outnl();
870
	outnl();
846
	outnl();
871
	outnl();
847
	if (diagnose)
872
	if (diagnose)
848
	{
873
	{
849
	   diag_def = crt_def ;
874
	   diag_def = crt_def;
850
	   stab_proc(son(tg), id, extnamed);
875
	   stab_proc(son(tg), id, extnamed);
851
	}
876
	}
852
	seed_label();		/* reset label sequence */
877
	seed_label();		/* reset label sequence */
853
	settempregs(son(tg));	/* reset getreg sequence */
878
	settempregs(son(tg));	/* reset getreg sequence */
854
 
879
 
855
	first = (labexp) malloc(sizeof(struct labexp_t));
880
	first = (labexp)malloc(sizeof(struct labexp_t));
856
	first->e = (exp) 0;
881
	first->e = (exp)0;
857
	first->next = (labexp) 0;
882
	first->next = (labexp)0;
858
	current = first;
883
	current = first;
859
 
884
 
860
	proc_name=id;
885
	proc_name=id;
861
	code_here(son(tg), tempregs, nowhere);
886
	code_here(son(tg), tempregs, nowhere);
862
 
887
 
863
	outs( "\t.PROCEND\n\t;" ) ;  
888
	outs("\t.PROCEND\n\t;");
864
	outs(id);
889
	outs(id);
865
	if (xdb)
890
	if (xdb)
866
	{
891
	{
867
#if _SYMTAB_INCLUDED
892
#if _SYMTAB_INCLUDED
868
	   close_function_scope(res_label);
893
	   close_function_scope(res_label);
869
	   outnl();
894
	   outnl();
870
	   outs("_" ) ;  
895
	   outs("_");
871
	   outs(id);
896
	   outs(id);
872
	   outs("_end_" ) ;  
897
	   outs("_end_");
873
#endif
898
#endif
874
	}
899
	}
875
	outnl();
900
	outnl();
876
	outnl();
901
	outnl();
877
	if (extnamed)
902
	if (extnamed)
Line 882... Line 907...
882
	   outs(export);
907
	   outs(export);
883
	   outnl();
908
	   outnl();
884
	   outnl();
909
	   outnl();
885
	   outnl();
910
	   outnl();
886
	}
911
	}
887
	if ( first->next != (labexp)0 )
912
	if (first->next != (labexp)0)
888
	{ 
913
	{
889
	   exp e,z;
914
	   exp e,z;
890
	   labexp p,next;
915
	   labexp p,next;
891
	   ash a;
916
	   ash a;
892
	   int lab,byte_size;
917
	   int lab,byte_size;
893
	   outs("\n\n");
918
	   outs("\n\n");
Line 897... Line 922...
897
	      e = next->e;
922
	      e = next->e;
898
	      z = e;
923
	      z = e;
899
	      a = ashof(sh(e));
924
	      a = ashof(sh(e));
900
	      lab = next->lab;
925
	      lab = next->lab;
901
	      if (is_zero(e))
926
	      if (is_zero(e))
902
	      {
927
	      {
903
		 byte_size = (a.ashsize+7) >> 3;
928
		 byte_size = (a.ashsize+7) >> 3;
904
		 if (byte_size>8)
929
		 if (byte_size>8)
905
		    insection(bss_section);
930
		    insection(bss_section);
906
		 else
931
		 else
907
		    insection(shortbss_section);
932
		    insection(shortbss_section);
908
		 if (a.ashalign > 32 || a.ashsize > 32 )
933
		 if (a.ashalign > 32 || a.ashsize > 32)
909
		    set_align(64);
934
		    set_align(64);
910
		 else
935
		 else
911
		    set_align(32);
936
		    set_align(32);
912
		 outs( ext_name(lab) );
937
		 outs(ext_name(lab));
913
		 outs("\t.BLOCK\t");
938
		 outs("\t.BLOCK\t");
914
		 outn(byte_size);
939
		 outn(byte_size);
915
		 outnl();
940
		 outnl();
916
	      }
941
	      }
917
	      else
942
	      else
918
	      {
943
	      {
919
		 insection(data_section);
944
		 insection(data_section);
920
		 if (a.ashalign > 32 || a.ashsize > 32 )
945
		 if (a.ashalign > 32 || a.ashsize > 32)
921
		    set_align(64);
946
		    set_align(64);
922
		 else
947
		 else
923
		    set_align(32);
948
		    set_align(32);
924
		 outs( ext_name(lab) );
949
		 outs(ext_name(lab));
925
		 outnl();
950
		 outnl();
926
		 evalone(z,0);
951
		 evalone(z,0);
927
		 if (a.ashalign>32)
952
		 if (a.ashalign>32)
928
		    set_align(64);
953
		    set_align(64);
929
	      }
954
	      }
Line 940... Line 965...
940
	   while (next!=0);
965
	   while (next!=0);
941
	   outs("\t.CODE\n\n\n");
966
	   outs("\t.CODE\n\n\n");
942
	}
967
	}
943
	else
968
	else
944
	   free(first);
969
	   free(first);
945
     } 
970
     }
946
  }
971
  }
947
 
972
 
948
  return;
973
  return;
949
}
974
}
950
 
975
 
951
void translate_tagdef 
976
void translate_tagdef
952
    PROTO_Z ()
977
(void)
953
{
978
{
954
  return;
979
  return;
955
}
980
}
956
 
981
 
957
void translate_unit 
982
void translate_unit
958
    PROTO_Z ()
983
(void)
959
{
984
{
960
  if (separate_units)
985
  if (separate_units)
961
  {
986
  {
962
    dec *crt_def;
987
    dec *crt_def;
963
 
988
 
964
    translate_capsule();
989
    translate_capsule();
965
    crt_def = top_def;
990
    crt_def = top_def;
966
    while (crt_def != (dec *) 0)
991
    while (crt_def != (dec *)0)
967
    {
992
    {
968
      exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
993
      exp crt_exp = crt_def->dec_u.dec_val.dec_exp;
969
 
994
 
970
      no(crt_exp) = 0;
995
      no(crt_exp) = 0;
971
      pt(crt_exp) = nilexp;
996
      pt(crt_exp) = nilexp;
Line 976... Line 1001...
976
  };
1001
  };
977
  return;
1002
  return;
978
}
1003
}
979
 
1004
 
980
 
1005
 
981
 
1006
 
982
/*
1007
/*
983
    EXIT TRANSLATOR
1008
    EXIT TRANSLATOR
984
*/
1009
*/
985
 
1010
 
986
void exit_translator
1011
void exit_translator
987
    PROTO_Z ()
1012
(void)
988
{
1013
{
989
    outnl();
1014
    outnl();
990
    outnl();
1015
    outnl();
991
    outnl();
1016
    outnl();
992
    outnl();
1017
    outnl();
Line 1003... Line 1028...
1003
       outnl();
1028
       outnl();
1004
       outnl();
1029
       outnl();
1005
#endif
1030
#endif
1006
    }
1031
    }
1007
    outs("\t.END\n");
1032
    outs("\t.END\n");
1008
    return ;
1033
    return;
1009
}
1034
}
1010
 
1035
 
1011
 
1036
 
1012
 
1037
 
1013
 
1038