COMPILATION LISTING OF SEGMENT exp_op Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1636.6 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* program to generate code for x ** n where n is a constant integer > 1 12* 13* Method used is left-to-right binary scan of n, 14* See Knuth, Volume 2, page 399 15* 16* Initial Version: 3 June 1971 by BLW 17* Modified: 5 July 1972 by BLW */ 18 19 exp_op: proc(npx,refs,atom); 20 21 dcl npx ptr, /* points at operator node */ 22 refs(3) ptr, /* refs for operands */ 23 atom(3) bit(1) aligned; /* "1"b if operand(i) is atom */ 24 25 dcl node_pt ptr defined (npx), 26 ref(3) ptr defined (refs); 27 28 dcl (p,q) ptr, 29 (type,square_macro,mpy_macro,n) fixed bin(15), 30 fw bit(36) aligned; 31 32 dcl load entry(ptr,fixed bin); 33 dcl m_a entry(ptr,bit(2) aligned); 34 dcl compile_exp$save entry(ptr) returns(ptr), 35 get_reference entry returns(ptr); 36 dcl state_man$erase_reg entry(bit(19) aligned); 37 dcl expmac entry(fixed bin(15),ptr), 38 expmac$zero entry(fixed bin(15)); 39 40 dcl (index,substr) builtin; 41 42 dcl full_word bit(36) aligned based; 43 44 dcl ( square_fx1 init(403), 45 mpy_mac(4) init(25,0,31,32)) fixed bin(15) int static; 46 1 1 /* BEGIN INCLUDE FILE ... cgsystem.incl.pl1 */ 1 2 1 3 /* Modified: 25 Apr 1979 by PCK to implement 4-bit decimal */ 1 4 1 5 dcl ( bits_per_char init(9), 1 6 bits_per_half init(18), 1 7 bits_per_word init(36), 1 8 bits_per_two_words init(72), 1 9 bits_per_four_words init(144), 1 10 bits_per_words(2) init(36,72), 1 11 packed_digits_per_char init(2), 1 12 chars_per_word init(4), 1 13 packed_digits_per_word init(8), 1 14 1 15 break_even_bits init(216), 1 16 break_even_words init(6), 1 17 1 18 label_size init(4), 1 19 1 20 convert_size(13:14) init(9,1), 1 21 max_offset(13:14) init(27,35), 1 22 max_short_size(13:14) init(8,72), 1 23 1 24 units_per_word(0:5) init(1,36,8,4,2,1), 1 25 1 26 max_dec_scale init(32), 1 27 min_dec_scale init(-31), 1 28 max_p_xreg init(18), 1 29 max_p_fix_bin_1 init(35), 1 30 max_p_flt_bin_1 init(27), 1 31 max_p_fix_dec init(59), 1 32 max_length_p init(24), 1 33 default_fix_bin_p init(17)) fixed bin(8) int static options(constant); 1 34 1 35 dcl (convert_offset(0:5) init(36,1,4.5,9,18,36), 1 36 bits_per_packed_digit init(4.5)) fixed bin(8,1) int static options(constant); 1 37 1 38 dcl max_index_register_value init(262143) fixed bin(31) int static options(constant); 1 39 1 40 /* END INCLUDE FILE ... cgsystem.incl.pl1 */ 1 41 47 2 1 /* BEGIN INCLUDE FILE ... reference.incl.pl1 */ 2 2 2 3 dcl 1 reference based aligned, 2 4 2 node_type bit(9) unaligned, 2 5 2 array_ref bit(1) unaligned, 2 6 2 varying_ref bit(1) unaligned, 2 7 2 shared bit(1) unaligned, 2 8 2 put_data_sw bit(1) unaligned, 2 9 2 processed bit(1) unaligned, 2 10 2 units fixed(3) unaligned, 2 11 2 ref_count fixed(17) unaligned, 2 12 2 c_offset fixed(24), 2 13 2 c_length fixed(24), 2 14 2 symbol ptr unaligned, 2 15 2 qualifier ptr unaligned, 2 16 2 offset ptr unaligned, 2 17 2 length ptr unaligned, 2 18 2 subscript_list ptr unaligned, 2 19 /* these fields are used by the 645 code generator */ 2 20 2 address structure unaligned, 2 21 3 base bit(3), 2 22 3 offset bit(15), 2 23 3 op bit(9), 2 24 3 no_address bit(1), 2 25 3 inhibit bit(1), 2 26 3 ext_base bit(1), 2 27 3 tag bit(6), 2 28 2 info structure unaligned, 2 29 3 address_in structure, 2 30 4 b dimension(0:7) bit(1), 2 31 4 storage bit(1), 2 32 3 value_in structure, 2 33 4 a bit(1), 2 34 4 q bit(1), 2 35 4 aq bit(1), 2 36 4 string_aq bit(1), 2 37 4 complex_aq bit(1), 2 38 4 decimal_aq bit(1), 2 39 4 b dimension(0:7) bit(1), 2 40 4 storage bit(1), 2 41 4 indicators bit(1), 2 42 4 x dimension(0:7) bit(1), 2 43 3 other structure, 2 44 4 big_offset bit(1), 2 45 4 big_length bit(1), 2 46 4 modword_in_offset bit(1), 2 47 2 data_type fixed(5) unaligned, 2 48 2 bits structure unaligned, 2 49 3 padded_ref bit(1), 2 50 3 aligned_ref bit(1), 2 51 3 long_ref bit(1), 2 52 3 forward_ref bit(1), 2 53 3 ic_ref bit(1), 2 54 3 temp_ref bit(1), 2 55 3 defined_ref bit(1), 2 56 3 evaluated bit(1), 2 57 3 allocate bit(1), 2 58 3 allocated bit(1), 2 59 3 aliasable bit(1), 2 60 3 even bit(1), 2 61 3 perm_address bit(1), 2 62 3 aggregate bit(1), 2 63 3 hit_zero bit(1), 2 64 3 dont_save bit(1), 2 65 3 fo_in_qual bit(1), 2 66 3 hard_to_load bit(1), 2 67 2 relocation bit(12) unaligned, 2 68 2 more_bits structure unaligned, 2 69 3 substr bit(1), 2 70 3 padded_for_store_ref bit(1), 2 71 3 aligned_for_store_ref bit(1), 2 72 3 mbz bit(15), 2 73 2 store_ins bit(18) unaligned; 2 74 2 75 /* END INCLUDE FILE ... reference.incl.pl1 */ 48 3 1 /* BEGIN INCLUDE FILE ... symbol.incl.pl1 */ 3 2 3 3 dcl 1 symbol based aligned, 3 4 2 node_type bit(9) unal, 3 5 2 source_id structure unal, 3 6 3 file_number bit(8), 3 7 3 line_number bit(14), 3 8 3 statement_number bit(5), 3 9 2 location fixed(18) unal unsigned, 3 10 2 allocated bit(1) unal, 3 11 2 dcl_type bit(3) unal, 3 12 2 reserved bit(6) unal, 3 13 2 pix unal, 3 14 3 pic_fixed bit(1) unal, 3 15 3 pic_float bit(1) unal, 3 16 3 pic_char bit(1) unal, 3 17 3 pic_scale fixed(7) unal, 3 18 3 pic_size fixed(7) unal, 3 19 2 level fixed(8) unal, 3 20 2 boundary fixed(3) unal, 3 21 2 size_units fixed(3) unal, 3 22 2 scale fixed(7) unal, 3 23 2 runtime bit(18) unal, 3 24 2 runtime_offset bit(18) unal, 3 25 2 block_node ptr unal, 3 26 2 token ptr unal, 3 27 2 next ptr unal, 3 28 2 multi_use ptr unal, 3 29 2 cross_references ptr unal, 3 30 2 initial ptr unal, 3 31 2 array ptr unal, 3 32 2 descriptor ptr unal, 3 33 2 equivalence ptr unal, 3 34 2 reference ptr unal, 3 35 2 general ptr unal, 3 36 2 father ptr unal, 3 37 2 brother ptr unal, 3 38 2 son ptr unal, 3 39 2 word_size ptr unal, 3 40 2 bit_size ptr unal, 3 41 2 dcl_size ptr unal, 3 42 2 symtab_size ptr unal, 3 43 2 c_word_size fixed(24), 3 44 2 c_bit_size fixed(24), 3 45 2 c_dcl_size fixed(24), 3 46 3 47 2 attributes structure aligned, 3 48 3 data_type structure unal, 3 49 4 structure bit(1) , 3 50 4 fixed bit(1), 3 51 4 float bit(1), 3 52 4 bit bit(1), 3 53 4 char bit(1), 3 54 4 ptr bit(1), 3 55 4 offset bit(1), 3 56 4 area bit(1), 3 57 4 label bit(1), 3 58 4 entry bit(1), 3 59 4 file bit(1), 3 60 4 arg_descriptor bit(1), 3 61 4 storage_block bit(1), 3 62 4 explicit_packed bit(1), /* options(packed) */ 3 63 4 condition bit(1), 3 64 4 format bit(1), 3 65 4 builtin bit(1), 3 66 4 generic bit(1), 3 67 4 picture bit(1), 3 68 3 69 3 misc_attributes structure unal, 3 70 4 dimensioned bit(1), 3 71 4 initialed bit(1), 3 72 4 aligned bit(1), 3 73 4 unaligned bit(1), 3 74 4 signed bit(1), 3 75 4 unsigned bit(1), 3 76 4 precision bit(1), 3 77 4 varying bit(1), 3 78 4 local bit(1), 3 79 4 decimal bit(1), 3 80 4 binary bit(1), 3 81 4 real bit(1), 3 82 4 complex bit(1), 3 83 4 variable bit(1), 3 84 4 reducible bit(1), 3 85 4 irreducible bit(1), 3 86 4 returns bit(1), 3 87 4 position bit(1), 3 88 4 internal bit(1), 3 89 4 external bit(1), 3 90 4 like bit(1), 3 91 4 member bit(1), 3 92 4 non_varying bit(1), 3 93 4 options bit(1), 3 94 4 variable_arg_list bit(1), /* options(variable) */ 3 95 4 alloc_in_text bit(1), /* options(constant) */ 3 96 3 97 3 storage_class structure unal, 3 98 4 auto bit(1), 3 99 4 based bit(1), 3 100 4 static bit(1), 3 101 4 controlled bit(1), 3 102 4 defined bit(1), 3 103 4 parameter bit(1), 3 104 4 param_desc bit(1), 3 105 4 constant bit(1), 3 106 4 temporary bit(1), 3 107 4 return_value bit(1), 3 108 3 109 3 file_attributes structure unal, 3 110 4 print bit(1), 3 111 4 input bit(1), 3 112 4 output bit(1), 3 113 4 update bit(1), 3 114 4 stream bit(1), 3 115 4 reserved_1 bit(1), 3 116 4 record bit(1), 3 117 4 sequential bit(1), 3 118 4 direct bit(1), 3 119 4 interactive bit(1), /* env(interactive) */ 3 120 4 reserved_2 bit(1), 3 121 4 reserved_3 bit(1), 3 122 4 stringvalue bit(1), /* env(stringvalue) */ 3 123 4 keyed bit(1), 3 124 4 reserved_4 bit(1), 3 125 4 environment bit(1), 3 126 3 127 3 compiler_developed structure unal, 3 128 4 aliasable bit(1), 3 129 4 packed bit(1), 3 130 4 passed_as_arg bit(1), 3 131 4 allocate bit(1), 3 132 4 set bit(1), 3 133 4 exp_extents bit(1), 3 134 4 refer_extents bit(1), 3 135 4 star_extents bit(1), 3 136 4 isub bit(1), 3 137 4 put_in_symtab bit(1), 3 138 4 contiguous bit(1), 3 139 4 put_data bit(1), 3 140 4 overlayed bit(1), 3 141 4 error bit(1), 3 142 4 symtab_processed bit(1), 3 143 4 overlayed_by_builtin bit(1), 3 144 4 defaulted bit(1), 3 145 4 connected bit(1); 3 146 3 147 /* END INCLUDE FILE ... symbol.incl.pl1 */ 49 4 1 /* BEGIN INCLUDE FILE ... operator.incl.pl1 */ 4 2 4 3 /* Modified: 2 Apr 1980 by PCK to add max_number_of_operands */ 4 4 4 5 /* format: style3 */ 4 6 dcl 1 operator based aligned, 4 7 2 node_type bit (9) unaligned, 4 8 2 op_code bit (9) unaligned, 4 9 2 shared bit (1) unaligned, 4 10 2 processed bit (1) unaligned, 4 11 2 optimized bit (1) unaligned, 4 12 2 number fixed (14) unaligned, 4 13 2 operand dimension (n refer (operator.number)) ptr unaligned; 4 14 4 15 dcl max_number_of_operands 4 16 fixed bin (15) int static options (constant) initial (32767); 4 17 4 18 /* END INCLUDE FILE ... operator.incl.pl1 */ 50 51 52 /* following prevents use of A and Q as instruction modifiers by forcing 53* into storage any result held in these registers */ 54 55 call state_man$erase_reg("11"b); 56 57 if atom(2) then call load(ref(2),0); else ref(2) = compile_exp$save((node_pt -> operand(2))); 58 59 p = get_reference(); 60 p -> reference = ref(2) -> reference; 61 if p -> reference.no_address then call m_a(p,"0"b); 62 p -> reference.shared, p -> reference.perm_address = "1"b; 63 64 if atom(2) then q = p; else q = ref(2); 65 66 type = p -> reference.data_type; 67 square_macro = square_fx1 - 1 + type; 68 mpy_macro = mpy_mac(type); 69 70 fw = ref(3) -> reference.symbol -> symbol.initial -> full_word; 71 72 call expmac(mpy_macro,q); 73 74 n = index(fw,"1"b) + 1; 75 76 loop: if substr(fw,n,1) then call expmac(mpy_macro,p); 77 78 n = n + 1; 79 if n <= bits_per_word 80 then do; 81 call expmac$zero(square_macro); 82 goto loop; 83 end; 84 85 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1008.3 exp_op.pl1 >spec>on>pl128d>exp_op.pl1 47 1 10/25/79 1645.8 cgsystem.incl.pl1 >ldd>include>cgsystem.incl.pl1 48 2 07/21/80 1546.3 reference.incl.pl1 >ldd>include>reference.incl.pl1 49 3 10/02/83 0828.4 symbol.incl.pl1 >spec>on>pl128d>symbol.incl.pl1 50 4 07/21/80 1546.3 operator.incl.pl1 >ldd>include>operator.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. address 10 based structure level 2 packed unaligned dcl 2-3 atom parameter bit(1) array dcl 21 ref 19 57 64 bits 12(06) based structure level 2 packed unaligned dcl 2-3 bits_per_word constant fixed bin(8,0) initial dcl 1-5 ref 79 compile_exp$save 000014 constant entry external dcl 34 ref 57 data_type 12 based fixed bin(5,0) level 2 packed unaligned dcl 2-3 set ref 66 expmac 000022 constant entry external dcl 37 ref 72 76 expmac$zero 000024 constant entry external dcl 37 ref 81 full_word based bit(36) dcl 42 ref 70 fw 000110 automatic bit(36) dcl 28 set ref 70* 74 76 get_reference 000016 constant entry external dcl 34 ref 59 index builtin function dcl 40 ref 74 initial 11 based pointer level 2 packed unaligned dcl 3-3 ref 70 load 000010 constant entry external dcl 32 ref 57 m_a 000012 constant entry external dcl 33 ref 61 mpy_mac 000000 constant fixed bin(15,0) initial array dcl 44 ref 68 mpy_macro 000106 automatic fixed bin(15,0) dcl 28 set ref 68* 72* 76* n 000107 automatic fixed bin(15,0) dcl 28 set ref 74* 76 78* 78 79 no_address 10(27) based bit(1) level 3 packed unaligned dcl 2-3 set ref 61 node_pt defined pointer dcl 25 ref 57 npx parameter pointer dcl 21 ref 19 57 57 operand 1 based pointer array level 2 packed unaligned dcl 4-6 ref 57 operator based structure level 1 dcl 4-6 p 000100 automatic pointer dcl 28 set ref 59* 60 61 61* 62 62 64 66 76* perm_address 12(18) based bit(1) level 3 packed unaligned dcl 2-3 set ref 62* q 000102 automatic pointer dcl 28 set ref 64* 64* 72* ref defined pointer array dcl 25 set ref 57* 57* 60 64 70 reference based structure level 1 dcl 2-3 set ref 60* 60 refs parameter pointer array dcl 21 set ref 19 57 57 57* 57 60 60 64 64 70 70 shared 0(11) based bit(1) level 2 packed unaligned dcl 2-3 set ref 62* square_fx1 constant fixed bin(15,0) initial dcl 44 ref 67 square_macro 000105 automatic fixed bin(15,0) dcl 28 set ref 67* 81* state_man$erase_reg 000020 constant entry external dcl 36 ref 55 substr builtin function dcl 40 ref 76 symbol 3 based pointer level 2 in structure "reference" packed unaligned dcl 2-3 in procedure "exp_op" set ref 70 symbol based structure level 1 dcl 3-3 in procedure "exp_op" type 000104 automatic fixed bin(15,0) dcl 28 set ref 66* 67 68 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. bits_per_char internal static fixed bin(8,0) initial dcl 1-5 bits_per_four_words internal static fixed bin(8,0) initial dcl 1-5 bits_per_half internal static fixed bin(8,0) initial dcl 1-5 bits_per_packed_digit internal static fixed bin(8,1) initial dcl 1-35 bits_per_two_words internal static fixed bin(8,0) initial dcl 1-5 bits_per_words internal static fixed bin(8,0) initial array dcl 1-5 break_even_bits internal static fixed bin(8,0) initial dcl 1-5 break_even_words internal static fixed bin(8,0) initial dcl 1-5 chars_per_word internal static fixed bin(8,0) initial dcl 1-5 convert_offset internal static fixed bin(8,1) initial array dcl 1-35 convert_size internal static fixed bin(8,0) initial array dcl 1-5 default_fix_bin_p internal static fixed bin(8,0) initial dcl 1-5 label_size internal static fixed bin(8,0) initial dcl 1-5 max_dec_scale internal static fixed bin(8,0) initial dcl 1-5 max_index_register_value internal static fixed bin(31,0) initial dcl 1-38 max_length_p internal static fixed bin(8,0) initial dcl 1-5 max_number_of_operands internal static fixed bin(15,0) initial dcl 4-15 max_offset internal static fixed bin(8,0) initial array dcl 1-5 max_p_fix_bin_1 internal static fixed bin(8,0) initial dcl 1-5 max_p_fix_dec internal static fixed bin(8,0) initial dcl 1-5 max_p_flt_bin_1 internal static fixed bin(8,0) initial dcl 1-5 max_p_xreg internal static fixed bin(8,0) initial dcl 1-5 max_short_size internal static fixed bin(8,0) initial array dcl 1-5 min_dec_scale internal static fixed bin(8,0) initial dcl 1-5 packed_digits_per_char internal static fixed bin(8,0) initial dcl 1-5 packed_digits_per_word internal static fixed bin(8,0) initial dcl 1-5 units_per_word internal static fixed bin(8,0) initial array dcl 1-5 NAMES DECLARED BY EXPLICIT CONTEXT. exp_op 000021 constant entry external dcl 19 loop 000207 constant label dcl 76 ref 82 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 340 366 242 350 Length 620 242 26 216 76 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME exp_op 86 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME exp_op 000100 p exp_op 000102 q exp_op 000104 type exp_op 000105 square_macro exp_op 000106 mpy_macro exp_op 000107 n exp_op 000110 fw exp_op THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry index_bs_1_eis THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. compile_exp$save expmac expmac$zero get_reference load m_a state_man$erase_reg NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000015 55 000026 57 000036 57 000057 59 000075 60 000104 61 000113 62 000131 64 000136 64 000145 66 000150 67 000154 68 000157 70 000162 72 000170 74 000201 76 000207 78 000225 79 000226 81 000231 82 000240 85 000241 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved