ack/util/ass/ass40.c

50 lines
1 KiB
C
Raw Normal View History

1984-07-02 15:35:56 +00:00
/*
1987-03-10 01:26:51 +00:00
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
1984-07-02 15:35:56 +00:00
*
*/
#include "ass00.h"
#include "assex.h"
1984-11-08 12:08:31 +00:00
#ifndef NORCSID
static char rcs_id[] = "$Header$" ;
#endif
1984-07-02 15:35:56 +00:00
/*
** Make scans to do final assignment of instruction sizes & formats
** to those not already done. assign final values to labels
*/
pass_4()
{
register line_t *lnp;
register locl_t *lbp;
int min_l, max_l;
int instr;
pass = 4;
prog_size= 0 ;
for (lnp = pstate.s_fline ; lnp ; lnp= lnp->l_next, line_num++) {
instr = ctrunc(lnp->instr_num);
if ( instr==sp_fpseu ) {
line_num = lnp->ad.ad_ln.ln_first ;
continue ;
}
if ( instr==sp_ilb1 ) {
lbp = lnp->ad.ad_lp;
lbp->l_min= prog_size; lbp->l_defined = YES;
continue ;
}
if (lnp->opoff == NO_OFF)
{
determine_props(lnp, &min_l, &max_l);
if (min_l != max_l)
fatal("no size known");
} else {
min_l = oplength(*(lnp->opoff)) ;
}
prog_size += min_l ;
}
}