Data processing method and apparatus using occupancy indications to reserve storage space for a stack
摘要:
While executing program code arranged in nested blocks, a data processing system accumulates words in a stack storage means comprising a pair of registers coupled to an arithmetic unit and supplying thereto operands for processing; a plurality of memory locations in a relatively large-capacity, low-speed memory; and a relatively small-capacity, high-speed memory having a plurality of addressable extension locations. Register means are set to associate the extension locations in one-to-one correspondence with a group of memory locations so as to define corresponding pairs of locations. Each pair is reserved for storing a different stack word and has four occupancy conditions. Before the actual accumulation of the stack word for which the pair is reserved, the pair is in a first condition wherein both locations of the pair are unoccupied. After actual accumulation, the pair is either in a second condition wherein only the extension is occupied, or in a third condition wherein only the memory location is occupied, or in a fourth condition wherein both locations are occupied. Preferably each extension location has occupied and copy indicating storage cells having four states each indicating one of the four possible conditions. Stack words forming the record of execution of a first program block are initially accumulated in the extension locations. When a second program block nested within the first program block is entered the record of execution of the first block is transferred to the presently corresponding memory locations and then the associating register means is set to associate the extension registers with a different group of memory locations so that the extension locations are available to store stack words for the second block. The stack includes a linked list of control words containing stack depth information indicating the number of stack words accumulated in executing each block. Upon a transfer of control from the second block back to the first block the stack depth information is used to set the associating register means so that the required number of extension locations are again reserved for storing the previously accumulated record of execution of the first block. Instead of indiscriminately transferring the record of execution of the first block back to such reserved extension locations, the occupancy and copy indicating storage cells for each such reserved extension location are set to indicate that only the respective memory location is occupied. Thus upon a further transfer of control to another block, the occupancy and copy indicating storage cells provide information used to eliminate unnecessary transfers of words to memory locations already storing the proper words.
信息查询
0/0