ack/util/ceg/ce_back/obj_back/misc.c
1987-11-20 10:41:03 +00:00

40 lines
847 B
C

#include <system.h>
#include "mach.h"
#include "back.h"
/* The following functions are called from reloc1(), reloc2(), reloc4(),
dump_label().
*/
align_word()
{
switch ( cur_seg) {
case SEGTXT : return;
case SEGCON : while ( (data - data_area) % EM_WSIZE != 0)
con1( '\0');
return;
case SEGROM : while ( (data - data_area) % EM_WSIZE != 0)
rom1( '\0');
return;
case SEGBSS : while ( nbss % EM_WSIZE != 0)
nbss++;
return;
default : fprint( STDERR, "align_word() : unknown seg\n");
return;
}
}
long cur_value()
{
switch( cur_seg) {
case SEGTXT: return text - text_area;
case SEGCON: return data - data_area;
case SEGROM: return data - data_area;
case SEGBSS: return nbss;
default : fprint( STDERR, "cur_value() : unknown seg\n");
return -1L;
}
}