1 /* BEGIN INCLUDE FILE ... op_codes.incl.pl1 */
  2 
  3 /* Modified: 25 Apr 1979 by PCK 4-bit decimal */
  4 /* Modified: 6 Jun 1979 by PG to add rank and byte */
  5 /* Modified: 26 Dec 1979 by PCK to add assign_by_name */
  6 /* Modified: 26 July 82 BIM wordno, segno */
  7 
  8 dcl (     add                 initial("000010001"b),        /* opnd(1) <- opnd(2)+opnd(3)           */
  9           sub                 initial("000010010"b),        /* opnd(1) <- opnd(2)-opnd(3)           */
 10           mult                initial("000010011"b),        /* opnd(1) <- opnd(2)*opnd(3)           */
 11           div                 initial("000010100"b),        /* opnd(1) <- opnd(2)/opnd(3)           */
 12           negate              initial("000010101"b),        /* opnd(1) <- -opnd(2)                  */
 13           exp                 initial("000010110"b),        /* opnd(1) <- opnd(2) ** opnd(3)        */
 14 
 15           and_bits            initial("000100001"b),        /* opnd(1) <- opnd(2) & opnd(3)         */
 16           or_bits             initial("000100010"b),        /* opnd(1) <- opnd(2)|opnd(3)           */
 17           xor_bits            initial("000100011"b),        /* opnd(1) <- opnd(2) xor opnd(3)       */
 18           not_bits            initial("000100100"b),        /* opnd(1) <- ^opnd(2)                  */
 19           cat_string          initial("000100101"b),        /* opnd(1) <- opnd(2)||opnd(3)          */
 20           bool_fun            initial("000100110"b),        /* opnd(1) <- bool(opnd(2),opnd(3),opnd(4)) */
 21 
 22           assign              initial("000110001"b),        /* opnd(1) <- opnd(2)                   */
 23           assign_size_ck      initial("000110010"b),        /* opnd(1) <- opnd(2)                   */
 24           assign_zero         initial("000110011"b),        /* opnd(1) <- 0                         */
 25           copy_words          initial("000110100"b),        /* move opnd(2) to opnd(1) by opnd(3) words */
 26           copy_string         initial("000110101"b),        /* move opnd(2) to opnd(1) by opnd(3) units */
 27           make_desc           initial("000110110"b),        /* opnd(1) <- descriptor(opnd(2),opnd(3)) */
 28           assign_round        initial("000110111"b),        /* opnd(1) <- opnd(2) rounded           */
 29           pack                initial("000111000"b),        /* opnd(1) <- encode to picture opnd(2) */
 30           unpack              initial("000111001"b),        /* opnd(1) <- decode from picture opnd(2) */
 31 
 32           less_than           initial("001000100"b),        /* opnd(1) <- opnd(2) < opnd(3)         */
 33           greater_than        initial("001000101"b),        /* opnd(1) <- opnd(2) > opnd(3)         */
 34           equal               initial("001000110"b),        /* opnd(1) <- opnd(2) = opnd(3)         */
 35           not_equal           initial("001000111"b),        /* opnd(1) <- opnd(2) ^= opnd(3)        */
 36           less_or_equal       initial("001001000"b),        /* opnd(1) <- opnd(2) <= opnd(3)        */
 37           greater_or_equal    initial("001001001"b),        /* opnd(1) <- opnd(2) >= opnd(3)        */
 38 
 39           jump                initial("001010001"b),        /* go to opnd(1) unconditionally        */
 40           jump_true           initial("001010010"b),        /* go to opnd(1) if opnd(2) is not 0    */
 41           jump_false          initial("001010011"b),        /* go to opnd(1) if opnd(2) is all 0    */
 42           jump_if_lt          initial("001010100"b),        /* go to opnd(1) if opnd(2) < opnd(3)   */
 43           jump_if_gt          initial("001010101"b),        /* go to opnd(1) if opnd(2) > opnd(3)   */
 44           jump_if_eq          initial("001010110"b),        /* go to opnd(1) if opnd(2) = opnd(3)   */
 45           jump_if_ne          initial("001010111"b),        /* go to opnd(1) if opnd(2) ^= opnd(3)  */
 46           jump_if_le          initial("001011000"b),        /* go to opnd(1) if opnd(2) <= opnd(3)  */
 47           jump_if_ge          initial("001011001"b),        /* go to opnd(1) if opnd(2) >= opnd(3)  */
 48 
 49           std_arg_list        initial("001100001"b),        /* opnd(1) <- arglist(opnd(2) desclist(opnd(3)))  */
 50           return_words        initial("001100010"b),        /* return aggregate opnd(1), opnd(2) is length in words */
 51           std_call            initial("001100011"b),        /* opnd(1) <- call opnd(2) with opnd(3)           */
 52           return_bits         initial("001100100"b),        /* return aggregate opnd(1), opnd(2) is length in bits */
 53           std_entry           initial("001100101"b),        /* entry(opnd(1)... opnd(n))                      */
 54           return_string       initial("001100110"b),        /* return string opnd(1) */
 55           ex_prologue         initial("001100111"b),        /* execute the prologue -no operands-             */
 56           allot_auto          initial("001101000"b),        /* opnd(1) <- addrel(stack,opnd(2))               */
 57           param_ptr           initial("001101001"b),        /* opnd(1) <- ptr to opnd(2) in  block opnd(3)    */
 58           param_desc_ptr      initial("001101010"b),        /* opnd(1) <- ptr to opnd(2) in block opnd(3)     */
 59           std_return          initial("001101011"b),        /* return -no arguments-                          */
 60           allot_ctl           initial("001101100"b),        /* allocate opnd(1) , length in words is opnd(2)  */
 61           free_ctl            initial("001101101"b),        /* free opnd(1)                                   */
 62           stop                initial("001101110"b),        /* stop - terminate run unit                      */
 63 
 64           mod_bit             initial("001110000"b),        /* opnd(1) <- mod(opnd(3),36),
 65                                                                opnd(2) <- opnd(3) / 36              */
 66           mod_byte            initial("001110001"b),        /* opnd(1) <- mod(opnd(3),4),
 67                                                                opnd(2) <- opnd(3) / 4               */
 68           mod_half            initial("001110010"b),        /* opnd(1) <- mod(opnd(3),2),
 69                                                                opnd(2) <- opnd(3) / 2               */
 70           mod_word            initial("001110011"b),        /* TO BE DEFINED BY BLW                           */
 71 
 72           bit_to_char         initial("010000000"b),        /* opnd(1) <- (opnd(2)+8)/9             */
 73           bit_to_word         initial("010000001"b),        /* opnd(1) <- (opnd(2)+35)/36           */
 74           char_to_word        initial("010000010"b),        /* opnd(1) <- (opnd(2)+3)/4             */
 75           half_to_word        initial("010000011"b),        /* opnd(1) <- (opnd(2)+1)/2             */
 76           word_to_mod2        initial("010000100"b),        /* opnd(1) <- (opnd(2)+1)/2*2           */
 77           word_to_mod4        initial("010000101"b),        /* opnd(1) <- (opnd(2)+3)/4*4           */
 78           word_to_mod8        initial("010000110"b),        /* opnd(1) <- (opnd(2)+7)/8*8           */
 79           rel_fun             initial("010000111"b),        /* opnd(1) <- rel(opnd(2))              */
 80           baseno_fun          initial("010001000"b),        /* opnd(1) <- baseno(opnd(2))           */
 81           desc_size           initial("010001001"b),        /* opnd(1) <- substr(opnd(2),13,24)     */
 82           bit_pointer         initial("010001010"b),        /* opnd(1) <- bit offset of opnd(2)     */
 83           index_before_fun    initial("010001011"b),        /* opnd(1) <- length of before(opnd(2),opnd(3)) */
 84           index_after_fun     initial("010001100"b),        /* opnd(1) <- offset of after(opnd(2),opnd(3)) in opnd(2) */
 85           verify_ltrim_fun    initial("010001101"b),        /* opnd(1) <- offset of ltrim(opnd(2),opnd(3)) in opnd(2) */
 86           verify_rtrim_fun    initial("010001110"b),        /* opnd(1) <- length(opnd(2))-length(rtrim(opnd(2),opnd(3))) */
 87           digit_to_bit        initial("010001111"b),        /* opnd(1) <- 9*opnd(2)/2               */
 88 
 89           ceil_fun            initial("010010000"b),        /* opnd(1) <- ceil(opnd(2))             */
 90           floor_fun           initial("010010001"b),        /* opnd(1) <- floor(opnd(2))            */
 91           round_fun           initial("010010010"b),        /* opnd(1) <- round(opnd(2))            */
 92           sign_fun            initial("010010011"b),        /* opnd(1) <- sign(opnd(2))             */
 93           abs_fun             initial("010010100"b),        /* opnd(1) <- abs(opnd(2))              */
 94           trunc_fun           initial("010010101"b),        /* opnd(1) <- trunc(opnd(2))            */
 95           byte_fun            initial("010010110"b),        /* opnd(1) <- byte(opnd(2))             */
 96           rank_fun            initial("010010111"b),        /* opnd(1) <- rank(opnd(2))             */
 97           index_rev_fun       initial("010011000"b),        /* opnd(1) <- index(reverse(opnd(2)),reverse(opnd(3))) */
 98           search_rev_fun      initial("010011001"b),        /* opnd(1) <- search(reverse(opnd(2)),opnd(3)) */
 99           verify_rev_fun      initial("010011010"b),        /* opnd(1) <- verify(reverse(opnd(2)),opnd(3)) */
100           wordno_fun          initial("010011011"b),        /* opnd(1) <- wordno (opnd(2)) */
101           segno_fun           initial("010011100"b),        /* opnd(1) <- segno (opnd(2)) */
102           bitno_fun           initial("010011101"b),        /* opnd(1) <- bitno (opnd(2)) */
103           charno_fun          initial("010011110"b),        /* opnd(1) <- charno (opnd(2)) */
104 
105           index_fun           initial("010100000"b),        /* opnd(1) <- index(opnd(2),opnd(3))    */
106           off_fun             initial("010100001"b),        /* opnd(1) <- offset(opnd(2),opnd(3))   */
107           complex_fun         initial("010100010"b),        /* opnd(1) <- complex(opnd(2),opnd(3))  */
108           conjg_fun           initial("010100011"b),        /* opnd(1) <- conjg(opnd(2),opnd(3))    */
109           mod_fun             initial("010100100"b),        /* opnd(1) <- mod(opnd(2),opnd(3))      */
110           repeat_fun          initial("010100101"b),        /* opnd(1) <- repeat(opnd(2),opnd(3))   */
111           verify_fun          initial("010100110"b),        /* opnd(1) <- verify(opnd(2),opnd(3))   */
112           translate_fun       initial("010100111"b),        /* opnd(1) <- translate(opnd(2),opnd(3))*/
113           real_fun            initial("010101001"b),        /* opnd(1) <- real(opnd(2))             */
114           imag_fun            initial("010101010"b),        /* opnd(1) <- imag(opnd(2))             */
115           length_fun          initial("010101011"b),        /* opnd(1) <- length(opnd(2)) */
116           pl1_mod_fun         initial("010101100"b),        /* opnd(1) <- mod(opnd(2)) */
117           search_fun          initial("010101101"b),        /* opnd(1) <- search(opnd(2),opnd(3)) */
118           allocation_fun      initial("010101110"b),        /* opnd(1) <- allocation(opnd(2)) */
119           reverse_fun         initial("010101111"b),        /* opnd(1) <- reverse(opnd(2)) */
120 
121           addr_fun            initial("010110000"b),        /* opnd(1) <- addr(opnd(2))             */
122           addr_fun_bits       initial("010110001"b),        /* opnd(1) <- addr(opnd(2))             */
123           ptr_fun             initial("010110010"b),        /* opnd(1) <- ptr(opnd(2),opnd(3))      */
124           baseptr_fun         initial("010110011"b),        /* opnd(1) <- baseptr(opnd(2))          */
125           addrel_fun          initial("010110100"b),        /* opnd(1) <- addrel(opnd(2),opnd(3))   */
126           codeptr_fun         initial("010110101"b),        /* opnd(1) <- codeptr(opnd(2))          */
127           environmentptr_fun  initial("010110110"b),        /* opnd(1) <- environmentptr(opnd(2))   */
128           stackbaseptr_fun    initial("010110111"b),        /* opnd(1) is ptr to base of current stack        */
129           stackframeptr_fun   initial("010111000"b),        /* opnd(1) is ptr to current block's stack frame  */
130           setcharno_fun       initial("010111001"b),        /* opnd(1) <- opnd(2) with charno opnd(3) */
131           addcharno_fun       initial("010111010"b),        /* opnd(1) <- opnd(2) with charno = charno + opnd(3) */
132           setbitno_fun        initial("010111011"b),        /* setcharno for bitsno */
133           addbitno_fun        initial("010111100"b),        /* addcharno for bitno */
134 
135           min_fun             initial("011000000"b),        /* opnd(1) <- min(opnd(1),opnd(2),...)  */
136           max_fun             initial("011000001"b),        /* opnd(1) <- max(opnd(1),opnd(2),...)  */
137 
138           stack_ptr           initial("011010001"b),        /* opnd(1) <- stack frame ptr           */
139           empty_area          initial("011010010"b),        /* empty opnd(1), length in words is opnd(2) */
140           enable_on           initial("011010100"b),        /* opnd(1) is the cond name
141                                                                opnd(2) is the file name
142                                                                opnd(3) is the block       */
143           revert_on           initial("011010101"b),        /* opnd(1) is the cond name,
144                                                                opnd(2) is the file name   */
145           signal_on           initial("011010110"b),        /* opnd(1) is the cond name
146                                                                opnd(2) is the file name */
147 
148           lock_fun            initial("011010111"b),        /* opnd(1) <- stac(opnd(2),opnd(3))     */
149           stacq_fun           initial("011011000"b),        /* opnd(1) is result, opnd(2) is ptr to lock word,
150                                                                opnd(3) is old value, (4) is new value. */
151           clock_fun           initial("011011001"b),        /* opnd(1) is the clock time            */
152           vclock_fun          initial("011011010"b),        /* opnd(1) is the virtual clock time    */
153 
154           bound_ck            initial("011100000"b),        /* opnd(1) <- opnd(2) if opnd(3) <= opnd(2) <= opnd(4) */
155           range_ck            initial("011100001"b),        /* opnd(1) <- opnd(2) if opnd(3) <= opnd(2) <= opnd(4) */
156           loop                initial("011100010"b),        /* do opnd(1) for opnd(2) from opnd(3) to opnd(4) by 1,
157                                                                opnd(5) is the list */
158           join                initial("011100011"b),        /* do opnd(1), opnd(2) ... opnd(n)      */
159           allot_based         initial("011100100"b),        /* allocate opnd(2) words in opnd(3), set opnd(1) */
160           free_based          initial("011100101"b),        /* free opnd(1) in opnd(3), length is opnd(2) words */
161 
162           r_parn              initial("011110001"b),        /* format op code                       */
163           l_parn              initial("011110010"b),
164           r_format            initial("011110011"b),
165           c_format            initial("011110100"b),
166           f_format            initial("011110101"b),
167           e_format            initial("011110110"b),
168           b_format            initial("011110111"b),
169           a_format            initial("011111000"b),
170           x_format            initial("011111001"b),
171           skip_format         initial("011111010"b),
172           column_format       initial("011111011"b),
173           page_format         initial("011111100"b),
174           line_format         initial("011111101"b),
175           picture_format      initial("011111110"b),
176           bn_format           initial("011111111"b),        /* bit format, length(opnd(2)), radix factor(opnd(3)) */
177 
178           get_list_trans      initial("100000000"b),        /* getlist(opnd(2) with desc(opnd(1)))  */
179           get_edit_trans      initial("100000001"b),        /* getedit(opnd(2) with desc(opnd(1)))  */
180           get_data_trans      initial("100000010"b),        /* getdata(opnd(1) to opnd(n))          */
181           put_list_trans      initial("100000011"b),        /* putlist(opnd(2) with desc(opnd(1)))  */
182           put_edit_trans      initial("100000100"b),        /* putedit(opnd(2) with desc(opnd(1)))  */
183           put_data_trans      initial("100000101"b),        /* putdata(opnd(2)) with subscript-list opnd(1) */
184           terminate_trans     initial("100000110"b),        /* terminate stream transmission        */
185           stream_prep         initial("100000111"b),        /* initiate stream transmission         */
186           record_io           initial("100001000"b),        /* perform record io operation          */
187           fortran_read        initial("100001001"b),        /* A complete read statement            */
188           fortran_write       initial("100001010"b),        /* A complete write statement           */
189           ftn_file_manip      initial("100001011"b),        /* endfile,backspace,rewind,etc.        */
190           ftn_trans_loop      initial("100001100"b),        /* An implied do in i/o list            */
191           put_control         initial("100001101"b),        /* put control opnd(1) opnd(2) times    */
192           put_field           initial("100001110"b),        /* putlist(opnd(2)) of length(opnd(1))  */
193           put_field_chk       initial("100001111"b),        /* putlist(op(2)) of len(op(1)) check char index(op(3)) */
194 
195 /* These operators are produced by the parse but are not used as input to the code generator.       */
196 /* They are processed by the semantic translator.                                                   */
197 
198           return_value        initial("100010010"b),        /* return(opnd(1))                      */
199           allot_var           initial("100010011"b),        /* allot opnd(1) in opnd(2)             */
200           free_var            initial("100010100"b),        /* free opnd(1) out of opnd(2)          */
201           get_file            initial("100010101"b),        /* opnd(1) is filename,opnd(2) is copy  */
202                                                             /* opnd(3) is skip, opnd(4) is list     */
203           get_string          initial("100010110"b),        /* opnd(1) is string,opnd(2) is list    */
204           put_file            initial("100010111"b),        /* opnd(1) is filename,opnd(2) is page  */
205                                                             /* opnd(3) is skip,opnd(4) is line      */
206           put_string          initial("100011000"b),        /* opnd(1) is string,opnd(2) is list    */
207           open_file           initial("100011001"b),
208           close_file          initial("100011010"b),
209           read_file           initial("100011011"b),
210           write_file          initial("100011100"b),
211           locate_file         initial("100011101"b),
212           do_fun              initial("100011110"b),        /* opnd(1) is join of a list            */
213                                                             /* opnd(2) is control variable ref      */
214                                                             /* opnd(3) is specification operator    */
215           do_spec             initial("100011111"b),        /* opnd(1) to opnd(2) by opnd(3)        */
216                                                             /* repeat opnd(4) while opnd(5)         */
217                                                             /* opnd(6) is next specification        */
218 
219           rewrite_file        initial("100100000"b),
220           delete_file         initial("100100001"b),
221           unlock_file         initial("100100010"b),
222           lock_file           initial("100100011"b),
223           refer               initial("100100101"b),        /* opnd(1) refer(opnd(2))               */
224           prefix_plus         initial("100100110"b),        /* opnd(1) <- +opnd(2)                  */
225           nop                 initial("100100111"b),        /* no-op */
226           assign_by_name      initial("100101000"b),        /* opnd(1) <- opnd(2),by name           */
227 
228 /* These operators are produced by the semantic translator in processing the math
229    builtin functions and are used as input to the code generator                          */
230 
231           sqrt_fun            initial("100110000"b),        /* opnd(1) <- sqrt(opnd(2))   */
232           sin_fun             initial("100110001"b),        /* opnd(1) <- sin(opnd(2))    */
233           sind_fun            initial("100110010"b),        /* opnd(1) <- sind(opnd(2))   */
234           cos_fun             initial("100110011"b),        /* opnd(1) <- cos(opnd(2))    */
235           cosd_fun            initial("100110100"b),        /* opnd(1) <- cosd(opnd(2))   */
236           tan_fun             initial("100110101"b),        /* opnd(1) <- tan(opnd(2))    */
237           tand_fun            initial("100110110"b),        /* opnd(1) <- tand(opnd(2))   */
238           asin_fun            initial("100110111"b),        /* opnd(1) <- asin(opnd(2))   */
239           asind_fun           initial("100111000"b),        /* opnd(1) <- asind(opnd(2))  */
240           acos_fun            initial("100111001"b),        /* opnd(1) <- acos(opnd(2))   */
241           acosd_fun           initial("100111010"b),        /* opnd(1) <- acosd(opnd(2))  */
242           atan_fun            initial("100111011"b),        /* opnd(1) <- atan(opnd(2)[,opnd(3)])   */
243           atand_fun           initial("100111100"b),        /* opnd(1) <- atand(opnd(2)[,opnd(3)])  */
244           log2_fun            initial("100111101"b),        /* opnd(1) <- log2(opnd(2))   */
245           log_fun             initial("100111110"b),        /* opnd(1) <- log(opnd(2))    */
246           log10_fun           initial("100111111"b),        /* opnd(1) <- log10(opnd(2))  */
247 
248           exp_fun             initial("101000000"b))        /* opnd(1) <- exp(opnd(2))    */
249 
250                               bit(9) aligned internal static options(constant);
251 
252 /* END INCLUDE FILE ... op_codes.incl.pl1 */