ack/util/ceg/defaults/storage/C_hol_dnam.c

56 lines
937 B
C
Raw Normal View History

#define CODE_EXPANDER
1987-11-20 10:41:03 +00:00
#include <em.h>
#include "mach.h"
#include "back.h"
#if EM_WSIZE == 1
#define conEM_WSIZE con1
#define romEM_WSIZE rom1
#define CAST_WSIZE ONE_BYTE
#endif
#if EM_WSIZE == 2
#define conEM_WSIZE con2
#define romEM_WSIZE rom2
#define CAST_WSIZE TWO_BYTES
#endif
#if EM_WSIZE == 4
#define conEM_WSIZE con4
#define romEM_WSIZE rom4
#define CAST_WSIZE FOUR_BYTES
#endif
#if EM_PSIZE == 1
#define relocEM_PSIZE reloc1
#endif
#if EM_PSIZE == 2
#define relocEM_PSIZE reloc2
#endif
#if EM_PSIZE == 4
#define relocEM_PSIZE reloc4
#endif
1989-01-26 13:39:03 +00:00
extern int B_holno;
1993-11-10 15:07:12 +00:00
void
1987-11-20 10:41:03 +00:00
C_hol_dnam( n, s, offs, i)
arith n, offs;
char *s;
int i;
{
if ( i == 0) {
switchseg( SEGBSS);
align_word();
1989-01-26 13:39:03 +00:00
symbol_definition( extnd_hol( ++B_holno));
1987-11-20 10:41:03 +00:00
bss( n);
}
else {
switchseg( SEGCON);
align_word();
1989-01-26 13:39:03 +00:00
symbol_definition( extnd_hol( ++B_holno));
1987-11-20 10:41:03 +00:00
for ( i = 0; i < n/EM_PSIZE; i++)
relocEM_PSIZE( extnd_dnam( s), offs, ABSOLUTE);
}
}