summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5f6a389)
SCCS-vsn: usr.bin/pascal/src/p2put.c 1.10
SCCS-vsn: usr.bin/pascal/src/stab.c 1.7
SCCS-vsn: usr.bin/pascal/src/lookup.c 1.2
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)lookup.c 1.1 %G%";
+static char sccsid[] = "@(#)lookup.c 1.2 %G%";
#include "whoami.h"
#include "0.h"
#include "whoami.h"
#include "0.h"
+struct nl *disptab[077+1];
+
/*
* Lookup is called to
* find a symbol in the
/*
* Lookup is called to
* find a symbol in the
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)p2put.c 1.9 %G%";
+static char sccsid[] = "@(#)p2put.c 1.10 %G%";
/*
* functions to help pi put out
/*
* functions to help pi put out
* special cases for registers and for named globals,
* whose names are their rvalues.
*/
* special cases for registers and for named globals,
* whose names are their rvalues.
*/
-putRV( name , level , offset , extra_flags , type )
+putRV( name , level , offset , other_flags , type )
char *name;
int level;
int offset;
char *name;
int level;
int offset;
int type;
{
char extname[ BUFSIZ ];
int type;
{
char extname[ BUFSIZ ];
- if ( extra_flags & NREGVAR ) {
+ if ( other_flags & NREGVAR ) {
if ( ( offset < 0 ) || ( offset > P2FP ) ) {
panic( "putRV regvar" );
}
putleaf( P2REG , 0 , offset , type , 0 );
return;
}
if ( ( offset < 0 ) || ( offset > P2FP ) ) {
panic( "putRV regvar" );
}
putleaf( P2REG , 0 , offset , type , 0 );
return;
}
- if ( whereis( level , offset , extra_flags ) == GLOBALVAR ) {
+ if ( whereis( level , offset , other_flags ) == GLOBALVAR ) {
if ( name != 0 ) {
if ( name[0] != '_' ) {
sprintf( extname , EXTFORMAT , name );
if ( name != 0 ) {
if ( name[0] != '_' ) {
sprintf( extname , EXTFORMAT , name );
panic( "putRV no name" );
}
}
panic( "putRV no name" );
}
}
- putLV( name , level , offset , extra_flags , type );
+ putLV( name , level , offset , other_flags , type );
putop( P2UNARY P2MUL , type );
}
putop( P2UNARY P2MUL , type );
}
* special case for
* named globals, whose lvalues are just their names as constants.
*/
* special case for
* named globals, whose lvalues are just their names as constants.
*/
-putLV( name , level , offset , extra_flags , type )
+putLV( name , level , offset , other_flags , type )
char *name;
int level;
int offset;
char *name;
int level;
int offset;
int type;
{
char extname[ BUFSIZ ];
int type;
{
char extname[ BUFSIZ ];
- if ( extra_flags & NREGVAR ) {
+ if ( other_flags & NREGVAR ) {
panic( "putLV regvar" );
}
panic( "putLV regvar" );
}
- switch ( whereis( level , offset , extra_flags ) ) {
+ switch ( whereis( level , offset , other_flags ) ) {
case GLOBALVAR:
if ( ( name != 0 ) ) {
if ( name[0] != '_' ) {
case GLOBALVAR:
if ( ( name != 0 ) ) {
if ( name[0] != '_' ) {
* the constant is declared in aligned data space
* and a P2NAME leaf put out for it
*/
* the constant is declared in aligned data space
* and a P2NAME leaf put out for it
*/
-putCON8( value )
- double value;
+putCON8( val )
+ double val;
{
int label;
char name[ BUFSIZ ];
{
int label;
char name[ BUFSIZ ];
putprintf( " .align 2" , 0 );
label = getlab();
putlab( label );
putprintf( " .align 2" , 0 );
label = getlab();
putlab( label );
- putprintf( " .double 0d%.20e" , 0 , value );
+ putprintf( " .double 0d%.20e" , 0 , val );
putprintf( " .text" , 0 );
sprintf( name , PREFIXFORMAT , LABELPREFIX , label );
putleaf( P2NAME , 0 , 0 , P2DOUBLE , name );
putprintf( " .text" , 0 );
sprintf( name , PREFIXFORMAT , LABELPREFIX , label );
putleaf( P2NAME , 0 , 0 , P2DOUBLE , name );
/* Copyright (c) 1980 Regents of the University of California */
/* Copyright (c) 1980 Regents of the University of California */
-static char sccsid[] = "@(#)stab.c 1.6 %G%";
+static char sccsid[] = "@(#)stab.c 1.7 %G%";
/*
* procedures to put out sdb symbol table information.
/*
* procedures to put out sdb symbol table information.
-stabfunc( name , class , line , level )
+stabfunc( name , typeclass , line , level )
* for separate compilation
*/
if ( level == 1 ) {
* for separate compilation
*/
if ( level == 1 ) {
+ if ( typeclass == FUNC ) {
putprintf( " .stabs \"%s\",0x%x,0,0x%x,0x%x" , 0
, name , N_PC , N_PGFUNC , ABS( line ) );
putprintf( " .stabs \"%s\",0x%x,0,0x%x,0x%x" , 0
, name , N_PC , N_PGFUNC , ABS( line ) );
- } else if ( class == PROC ) {
+ } else if ( typeclass == PROC ) {
putprintf( " .stabs \"%s\",0x%x,0,0x%x,0x%x" , 0
, name , N_PC , N_PGPROC , ABS( line ) );
}
putprintf( " .stabs \"%s\",0x%x,0,0x%x,0x%x" , 0
, name , N_PC , N_PGPROC , ABS( line ) );
}
/*
* external functions and procedures
*/
/*
* external functions and procedures
*/
-stabefunc( name , class , line )
+stabefunc( name , typeclass , line )
+ if ( typeclass == FUNC ) {
- } else if ( class == PROC ) {
+ } else if ( typeclass == PROC ) {
type = N_PEPROC;
} else {
return;
type = N_PEPROC;
} else {
return;