1 
  2 /*  Input structures for cobol_addr                            */
  3 
  4 declare 1 oprnd_z aligned static,
  5           2 type fixed bin aligned init(1),
  6           2 operand_no fixed bin aligned init(0),
  7           2 lock fixed bin aligned init(0),
  8           2 segno fixed bin aligned,
  9           2 char_offset fixed bin(24) aligned,
 10           2 send_receive fixed bin aligned init(0);
 11 
 12 /*
 13 type         indicates type of addressing requested.  Type 1
 14              indicates basic; i.e., data to be addressed is
 15              specified by segno and char_offset.
 16 
 17 operand_no   not applicable to type 1.
 18 
 19 lock         indicates lock requirements for registers used in
 20              addressing;
 21                0 - do not lock registers used.
 22                1 - lock registers used.
 23 
 24 segno        is the compiler designation of the segment in which
 25              the data to be addressed is located.
 26 
 27 char_offset  is the character offset within segno of the data to
 28              be addressed.
 29 
 30 send_receive indicates whether the data being addressed is a
 31              sending or receiving field for the instruction whose
 32              address field is being set; 0 indicates sending.
 33                                                                */
 34 
 35 
 36 declare 1 input_struc aligned static,
 37           2 type fixed bin aligned init(4),
 38           2 operand_no fixed bin aligned init(1),
 39           2 lock fixed bin aligned init(0),
 40           2 operand,
 41             3 token_ptr ptr aligned init(null),
 42             3 send_receive fixed bin aligned init(0),
 43             3 ic_mod fixed  bin aligned,
 44             3 size_sw fixed  bin aligned init(0);
 45 
 46 /*
 47 type         indicates type of addressing requested.
 48                     1  -  no operand, 1 wd, basic
 49                     2  -  1 operand, 1 wd, non-EIS
 50                     3  -  1 operand, 1 wd, EIS
 51                     4  -  1 operand, 1 desc, 2wd, EIS
 52                     5  -  2 operands, 2 desc, 3 wd, EIS
 53                     6  -  3 operands, 3 desc, 4 wd, EIS
 54 
 55 operand_no   number of operands associated with requested type.
 56 
 57 lock         indicates lock requirements for registers used in
 58              addressing.
 59                     0  -  do not lock registers used
 60                     1  -  lock registers used
 61                     2  -  unlock all registers
 62 
 63 token_ptr    is a pointer to the operand token.
 64 
 65 send_receive indicates whether the operand being addressed is a
 66              sending or receiving field for the instruction.
 67                     0  -  sending operand
 68                     1  -  receiving operand
 69 
 70 ic_mod       indicates whether ic modification is specified in
 71              the mf field of this operand (set by cobol_addr).
 72                     0  -  no ic modification
 73                     1  -  ic modification
 74 
 75 size_sw      indicates size (length) handlhlng requirements to
 76              cobol_addr.
 77                     0  -  cobol_addr may store the operand size in a
 78                           register or in the instruction
 79                     1  -  cobol_addr need not be concerned with size
 80                                                                */
 81 
 82 /*  Error message structure.                                   */
 83 
 84 declare 1 oprnd_ovfl static aligned,
 85           2 gen_name char(32) init("cobol_call_gen"),
 86           2 message_len fixed bin aligned init(26),
 87           2 message char(26) aligned init
 88             ("USING operands exceed 127!");
 89 
 90 /*  Code and relocation sequences.                             */
 91 
 92 dcl inst_seq_1a(4) bit(18) unaligned static init
 93      ("000000000000000000"b, "011101010001000000"b,    /* epp2   oprnd_z        */
 94       "110000000000000000"b, "010101010001000000"b);   /* spri2  pr6|N+2z       */
 95 
 96 dcl inst_seq_1b(6) bit(18) unaligned static init
 97      ("110000000000011010"b, "011101001101010000"b,    /* epp1   pr6|26,*       */
 98       "001000000000000000"b, "011101010001010000"b,    /* epp2   pr1|2y,*       */
 99       "110000000000000000"b, "010101010001000000"b);   /* spri2  pr6|N+2z       */
100 
101 dcl inst_seq_2(2) bit(36) aligned static init
102      ("000000000000000000011101010000000100"b,         /* epp2   desc_z,ic      */
103       "110000000000000000010101010001000000"b);        /* spri2  pr6|N+2zt+2z   */
104 
105 dcl ch_desc bit(36) ;
106 
107 dcl inst_seq_3a(8) bit(18) unaligned static init
108      ("110000000000000000"b, "110010001001000000"b,    /* eax1   pr6|N          */
109       "000000000000000000"b, "100011001000000111"b,    /* fld    2**11zt,dl     */
110       "100000000000000000"b, "011101010001010000"b,    /* epp2   pr4|ep_l,*     */
111       "000000000000000101"b, "111000000001000000"b);   /* tsx0   pr0|5          */
112 
113 dcl inst_seq_3b(8) bit(18) unaligned static init
114      ("110000000000101110"b, "110010001001000000"b,    /* eax1   pr6|46         */
115       "000000000000000000"b, "100011001000000111"b,    /* fld    0,dl           */
116       "100000000000000000"b, "011101010001010000"b,    /* epp2   pr4|ep_l,*     */
117       "000000000000000110"b, "111000000001000000"b);   /* tsx0   pr0|6          */
118 
119 dcl inst_seq_3rel(8) bit(5) aligned static init
120      ("00000"b, "00000"b,
121       "00000"b, "00000"b,
122       "10100"b, "00000"b,
123       "00000"b, "00000"b);
124 
125 dcl inst_seq_1_1(26) bit(18) unaligned static init
126      ("000000000000000000"b, "011101010000010100"b,   /* epp2   n_relp,ic*    */
127       "110000000001000110"b, "010101010001000000"b,   /* spri2  pr6|M+2       */
128       "110000000001000110"b, "011101010001000000"b,   /* epp2   pr6|M+2       */
129       "110000000001001110"b, "010101010001000000"b,   /* spri2  pr6|M+10      */
130       "110000000001000100"b, "011101010001000000"b,   /* epp2   pr6|M         */
131       "110000000001010100"b, "010101010001000000"b,   /* spri2  pr6|M+16      */
132       "110000000000101000"b, "011101010001000000"b,   /* epp2   pr6|40       */
133       "110000000001010110"b, "010101010001000000"b,   /* spri2  pr6|M+18      */
134       "000000000000000000"b, "011101010000000100"b,   /* epp2   ptr_d_relp,ic */
135       "110000000001001010"b, "010101010001000000"b,   /* spri2  pr6|M+20      */
136       "110000000001010000"b, "010101010001000000"b,   /* spri2  pr6|M+26      */
137       "000000000000000000"b, "011101010000000100"b,   /* epp2   fb_d_relp,ic  */
138       "110000000001010010"b, "010101010001000000"b);  /* spri2  pr6|M+28      */
139 
140 dcl inst_seq_1_3(60) bit(18) unaligned static init
141      ("000000000000000011"b, "001010100101000000"b,   /* scm   (pr),(du),mask(0) */
142       "010000000000000000"b, "000000000000000000"b,   /* adsc9  pr2|0            */
143       "000100100000000000"b, "000000000000000000"b,   /* vfd    o9/044,27/0      */
144       "110000000001001001"b, "000000000001000000"b,   /* arg    pr6|M+5          */
145       "000000000000010000"b, "110000110100000100"b,   /* ttn    16,ic            */
146       "110000000001001001"b, "010011101001000000"b,   /* lda    pr6|M+5          */
147       "101010110000000000"b, "010111101000000011"b,   /* ora    174080,du        */
148       "110000000001001010"b, "111101101001000000"b,   /* sta    pr6|M+6          */
149       "110000000001001001"b, "010011101001000000"b,   /* lda    pr6|M+5          */
150       "000000000000000001"b, "000111101000000111"b,   /* ada    1,dl             */
151       "010000000000000000"b, "101000000101000101"b,   /* a9bd   pr2|0,a          */
152       "110000000001010010"b, "010101010001000000"b,   /* spri2  pr6|M+14         */
153       "000000000000000000"b, "101011001000000000"b,   /* neg                     */
154       "000000000000000000"b, "000111101000000000"b,   /* ada    0                */
155       "101010110000000000"b, "010111101000000011"b,   /* ora    174080,du        */
156       "110000000001001011"b, "111101101001000000"b,   /* sta    pr6|M+7          */
157       "110000000001001010"b, "011101010001000000"b,   /* epp2   pr6|M+6          */
158       "110000000001011010"b, "010101010001000000"b,   /* spri2  pr6|M+22         */
159       "110000000001001011"b, "011101010001000000"b,   /* epp2   pr6|M+7          */
160       "000000000000000111"b, "111001000000000100"b,   /* tra    7,ic             */
161       "110000000001010010"b, "010101010001000000"b,   /* spri2  pr6|M+14         */
162       "000000000000000000"b, "010011101000000000"b,   /* lda    0                */
163       "101010110000000000"b, "010111101000000011"b,   /* ora    174080,du        */
164       "110000000001001010"b, "111101101001000000"b,   /* sta    pr6|M+6          */
165       "110000000001001010"b, "011101010001000000"b,   /* epp2   pr6|M+6          */
166       "110000000001011010"b, "010101010001000000"b,   /* spri2  pr6|M+22         */
167       "110000000001011100"b, "010101010001000000"b,   /* spri2  pr6|M+24         */
168       "110000000001001100"b, "110010001001000000"b,   /* eax1   pr6|M+8          */
169       "000010100000000000"b, "100011001000000111"b,   /* fld    10240,dl         */
170       "100000000000000000"b, "011101010001010000"b);  /* epp2   pr4|0,*          */
171 
172 dcl rel_seq_1_3(62) bit(5) aligned static init
173      ("00000"b, "00000"b,
174       "00000"b, "00000"b,
175       "00000"b, "00000"b,
176       "00000"b, "00000"b,
177       "00000"b, "00000"b,
178       "00000"b, "00000"b,
179       "00000"b, "00000"b,
180       "00000"b, "00000"b,
181       "00000"b, "00000"b,
182       "00000"b, "00000"b,
183       "00000"b, "00000"b,
184       "00000"b, "00000"b,
185       "00000"b, "00000"b,
186       "00000"b, "00000"b,
187       "00000"b, "00000"b,
188       "00000"b, "00000"b,
189       "00000"b, "00000"b,
190       "00000"b, "00000"b,
191       "00000"b, "00000"b,
192       "00000"b, "00000"b,
193       "00000"b, "00000"b,
194       "00000"b, "00000"b,
195       "00000"b, "00000"b,
196       "00000"b, "00000"b,
197       "00000"b, "00000"b,
198       "00000"b, "00000"b,
199       "00000"b, "00000"b,
200       "00000"b, "00000"b,
201       "00000"b, "00000"b,
202       "10100"b, "00000"b,
203       "00000"b, "00000"b);
204 
205 dcl inst_seq_2_0(6) bit(18) unaligned static init
206      ("110000000000101000"b, "010011101001000000"b,   /* lda    pr6|40           */
207       "000000000000000000"b, "110000000000000100"b,   /* tze    0,ic             */
208       "000000000000000000"b, "111001000000000100"b);  /* tra    0,ic             */
209 
210 dcl var_inst        (4) bit(18) unaligned static init(
211           "101010110000000000"b, "010111101000000011"b,     /* ora    526000,du */
212           "110000000000000000"b, "111101101001000000"b);    /* sta    pr6|var_stack       */
213           /* fixup directive for link, used when profile options is specified.  */
214 dcl       1 fixup_directive   aligned static,
215            2 operation bit(1) unal init("0"b),
216            2 type bit(4) unal init("1111"b),
217            2 reserved bit(9) unal init("000000000"b),
218            2 location unal,
219             3 half bit(1) unal init("0"b),
220             3 base bit(3) unal init("001"b),
221             3 offset fixed bin unal,
222            2 tag_number fixed bin aligned;
223 
224 /*
225 P^H__^Hr_^Ho_^Hc_^He_^Hd_^Hu_^Hr_^He_^Hs_C^H__^Ha_^Hl_^Hl_^He_^Hd:^H_
226                                                                */
227 
228 dcl cobol_addr entry (ptr, ptr, ptr),
229     cobol_make_fixup entry(ptr),
230     cobol_make_type9$type2_3 entry(ptr,ptr),
231     cobol_alloc$stack entry (fixed bin, fixed bin, fixed bin),
232     cobol_arg_descriptor entry (bit(36), bit(36), fixed bin),
233     cobol_arg_descriptor$type9 entry (ptr, bit(36), fixed bin),
234     cobol_get_size entry (ptr,fixed bin,fixed bin),
235     cobol_define_tag_nc entry (fixed bin, fixed bin),
236     cobol_define_tag entry(fixed bin),
237     cobol_emit entry (ptr, ptr, fixed bin),
238     cobol_make_link$type_4 entry (fixed bin, char(*)),
239     cobol_make_tagref entry (fixed bin, fixed bin, ptr),
240     cobol_pointer_register$call entry,
241     cobol_pointer_register$get entry (ptr),
242     cobol_pool entry (char(*), fixed bin, fixed bin),
243     cobol_gen_error entry (fixed bin, fixed bin),
244     cobol_call_op entry(fixed bin,fixed bin),
245     cobol_reg_manager$after_op entry(fixed bin),
246     signal_ entry (char(*), ptr, ptr);
247 
248 /*
249 B^H__^Hu_^Hi_^Hl_^Ht-^H__^Hi_^Hn_F^H__^Hu_^Hn_^Hc_^Ht_^Hi_^Ho_^Hn_^Hs_U^H__^Hs_^He_^Hd:^H_
250                                                                */
251 
252 dcl addr builtin,
253     binary builtin,
254     null builtin,
255     substr builtin,
256     unspec builtin;
257 
258 
259 %include cobol_;
260 %include cobol_type3;
261 %include cobol_type9;
262 %include cobol_type19;
263 %include cobol_in_token;
264 %include cobol_fixed_common;
265 %include cobol_ext_;