Pristine Ack-5.5
[Ack-5.5.git] / util / ceg / defaults / storage / C_hol_ilb.c
1 #define CODE_EXPANDER
2 #include <em.h>
3 #include "mach.h"
4 #include "back.h"
5
6 #if EM_WSIZE == 1
7 #define conEM_WSIZE     con1
8 #define romEM_WSIZE     rom1
9 #define CAST_WSIZE      ONE_BYTE
10 #endif
11 #if EM_WSIZE == 2
12 #define conEM_WSIZE     con2
13 #define romEM_WSIZE     rom2
14 #define CAST_WSIZE      TWO_BYTES
15 #endif
16 #if EM_WSIZE == 4
17 #define conEM_WSIZE     con4
18 #define romEM_WSIZE     rom4
19 #define CAST_WSIZE      FOUR_BYTES
20 #endif
21
22 #if EM_PSIZE == 1
23 #define relocEM_PSIZE   reloc1
24 #endif
25 #if EM_PSIZE == 2
26 #define relocEM_PSIZE   reloc2
27 #endif
28 #if EM_PSIZE == 4
29 #define relocEM_PSIZE   reloc4
30 #endif
31
32 extern int B_holno, B_procno;
33
34 void
35 C_hol_ilb( n, l, i)
36 arith n;
37 label l;
38 int i;
39 {
40         if ( i == 0) {
41                 switchseg( SEGBSS);
42                 align_word();
43                 symbol_definition( extnd_hol( ++B_holno));
44
45                 bss( n);
46         }
47         else {  
48                 switchseg( SEGCON);
49                 align_word();
50                 symbol_definition( extnd_hol( ++B_holno));
51
52                 for ( i = 0; i < n/EM_PSIZE; i++)
53                         relocEM_PSIZE( extnd_ilb( l, B_procno), 0, ABSOLUTE);
54          }
55 }