COMPILATION LISTING OF SEGMENT find_condition_frame_ Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/05/86 1030.7 mst Wed Options: optimize map 1 /* ****************************************************** 2* * * 3* * * 4* * Copyright (c) 1972 by Massachusetts Institute of * 5* * Technology and Honeywell Information Systems, Inc. * 6* * * 7* * * 8* ****************************************************** */ 9 10 find_condition_frame_: proc(startp) returns(ptr); 11 12 /* This procedure returns a pointer to the stack frame associated with the most recent 13* condition to occur before the stack frame pointer to be startp. 14* It is written to work with an arbitrary stack segment. 15* 16* coded by M. Weaver 20 June 1973 */ 17 18 /* Changed to view stack_frame.return_ptr through RETURN_PTR_MASK 03/07/84 S. Herbst */ 19 20 declare startp ptr; 21 declare sig_caller_count fixed bin; 22 declare cu_$stack_frame_ptr entry(ptr); 23 declare (null, ptr, rel) builtin; 24 1 1 /* BEGIN INCLUDE FILE ... stack_frame.incl.pl1 ... */ 1 2 1 3 /* format: off */ 1 4 1 5 /* Modified: 16 Dec 1977, D. Levin - to add fio_ps_ptr and pl1_ps_ptr */ 1 6 /* Modified: 3 Feb 1978, P. Krupp - to add run_unit_manager bit & main_proc bit */ 1 7 /* Modified: 21 March 1978, D. Levin - change fio_ps_ptr to support_ptr */ 1 8 /* Modified: 03/01/84, S. Herbst - Added RETURN_PTR_MASK */ 1 9 1 10 1 11 /****^ HISTORY COMMENTS: 1 12* 1) change(86-09-15,Kissel), approve(86-09-15,MCR7473), 1 13* audit(86-10-01,Fawcett), install(86-11-03,MR12.0-1206): 1 14* Modified to add constants for the translator_id field in the stack_frame 1 15* structure. 1 16* END HISTORY COMMENTS */ 1 17 1 18 1 19 dcl RETURN_PTR_MASK bit (72) int static options (constant) /* mask to be AND'd with stack_frame.return_ptr */ 1 20 init ("777777777777777777000000"b3); /* when copying, to ignore bits that a call fills */ 1 21 /* with indicators (nonzero for Fortran hexfp caller) */ 1 22 /* say: unspec(ptr) = unspec(stack_frame.return_ptr) & RETURN_PTR_MASK; */ 1 23 1 24 dcl TRANSLATOR_ID_PL1V2 bit (18) internal static options (constant) init ("000000"b3); 1 25 dcl TRANSLATOR_ID_ALM bit (18) internal static options (constant) init ("000001"b3); 1 26 dcl TRANSLATOR_ID_PL1V1 bit (18) internal static options (constant) init ("000002"b3); 1 27 dcl TRANSLATOR_ID_SIGNAL_CALLER bit (18) internal static options (constant) init ("000003"b3); 1 28 dcl TRANSLATOR_ID_SIGNALLER bit (18) internal static options (constant) init ("000004"b3); 1 29 1 30 1 31 dcl sp pointer; /* pointer to beginning of stack frame */ 1 32 1 33 dcl stack_frame_min_length fixed bin static init(48); 1 34 1 35 1 36 dcl 1 stack_frame based(sp) aligned, 1 37 2 pointer_registers(0 : 7) ptr, 1 38 2 prev_sp pointer, 1 39 2 next_sp pointer, 1 40 2 return_ptr pointer, 1 41 2 entry_ptr pointer, 1 42 2 operator_and_lp_ptr ptr, /* serves as both */ 1 43 2 arg_ptr pointer, 1 44 2 static_ptr ptr unaligned, 1 45 2 support_ptr ptr unal, /* only used by fortran I/O */ 1 46 2 on_unit_relp1 bit(18) unaligned, 1 47 2 on_unit_relp2 bit(18) unaligned, 1 48 2 translator_id bit(18) unaligned, /* Translator ID (see constants above) 1 49* 0 => PL/I version II 1 50* 1 => ALM 1 51* 2 => PL/I version I 1 52* 3 => signal caller frame 1 53* 4 => signaller frame */ 1 54 2 operator_return_offset bit(18) unaligned, 1 55 2 x(0: 7) bit(18) unaligned, /* index registers */ 1 56 2 a bit(36), /* accumulator */ 1 57 2 q bit(36), /* q-register */ 1 58 2 e bit(36), /* exponent */ 1 59 2 timer bit(27) unaligned, /* timer */ 1 60 2 pad bit(6) unaligned, 1 61 2 ring_alarm_reg bit(3) unaligned; 1 62 1 63 1 64 dcl 1 stack_frame_flags based(sp) aligned, 1 65 2 pad(0 : 7) bit(72), /* skip over prs */ 1 66 2 xx0 bit(22) unal, 1 67 2 main_proc bit(1) unal, /* on if frame belongs to a main procedure */ 1 68 2 run_unit_manager bit(1) unal, /* on if frame belongs to run unit manager */ 1 69 2 signal bit(1) unal, /* on if frame belongs to logical signal_ */ 1 70 2 crawl_out bit(1) unal, /* on if this is a signal caller frame */ 1 71 2 signaller bit(1) unal, /* on if next frame is signaller's */ 1 72 2 link_trap bit(1) unal, /* on if this frame was made by the linker */ 1 73 2 support bit(1) unal, /* on if frame belongs to a support proc */ 1 74 2 condition bit(1) unal, /* on if condition established in this frame */ 1 75 2 xx0a bit(6) unal, 1 76 2 xx1 fixed bin, 1 77 2 xx2 fixed bin, 1 78 2 xx3 bit(25) unal, 1 79 2 old_crawl_out bit (1) unal, /* on if this is a signal caller frame */ 1 80 2 old_signaller bit(1) unal, /* on if next frame is signaller's */ 1 81 2 xx3a bit(9) unaligned, 1 82 2 xx4(9) bit(72) aligned, 1 83 2 v2_pl1_op_ret_base ptr, /* When a V2 PL/I program calls an operator the 1 84* * operator puts a pointer to the base of 1 85* * the calling procedure here. (text base ptr) */ 1 86 2 xx5 bit(72) aligned, 1 87 2 pl1_ps_ptr ptr; /* ptr to ps for this frame; also used by fio. */ 1 88 1 89 /* format: on */ 1 90 1 91 /* END INCLUDE FILE ... stack_frame.incl.pl1 */ 25 26 27 2 1 /* BEGIN INCLUDE FILE ... stack_header.incl.pl1 .. 3/72 Bill Silver */ 2 2 /* modified 7/76 by M. Weaver for *system links and more system use of areas */ 2 3 /* modified 3/77 by M. Weaver to add rnt_ptr */ 2 4 /* Modified April 1983 by C. Hornig for tasking */ 2 5 2 6 /****^ HISTORY COMMENTS: 2 7* 1) change(86-06-24,DGHowe), approve(86-06-24,MCR7396), 2 8* audit(86-08-05,Schroth), install(86-11-03,MR12.0-1206): 2 9* added the heap_header_ptr definition. 2 10* 2) change(86-08-12,Kissel), approve(86-08-12,MCR7473), 2 11* audit(86-10-10,Fawcett), install(86-11-03,MR12.0-1206): 2 12* Modified to support control point management. These changes were actually 2 13* made in February 1985 by G. Palter. 2 14* 3) change(86-10-22,Fawcett), approve(86-10-22,MCR7473), 2 15* audit(86-10-22,Farley), install(86-11-03,MR12.0-1206): 2 16* Remove the old_lot pointer and replace it with cpm_data_ptr. Use the 18 2 17* bit pad after cur_lot_size for the cpm_enabled. This was done to save some 2 18* space int the stack header and change the cpd_ptr unal to cpm_data_ptr 2 19* (ITS pair). 2 20* END HISTORY COMMENTS */ 2 21 2 22 /* format: style2 */ 2 23 2 24 dcl sb ptr; /* the main pointer to the stack header */ 2 25 2 26 dcl 1 stack_header based (sb) aligned, 2 27 2 pad1 (4) fixed bin, /* (0) also used as arg list by outward_call_handler */ 2 28 2 cpm_data_ptr ptr, /* (4) pointer to control point which owns this stack */ 2 29 2 combined_stat_ptr ptr, /* (6) pointer to area containing separate static */ 2 30 2 clr_ptr ptr, /* (8) pointer to area containing linkage sections */ 2 31 2 max_lot_size fixed bin (17) unal, /* (10) DU number of words allowed in lot */ 2 32 2 main_proc_invoked fixed bin (11) unal, /* (10) DL nonzero if main procedure invoked in run unit */ 2 33 2 have_static_vlas bit (1) unal, /* (10) DL "1"b if (very) large arrays are being used in static */ 2 34 2 pad4 bit (2) unal, 2 35 2 run_unit_depth fixed bin (2) unal, /* (10) DL number of active run units stacked */ 2 36 2 cur_lot_size fixed bin (17) unal, /* (11) DU number of words (entries) in lot */ 2 37 2 cpm_enabled bit (18) unal, /* (11) DL non-zero if control point management is enabled */ 2 38 2 system_free_ptr ptr, /* (12) pointer to system storage area */ 2 39 2 user_free_ptr ptr, /* (14) pointer to user storage area */ 2 40 2 null_ptr ptr, /* (16) */ 2 41 2 stack_begin_ptr ptr, /* (18) pointer to first stack frame on the stack */ 2 42 2 stack_end_ptr ptr, /* (20) pointer to next useable stack frame */ 2 43 2 lot_ptr ptr, /* (22) pointer to the lot for the current ring */ 2 44 2 signal_ptr ptr, /* (24) pointer to signal procedure for current ring */ 2 45 2 bar_mode_sp ptr, /* (26) value of sp before entering bar mode */ 2 46 2 pl1_operators_ptr ptr, /* (28) pointer to pl1_operators_$operator_table */ 2 47 2 call_op_ptr ptr, /* (30) pointer to standard call operator */ 2 48 2 push_op_ptr ptr, /* (32) pointer to standard push operator */ 2 49 2 return_op_ptr ptr, /* (34) pointer to standard return operator */ 2 50 2 return_no_pop_op_ptr 2 51 ptr, /* (36) pointer to standard return / no pop operator */ 2 52 2 entry_op_ptr ptr, /* (38) pointer to standard entry operator */ 2 53 2 trans_op_tv_ptr ptr, /* (40) pointer to translator operator ptrs */ 2 54 2 isot_ptr ptr, /* (42) pointer to ISOT */ 2 55 2 sct_ptr ptr, /* (44) pointer to System Condition Table */ 2 56 2 unwinder_ptr ptr, /* (46) pointer to unwinder for current ring */ 2 57 2 sys_link_info_ptr ptr, /* (48) pointer to *system link name table */ 2 58 2 rnt_ptr ptr, /* (50) pointer to Reference Name Table */ 2 59 2 ect_ptr ptr, /* (52) pointer to event channel table */ 2 60 2 assign_linkage_ptr ptr, /* (54) pointer to storage for (obsolete) hcs_$assign_linkage */ 2 61 2 heap_header_ptr ptr, /* (56) pointer to the heap header for this ring */ 2 62 2 trace, 2 63 3 frames, 2 64 4 count fixed bin, /* (58) number of trace frames */ 2 65 4 top_ptr ptr unal, /* (59) pointer to last trace frame */ 2 66 3 in_trace bit (36) aligned, /* (60) trace antirecursion flag */ 2 67 2 pad2 bit (36), /* (61) */ 2 68 2 pad5 pointer; /* (62) pointer to future stuff */ 2 69 2 70 /* The following offset refers to a table within the pl1 operator table. */ 2 71 2 72 dcl tv_offset fixed bin init (361) internal static; 2 73 /* (551) octal */ 2 74 2 75 2 76 /* The following constants are offsets within this transfer vector table. */ 2 77 2 78 dcl ( 2 79 call_offset fixed bin init (271), 2 80 push_offset fixed bin init (272), 2 81 return_offset fixed bin init (273), 2 82 return_no_pop_offset fixed bin init (274), 2 83 entry_offset fixed bin init (275) 2 84 ) internal static; 2 85 2 86 2 87 2 88 2 89 2 90 /* The following declaration is an overlay of the whole stack header. Procedures which 2 91* move the whole stack header should use this overlay. 2 92**/ 2 93 2 94 dcl stack_header_overlay (size (stack_header)) fixed bin based (sb); 2 95 2 96 2 97 2 98 /* END INCLUDE FILE ... stack_header.incl.pl1 */ 28 29 30 /* */ 31 /* get starting pointer if not provided */ 32 33 if startp = null then call cu_$stack_frame_ptr(sp); 34 else sp = startp; 35 sb = ptr(sp, 0); 36 sig_caller_count = 0; 37 38 /* We may need to skip the first frame--it may be the frame found 39* the last time around; but we don't ignore it since it could still affect 40* interpretation of the next level */ 41 42 if sp -> stack_frame_flags.signaller then do; 43 44 if sp -> stack_frame.entry_ptr = sb -> stack_header.signal_ptr 45 then sig_caller_count = 2; /* have found signal frame */ 46 47 sp = ptr(sp, rel(sp -> stack_frame.prev_sp)); /* skip this frame */ 48 49 end; 50 51 /* Loop through the stack looking for a condition frame. 52* If a signal frame is found, we must determine whether signal_ was 53* invoked for a software condition or a hardware fault. 54* If there is a signaller flag 2 frames before the signal_ frame, there 55* was a hardware fault; otherwise the condition is associated 56* with the caller of signal_ */ 57 58 do while (sp ^= null); 59 60 if sp -> stack_frame_flags.signaller then return(sp); /* this frame got fault */ 61 62 if sp -> stack_frame_flags.crawl_out 63 then if unspec (sp -> stack_frame.return_ptr) & RETURN_PTR_MASK ^= 64 unspec (sb -> stack_header.unwinder_ptr) & RETURN_PTR_MASK 65 /* flag is also set by unwinder_ */ 66 then return (ptr(sp, rel(sp -> stack_frame.prev_sp))); 67 68 if sig_caller_count = 1 then return (ptr(sp, rel(sp -> stack_frame.next_sp))); 69 /* didn't find signaller frame; must have software condition */ 70 71 else if sig_caller_count = 2 then sig_caller_count = 1; /* must go back one more */ 72 73 else if sp -> stack_frame_flags.signal 74 then sig_caller_count = 2; /* note existence of signal_ frame */ 75 76 if sp -> stack_frame.prev_sp = null then sp = null; /* must special case null */ 77 else sp = ptr(sp, rel(sp -> stack_frame.prev_sp)); /* go look at previous frame */ 78 79 end; 80 81 return (sp); /* no condition frames; return null */ 82 end find_condition_frame_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/86 1033.8 find_condition_frame_.pl1 >special_ldd>install>MR12.0-1206>find_condition_frame_.pl1 25 1 11/03/86 1114.7 stack_frame.incl.pl1 >special_ldd>install>MR12.0-1206>stack_frame.incl.pl1 28 2 11/04/86 1324.3 stack_header.incl.pl1 >special_ldd>install>MR12.0-1206>stack_header.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. RETURN_PTR_MASK 000000 constant bit(72) initial unaligned dcl 1-19 ref 62 62 crawl_out 20(25) based bit(1) level 2 packed unaligned dcl 1-64 ref 62 cu_$stack_frame_ptr 000010 constant entry external dcl 22 ref 33 entry_ptr 26 based pointer level 2 dcl 1-36 ref 44 next_sp 22 based pointer level 2 dcl 1-36 ref 68 null builtin function dcl 23 ref 33 58 76 76 prev_sp 20 based pointer level 2 dcl 1-36 ref 47 62 76 77 ptr builtin function dcl 23 ref 35 47 62 68 77 rel builtin function dcl 23 ref 47 62 68 77 return_ptr 24 based pointer level 2 dcl 1-36 ref 62 sb 000104 automatic pointer dcl 2-24 set ref 35* 44 62 sig_caller_count 000100 automatic fixed bin(17,0) dcl 21 set ref 36* 44* 68 71 71* 73* signal 20(24) based bit(1) level 2 packed unaligned dcl 1-64 ref 73 signal_ptr 30 based pointer level 2 dcl 2-26 ref 44 signaller 20(26) based bit(1) level 2 packed unaligned dcl 1-64 ref 42 60 sp 000102 automatic pointer dcl 1-31 set ref 33* 34* 35 42 44 47* 47 47 58 60 60 62 62 62 62 68 68 73 76 76* 77* 77 77 81 stack_frame based structure level 1 dcl 1-36 stack_frame_flags based structure level 1 dcl 1-64 stack_header based structure level 1 dcl 2-26 startp parameter pointer dcl 20 ref 10 33 34 unwinder_ptr 56 based pointer level 2 dcl 2-26 ref 62 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. TRANSLATOR_ID_ALM internal static bit(18) initial unaligned dcl 1-25 TRANSLATOR_ID_PL1V1 internal static bit(18) initial unaligned dcl 1-26 TRANSLATOR_ID_PL1V2 internal static bit(18) initial unaligned dcl 1-24 TRANSLATOR_ID_SIGNALLER internal static bit(18) initial unaligned dcl 1-28 TRANSLATOR_ID_SIGNAL_CALLER internal static bit(18) initial unaligned dcl 1-27 call_offset internal static fixed bin(17,0) initial dcl 2-78 entry_offset internal static fixed bin(17,0) initial dcl 2-78 push_offset internal static fixed bin(17,0) initial dcl 2-78 return_no_pop_offset internal static fixed bin(17,0) initial dcl 2-78 return_offset internal static fixed bin(17,0) initial dcl 2-78 stack_frame_min_length internal static fixed bin(17,0) initial dcl 1-33 stack_header_overlay based fixed bin(17,0) array dcl 2-94 tv_offset internal static fixed bin(17,0) initial dcl 2-72 NAME DECLARED BY EXPLICIT CONTEXT. find_condition_frame_ 000012 constant entry external dcl 10 NAME DECLARED BY CONTEXT OR IMPLICATION. unspec builtin function ref 62 62 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 216 230 157 226 Length 446 157 12 201 37 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME find_condition_frame_ 74 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME find_condition_frame_ 000100 sig_caller_count find_condition_frame_ 000102 sp find_condition_frame_ 000104 sb find_condition_frame_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as call_ext_out return_mac ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$stack_frame_ptr NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 10 000006 33 000017 34 000033 35 000036 36 000040 42 000041 44 000045 47 000053 58 000056 60 000062 62 000071 68 000115 71 000126 73 000133 76 000140 77 000147 79 000152 81 000153 ----------------------------------------------------------- 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