JPH01118930A - Computer system - Google Patents

Computer system

Info

Publication number
JPH01118930A
JPH01118930A JP62276011A JP27601187A JPH01118930A JP H01118930 A JPH01118930 A JP H01118930A JP 62276011 A JP62276011 A JP 62276011A JP 27601187 A JP27601187 A JP 27601187A JP H01118930 A JPH01118930 A JP H01118930A
Authority
JP
Japan
Prior art keywords
register
stack
control information
storage format
stack control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62276011A
Other languages
Japanese (ja)
Inventor
Ikuo Uchibori
内堀 郁夫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP62276011A priority Critical patent/JPH01118930A/en
Publication of JPH01118930A publication Critical patent/JPH01118930A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To carry out a return instruction at a high speed by realizing the analysis of a register storing form needed for recovery of a register by reference to a stack control information register and without reading a stack frame of a memory. CONSTITUTION:The replacement control is applied to a stack control information register 32 so that the stack control information on the latest stack frame is always held by the register 32. Thus the register holding form needed for recovery of a register carried out with execution of a return instruction can be analyzed by a storing form analyzing part 33 before execution of the return instruction by reference to the register 32. As a result, the return instruction in particular is carried out at a high seed in a subroutine call state.

Description

【発明の詳細な説明】 [発明の目的コ (産業上の利用分野) この発明は、サブルーチンコールの際における特にレジ
スタセットのセーブ/リターン処理に好適な計算機シス
テムにrAする。
DETAILED DESCRIPTION OF THE INVENTION [Objective of the Invention (Industrial Application Field) The present invention provides a computer system particularly suitable for save/return processing of register sets during subroutine calls.

(従来の技術) 一般に、計算機プログラミングにおけるサブルーチンコ
ールの際に、メモリ上に構築されるスタックを用いたレ
ジスタセットのセーブ(SAVE)/リターン(RET
URN)II能が必要とされる。このセーブ/リターン
機能をセーフ (SAVE)命令/リターン(RETU
RN)命令の両機械語命令により実現する計算機システ
ムでは、セーブ命令によりメモリ上に作成されるスタッ
クフレーム内に、レジスタセットと共にレジスタ保存形
式並びにその時点のスタックポインタ(旧スタックポイ
ンタ)を保存しておき、リターン命令ではこれを参照し
てレジスタセットの回復を行なう方式が知られている。
(Prior Art) Generally, when subroutine calls are made in computer programming, register sets are saved (SAVE)/returned (RET) using a stack built on memory.
URN) II capability is required. This save/return function is set to Safe (SAVE) command/Return (RETU).
In a computer system realized by machine language instructions such as the RN) instruction, the register save format and the current stack pointer (old stack pointer) are saved along with the register set in the stack frame created in memory by the save instruction. A method is known in which the register set is restored by referring to this in the return instruction.

この方式の詳細を、第5図に示づように、メモリ10上
に確保されるスタック領域11への保存対象レジスタセ
ット21として15個の汎用レジスタ(GR)22.7
個のペースレジスタ(SR)23および8個の浮動小数
点レジスタ(F R) 24を備えた計算機システムを
例に、176図に示すレジスタ保存形式および第7図(
a)、(b)のフローチャートを参照して以下に説明す
る。
The details of this method are shown in FIG. 5, in which 15 general-purpose registers (GR) 22.
Taking as an example a computer system equipped with eight pace registers (SR) 23 and eight floating point registers (FR) 24, the register storage format shown in FIG.
This will be explained below with reference to the flowcharts a) and (b).

セーブ命令実行時には、まずセーブ命令のオペランドと
して与えられる第6図に示す如きレジスタ保存形式の解
析が行なわれる〈ステップ81)。次に、スタックポイ
ンタレジスタ25に設定されているスタックポインタ(
旧SP)が参照され(ステップS2)、この参照結果と
ステップS1の保存形式解析結果をもとに、スタック領
域11上に上記スタックポインタの指す位置から始まる
スタックフレーム12が作成される(ステップ83〜8
6)。このスタックフレーム12の開始位置から始まる
領域には、第6図に示すレジスタ保存形式で指定された
レジスタ群(R1へR2゜81〜B2.F1〜F2)の
内容が順に保存され、スタックフレーム12の後続領域
には、レジスタ保存形式(を示す情報)並びにスタック
ポインタ(旧SP)から成るtI1111情報(スタッ
ク制御情報)が保存されている。最後に、スタックポイ
ンタレジスタ25が新たなスタックポインタく新SP)
に更新される(ステップ87)。
When a save instruction is executed, first, a register saving format as shown in FIG. 6 given as an operand of the save instruction is analyzed (step 81). Next, the stack pointer (
old SP) is referenced (step S2), and based on this reference result and the storage format analysis result in step S1, a stack frame 12 is created on the stack area 11 starting from the position pointed by the stack pointer (step S83). ~8
6). In the area starting from the start position of the stack frame 12, the contents of the register group (R1 to R2°81 to B2.F1 to F2) specified in the register saving format shown in FIG. 6 are saved in order, and the stack frame 12 In the subsequent area, tI1111 information (stack control information) consisting of (information indicating) a register storage format and a stack pointer (old SP) is stored. Finally, the stack pointer register 25 is set to the new stack pointer (new SP)
(step 87).

次にリターン命令実行時は、まずスタックポインタレジ
スタ25の示すスタックポインタ(rsP)が参照され
る(ステップ511)。そして、新SP参照結果をもと
に、スタックフレーム12からCP U 20内に旧S
P並びにレジスタ保存形式(かう成るスタック制御情報
)が読出され(ステップ512)、まずレジスタ保存形
式の解析が行なわれる(ステップ513)。次にCP 
U 20内に読出した旧SPが参照され(ステップ51
4)、この参照結果とステップ813の保存形式解析結
果をもとに、スタックフレーム12に保存されていたレ
ジスタ群(R1へR2,81〜B2.Fl〜F2)の内
容を元のレジスタに戻すレジスタ回復処理(ステップ8
15〜511)が行なわれる。そしてスタックポインタ
レジスタ25が、ステップ814で参照した旧SPに更
新される(ステップ818)。
Next, when executing a return instruction, the stack pointer (rsP) indicated by the stack pointer register 25 is first referenced (step 511). Then, based on the new SP reference result, the old SP is stored in the CPU 20 from the stack frame 12.
P and the register storage format (stack control information consisting of such) are read out (step 512), and the register storage format is first analyzed (step 513). Next, CP
The old SP read in U 20 is referred to (step 51
4) Based on this reference result and the storage format analysis result in step 813, restore the contents of the register group (R1 to R2, 81 to B2.Fl to F2) stored in the stack frame 12 to the original registers. Register recovery processing (step 8)
15 to 511) are performed. The stack pointer register 25 is then updated to the old SP referenced in step 814 (step 818).

上記したセーブ/リターン命令実行処理は、c p U
 20内に用意されたマイクロプログラム制御機構によ
って行なわれる。
The save/return command execution process described above is performed by c p U
This is done by a microprogram control mechanism provided in 20.

さて、近年は上記のセーブ/リターン命令の実行処理速
度の高速化が要求されている。そのためには、処理の一
部を専用のハードウェアで行なわせる必要がある。しか
し、上記した従来の計算機システムでは、例えばリター
ン命令の実行においてはススタックフレームからCPU
内にスタック制御情報(旧SP、保存形式)を読出し、
しかる優に読出したスタック制御情報に従ってレジスタ
回復が行なわれるため、即ちメモリからの読出し完了を
待ってから次の動作に入るアルゴリズムが適用されるた
め、特にバイブライン方式を適用する計算機システムで
はハードウェア化は困難であり、しかも高速化し難り、
バイブライン方式の特長を十分に生かせないという問題
があった。
Now, in recent years, there has been a demand for faster execution processing speed of the above save/return instructions. To do this, it is necessary to have dedicated hardware perform part of the processing. However, in the conventional computer system described above, for example, when executing a return instruction, the CPU
Read stack control information (old SP, storage format) in
Since register recovery is performed according to the stack control information read out in a timely manner, in other words, an algorithm is applied that waits for the readout from memory to complete before starting the next operation, so especially in computer systems that use the Vibration method, the hardware It is difficult to speed up the process, and it is difficult to speed up the process.
There was a problem in that the features of the Vibrine method could not be fully utilized.

(発明が解決しようとする問題点) 上記したように従来の計算機システムでは、サブルーチ
ンコールの際のリターン命令実行時においては、メモリ
上に作成されたスタックフレームに保存されているスタ
ック制御情報をCPtJ内に読出してから、その制御情
報に従ってレジスタ回復が行なわれるため、特に制御情
報によって示されるレジスタ保存形式の解析処理のため
のハードウェア回路の実現が困難で、且つ高速化し難い
という問題があった。
(Problems to be Solved by the Invention) As described above, in conventional computer systems, when executing a return instruction during a subroutine call, stack control information stored in a stack frame created on memory is Since register recovery is performed according to the control information after reading the data within the register, it is difficult to implement a hardware circuit for analyzing the register storage format indicated by the control information, and it is difficult to increase the speed. .

この発明は上記事情に鑑みてなされたものでその目的は
、サブルーチンコールの際の特にリターン命令の実行処
理の高速化が簡単に図れる計算機システムを提供するこ
とにある。
The present invention has been made in view of the above-mentioned circumstances, and its object is to provide a computer system that can easily speed up the execution of return instructions, especially during subroutine calls.

[発明の構成] (問題点を解決するための手段) この発明は、メモリ上に作成された最新のスタックフレ
ームに保存されているスタック制御情報の写しを保持し
、マイクロプログラムIIJ mによる読出し/1!込
みが可能なスタック制御情報レジスタを設け、サブルー
チンコールの際のセーブ命令実行時には、スタック制御
情報レジスタの内容を最新のスタックフレームに保存さ
れたスタック制師情報で更新すると共にスタックポイン
タレジスタの内容を更新し、リターン命令実行時には、
スタック制御情報レジスタに保持されているスタック制
御情報中のスタックポインタを参照し、同ポインタの示
すスタックフレームに先行するスタックフレームに保存
されているスタック制御情報でスタック制御情報レジス
タを更新するようにしたものである。この発明は更に、
スタック制御211情報レジスタに保持されているスタ
ック制御情報中のレジスタ保存形式を解析し、リターン
命令実行時には、この解析結果をもとにレジスタセット
の回復処理を行なうようにしたものである。
[Structure of the Invention] (Means for Solving the Problems) The present invention retains a copy of stack control information stored in the latest stack frame created on memory, and reads/writes it by the microprogram IIJ m. 1! A stack control information register that can be read is provided, and when a save instruction is executed during a subroutine call, the contents of the stack control information register are updated with the stack structure information saved in the latest stack frame, and the contents of the stack pointer register are also updated. When updating and executing the return command,
The stack pointer in the stack control information held in the stack control information register is referenced, and the stack control information register is updated with the stack control information saved in the stack frame that precedes the stack frame pointed to by the stack pointer. It is something. This invention further includes:
The register storage format in the stack control information held in the stack control 211 information register is analyzed, and when a return instruction is executed, the register set is restored based on the analysis result.

(作用) 上記の構成によれば、スタック制御情報レジスタには常
に最新のスタック制御情報が保持されるので、このスタ
ック制御情報レジスタを参照することにより、レジスタ
セット回復処理に必要なレジスタ保存形式の解析をリタ
ーン命令実行前に行なうことが可能となり、サブルーチ
ンコールの際の特にリターン命令の実行速度が向上覆る
(Operation) According to the above configuration, the latest stack control information is always held in the stack control information register, so by referring to this stack control information register, the register storage format required for register set recovery processing can be changed. It becomes possible to perform the analysis before executing the return instruction, which improves the execution speed of the return instruction, especially when calling a subroutine.

(実施例) 第1図はこの発明の一実施例に係る計算機システムのブ
ロック構成を示す。なお、第5図と同一部分には同一符
号を付して詳細な説明を省略する。第1図において、1
21 、12Jはメモリ10上に確保されるスタック領
域11に作成されるスタックフレーム、30はCPUで
ある。CP U 30は、第5図のCP jJ 20と
同様にレジスタセット21およびスタックポインタレジ
スタ25を有している。
(Embodiment) FIG. 1 shows a block configuration of a computer system according to an embodiment of the present invention. Note that the same parts as in FIG. 5 are given the same reference numerals and detailed explanations are omitted. In Figure 1, 1
21 and 12J are stack frames created in the stack area 11 secured on the memory 10, and 30 is a CPU. CPU 30 has a register set 21 and a stack pointer register 25, similar to CP jJ 20 in FIG.

CP LJ 30は更に、機械語命令の実行制御をマイ
クロプログラムにより行なうマイクロプログラムシ1ノ
御部31、スタック領域11上の最新のスタックフレー
ム(tXsI図ではスタックフレーム12j)に保存さ
れているスタック制御情報の写しを保持するスタック制
t11情報レジスタ32、および同レジスタ32に保持
されているスタック制御情報中のレジスタ保存形式の解
析を行なう保存形式解析部33を有している。この保存
形式解析部33の解析結果はマイクロプログラム制御部
31によるリターン命令実行時のレジスタ回復処理に用
いられるようになっている。
The CP LJ 30 further includes a microprogram controller 31 that controls the execution of machine language instructions using a microprogram, and a stack control unit 31 that controls the execution of machine language instructions using a microprogram, and a stack control unit 31 that controls the execution of machine language instructions, which is stored in the latest stack frame on the stack area 11 (stack frame 12j in the tXsI diagram). It has a stacked T11 information register 32 that holds a copy of information, and a storage format analysis section 33 that analyzes the register storage format in the stack control information held in the register 32. The analysis result of the storage format analysis section 33 is used for register recovery processing when the microprogram control section 31 executes a return instruction.

次に、第1図の構成の動作を、第2図(a)のセーブ命
令実行処理手順を示すフローチャート、第2図(b)の
リターン命令実行処理手順を示づフローチャート、第3
図のセーブ命令実行時のデータフロー説明図、および第
4図のリターン命令実行時のデータフロー説明図を適宜
参照して説明づる。
Next, the operation of the configuration shown in FIG. 1 will be explained by the flowchart shown in FIG. 2(a) showing the save instruction execution processing procedure, the flowchart showing the return instruction execution processing procedure in FIG.
The explanation will be given with appropriate reference to the data flow explanatory diagram when the save command is executed in the figure and the data flow explanatory diagram when the return command is executed in FIG.

まず、サブルーチンコールの際におけるセーブ命令実行
時には、CP U 30内のマイクロプログラム制御部
31の制御によって、第7図(a)に示したフローチャ
ートのステップ81〜S6と同様の処理が行なわれる。
First, when a save instruction is executed during a subroutine call, the microprogram control section 31 in the CPU 30 controls the same processing as steps 81 to S6 in the flowchart shown in FIG. 7(a).

即ち、セーブ命令のオペランドとして与えられる第6図
に示す如きレジスタ保存形式の解析が行なわれ(ステッ
プ821) 、L。
That is, the register save format shown in FIG. 6 given as the operand of the save instruction is analyzed (step 821), and L.

かる後にスタックポインタレジスタ25に設定されてい
るスタックポインタ(旧SP)が参照され(ステップ5
22)、この参照結果とステップ821の保存形式解析
結果をもとに、第3図に示すようにスタック領域11上
に、上記スタックポインタの指す位置から始まる最新の
スタックフレーム12kが作成される(ステップ823
〜826)。このスタックフレーム12にの開始位置か
ら始まる領域には、セーブ命令によって与えられたレジ
スタ保存形式で指定されたレジスタセット21内のレジ
スタ群の内容が、第3図において符号A1に示すように
保存され、スタックフレーム12にの後続領域(斜線部
)には、上記レジスタ保存形式(を示す情報)並びに上
記スタックポインタ(旧SP)から成るスタック制御情
報が、第3図において符号A2で示すように保存されて
いる。
After that, the stack pointer (old SP) set in the stack pointer register 25 is referenced (step 5).
22) Based on this reference result and the storage format analysis result in step 821, the latest stack frame 12k is created on the stack area 11, starting from the position pointed to by the stack pointer, as shown in FIG. Step 823
~826). In the area starting from the start position of this stack frame 12, the contents of the register group in the register set 21 specified by the register save format given by the save instruction are saved as shown by reference numeral A1 in FIG. , in the subsequent area (hatched area) of the stack frame 12, stack control information consisting of the register storage format (information indicating) and the stack pointer (old SP) is stored as shown by reference numeral A2 in FIG. has been done.

レジスタ群およびスタック制御情報が保存された最新の
スタックフレーム12kが作成されると、スタック制御
情報レジスタ32の内容が、第3図iこおいて符号A3
で示すように、最新スタックフレーム12kに保存され
たスタック制御情報に更新される(ステップ527)。
When the latest stack frame 12k in which the register group and stack control information are saved is created, the contents of the stack control information register 32 are changed to A3 in FIG.
As shown in (step 527), the stack control information is updated to the one stored in the latest stack frame 12k.

即ち、スタック制御情報レジスタ32が最新のスタック
制御情報で更新される。この更新動作を、ハードウェア
回路により行なうことも可能である。ステップ827が
終了すると、スタックポインタレジスタ25が、第7図
のステップS7と同様に新たなスタックポインタ(新S
P’)に更新される(ステップ828)。
That is, the stack control information register 32 is updated with the latest stack control information. This updating operation can also be performed by a hardware circuit. When step 827 is completed, the stack pointer register 25 stores a new stack pointer (new S
P') (step 828).

次にリターン命令実行時の動作を説明する。Next, the operation when executing a return instruction will be explained.

まず、スタック制御情報レジスタ32には保存形式解析
部33が接続されている。保存形式解析部33は、スタ
ック制御情報レジスタ32に設定されている最新のスタ
ック制御情報(ここではスタックフレーム12kに保存
されているスタック制御情報と同一の情報)中のレジス
タ保存形式(を示す情報)をもとに、その解析を行ない
(ステップ831)、保存対象となるレジスタ種類別(
ここでは第5図に示す汎用レジスタ22、ペースレジス
タ23、浮動小数点レジスタ24の3種)に、レジスタ
番号並びにレジスタの数に分解する。このレジスタ保存
形式解析処理は、リターン命令実行に無関係に、即ちマ
イクロプログラム制御部31のセーブ命令実行制御動作
とは独立に行なわれる。そしてレジスタ保存形式の解析
結果は、例えばリターン命令実行開始時に保存形式解析
部33内の図示せぬレジスタに保持され、同レジスタを
介してマイクロプログラム制御部31に供給される。し
たがって、マイクロプログラム制御部31は、リターン
命令実行時において従来のようにレジスタ保存形式をス
タックフレームから読出し、しかる後にレジスタ保存形
式の解析処理を行なうといった手続きを必要とすること
なく、レジスタ回復処理の制御を行なうことが可能とな
る。
First, a storage format analysis section 33 is connected to the stack control information register 32 . The storage format analysis unit 33 extracts information indicating the register storage format (in this case, the same information as the stack control information stored in the stack frame 12k) of the latest stack control information set in the stack control information register 32. ), the analysis is performed (step 831), and the register type to be saved (
Here, it is broken down into three types (general-purpose register 22, pace register 23, and floating-point register 24 shown in FIG. 5), register numbers, and the number of registers. This register save format analysis process is performed independently of the return instruction execution, that is, independent of the save instruction execution control operation of the microprogram control section 31. The analysis result of the register storage format is held in a register (not shown) in the storage format analysis section 33, for example, at the start of execution of a return instruction, and is supplied to the microprogram control section 31 via the same register. Therefore, when executing a return instruction, the microprogram control unit 31 can perform register recovery processing without requiring the conventional procedure of reading the register saving format from the stack frame and then performing register saving format analysis processing. It becomes possible to perform control.

さて、リターン命令の実行は、第2図(b)のステップ
832に示すように、スタック制御情報レジスタ32に
設定されているスタックυ制御情報中のスタックポイン
タ(旧SP)を参照することにより開始される。次に、
ステップ832で参照した旧SPをもとに、この旧SP
の指すスタック領域11内スタツクフレーム12kに先
行するスタックフレーム12Jの最終領域(斜線部)に
保存されているスタック制御情報がCP Ll 30内
に読出され、スタック制御情報レジスタ32の内容が、
第4図において符号B1で示すようにスタックフレーム
12jからのスタック制御情報に更新される(ステップ
533)。
Now, the execution of the return instruction is started by referring to the stack pointer (old SP) in the stack υ control information set in the stack control information register 32, as shown in step 832 in FIG. 2(b). be done. next,
Based on the old SP referenced in step 832, this old SP
The stack control information stored in the last area (hatched area) of the stack frame 12J preceding the stack frame 12k in the stack area 11 pointed to by is read into the CP Ll 30, and the contents of the stack control information register 32 are
As indicated by reference numeral B1 in FIG. 4, the stack control information is updated to the stack control information from the stack frame 12j (step 533).

ステップ833が終了すると、ステップ832の旧SP
参照結果と、保存形式解析部33から供給されているス
タックフレーム12kに関するレジスタ保存形式の解析
結果をもとに、旧SPの指すスタック領域11内スタツ
クフレーム12kに保存されていたレジスタ群の内容を
、第4図において符号B2で示すようにレジスタセット
21(内の元のレジスタ)に戻すレジスタ回復処理(ス
テップ834〜836)が行なわれる。この回復処理に
必要なしラスタ保存形式解析は、上記しl:ようにリタ
ーン命令実行以前に保存形式解析部33において行なわ
れ、リターン命令実行中に行なう必要がないため、リタ
ーン命令の実行処理時間が短縮する。特に、パイプライ
ン方式の計算機システムでは、続出すべきスタック領域
11の、メモリ10上のアドレスが先取り可能であるた
め、更に時間短縮可能となる。
When step 833 is completed, the old SP of step 832
Based on the reference result and the analysis result of the register storage format for the stack frame 12k supplied from the storage format analysis unit 33, the contents of the register group stored in the stack frame 12k in the stack area 11 pointed to by the old SP are determined. A register recovery process (steps 834 to 836) is performed to return the data to the register set 21 (original registers) as shown by reference numeral B2 in FIG. The raster storage format analysis, which is not necessary for this recovery process, is performed in the storage format analysis unit 33 before executing the return instruction as described above, and does not need to be performed during the execution of the return instruction, so the execution processing time of the return instruction is Shorten. In particular, in a pipelined computer system, the addresses on the memory 10 of the stack area 11 to be successively created can be pre-fetched, making it possible to further reduce the time.

レジスタ回復処理が終了すると、スタックポインタレジ
スタ25が、ステップ832で参照した旧SPに更新さ
れる(ステップ537)。
When the register recovery process is completed, the stack pointer register 25 is updated to the old SP referenced in step 832 (step 537).

上記したように、この実施例では、リターン命令実行に
よるレジスタ回復処理に必要なレジスタ保存形式の解析
が、保存形式解析部33によってリターン命令実行以前
に行なわれることを可能とするために、スタック制御情
報レジスタ32に常に最新のスタックフレームのスタッ
ク制御情報が保持されるように同レジスタ32の更新制
御を行なっている。しかし、ソフトウェアの要求によっ
て(サブルーチンコールとは別に)スタックフレーム或
はスタックポインタの店替えが行なわれた場合には、ス
タック制御情報レジスタ32に最新のスタックフレーム
のスタックυ1111情報を保持することが困難となる
。そこで、ここでは、スタック制抑情報レジスタを操作
するためのスタック制御情報レジスタ操作命令(殿械詔
命令)を用意し、同命令の実行によってもスタック制御
情報レジスタ32の更新動作が行なわれるようにしてい
る。
As described above, in this embodiment, in order to enable the storage format analysis unit 33 to analyze the register storage format necessary for register recovery processing by executing the return instruction, the stack control Update control of the information register 32 is performed so that the stack control information of the latest stack frame is always held in the information register 32. However, if the stack frame or stack pointer is changed due to a software request (separately from a subroutine call), it is difficult to retain the stack υ1111 information of the latest stack frame in the stack control information register 32. becomes. Therefore, here, a stack control information register operation instruction (master edict instruction) for operating the stack suppression information register is prepared, and the stack control information register 32 is updated by executing this instruction. ing.

なお、前記実施例では、レジスタ保存処理に必要なレジ
スタ保存形式の解析がマイクロプログラム処理により行
なわれるものとして説明したが、この解析処理を保存形
式解析部33によって行なわせることも可能である。ま
た、前記実施例では、レジスタ回復処理に必要なレジス
タ保存形式の解析が、リターン命令実行以前に保存形式
解析部33によって行なわれる場合について説明したが
、スタック制御情報レジスタ32に保持されている最新
のスタックフレームのスタックυJt[l情報をもとに
レジスタ保存形式の解析を行なうのであれば(即ちメモ
リ10からスタック制御情報を読出さずにレジスタ保存
形式の解析を行なうのであれば)、■リターン命令実行
開始後に行なわれても、或は■パイプライン方式の計算
別システムにおいては、マイクロプログラム処理で解析
が行なわれても(続出すべきスタック領域11の、メモ
リ10上のアドレスが先取り可能であることによる)構
わない。
In the above embodiment, the analysis of the register storage format necessary for register storage processing is performed by microprogram processing, but it is also possible to have the storage format analysis section 33 perform this analysis processing. Furthermore, in the embodiment described above, the case where the analysis of the register storage format necessary for register recovery processing is performed by the storage format analysis unit 33 before executing the return instruction is explained. If the register storage format is analyzed based on the stack υJt[l information of the stack frame of (that is, the register storage format is analyzed without reading the stack control information from the memory 10), ■Return Even if it is performed after the start of instruction execution, or even if analysis is performed by microprogram processing in a pipelined calculation-specific system (the address in the memory 10 of the stack area 11 to be continuously generated can be prefetched). (depending on the matter) I don't care.

但し、上記■の場合の従来例に対するリターン命令大行
処理時間の短縮度合いは、前記実施例より小さくなり、
■の場合には■より更に小さくなる。
However, in the above case (■), the degree of reduction in the return instruction large line processing time compared to the conventional example is smaller than that of the above embodiment,
In the case of ■, it becomes even smaller than ■.

[発明の効果] 以上詳述したようにこの発明によれば、サブルーチンコ
ールの際の特にリターン命令の実行で行なわれるレジス
タ回復処理に必要なレジスタ保存形式の解析が、スタッ
ク制御情報レジスタを参照することにより、従来のよう
にメモリ上に作成されたスタックフレームからの読出し
必要とせずに行なえるので、リターン命令実行処理の高
速化が簡単に図れ、特にバイブライン方式の計算−シス
テムでは効果が大きい。また、レジスタ保存解析手段等
のハードウェア化が容易となり、この場合にはリターン
命令実行以前にレジスタ保存形式の解析を行なうことが
可能となるので、−層の高速化が図れる。
[Effects of the Invention] As detailed above, according to the present invention, the analysis of the register saving format required for the register recovery processing performed during subroutine calls, especially when executing a return instruction, refers to the stack control information register. This allows the return instruction to be executed without the need for reading from the stack frame created in memory as in the past, making it easy to speed up the return instruction execution process, which is particularly effective in Vibration-based calculation systems. . Further, it is easy to implement the register storage analysis means in hardware, and in this case, it is possible to analyze the register storage format before executing the return instruction, so that the speed of the − layer can be increased.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例に係る計算−システムのブ
ロック構成図、第2図は第1図のシステムにおけるセー
ブ/リターン命令実行手順を示すフローチャート、第3
図はセーブ命令実行時のデータフローを説明する図、第
4図はリターン命令実行時のデータフローを説明する図
、第5図は従来例を示すブロック構成図、第6図はレジ
スタ保存形式を示す図、第7図は従来のセーブ/リター
ン命令実行手順を示すフローチャートである。 10・・・メモリ、11・・・スタック領域、12.1
2i〜12k・・・スタックフレーム、20.30・・
・CPU121・・・レジスタセット、25・・・スタ
ックポインタレジスタ、31・・・マイクロプログラム
制御部、32・・・スタック制御情報レジスタ、33・
・・保存形式解析部。 出願人代理人 弁理士 鈴江武彦 ベr1     区n    区) べr′1    区)    区)
FIG. 1 is a block diagram of a calculation system according to an embodiment of the present invention, FIG. 2 is a flowchart showing the save/return command execution procedure in the system of FIG. 1, and FIG.
Figure 4 is a diagram explaining the data flow when executing a save instruction, Figure 4 is a diagram explaining the data flow when executing a return instruction, Figure 5 is a block diagram showing a conventional example, and Figure 6 is a diagram explaining the register saving format. FIG. 7 is a flowchart showing a conventional save/return instruction execution procedure. 10...Memory, 11...Stack area, 12.1
2i to 12k... stack frame, 20.30...
・CPU 121...Register set, 25...Stack pointer register, 31...Microprogram control unit, 32...Stack control information register, 33.
...Storage format analysis section. Applicant's agent Patent attorney Takehiko Suzue

Claims (3)

【特許請求の範囲】[Claims] (1)サブルーチンコールの際にセーブ命令を実行し、
メモリ上に、スタックポインタレジスタに設定されてい
るスタックポインタの示す位置から始まりレジスタセッ
トの内容および上記セーブ命令で指定されるレジスタ保
存形式並びにその時点の上記スタックポインタを有する
スタック制御情報が保存されたスタックフレームを生成
し、リターン時にはリターン命令を実行し、上記スタッ
クフレームに保存したレジスタセットの内容を用いてレ
ジスタセット回復処理を行なうマイクロプログラム制御
方式の計算機システムにおいて、最新の上記スタックフ
レームに保存されている上記スタック制御情報の写しを
保持し、マイクロプログラム制御による読出し/書込み
が可能なスタック制御情報レジスタと、 上記セーブ命令の実行時に、上記スタック制御情報レジ
スタの内容を最新の上記スタックフレームに保存された
上記スタック制御情報で更新し、且つ上記スタックポイ
ンタレジスタの内容を更新する第1更新手段と、 上記リターン命令の実行時に、上記スタック制御情報レ
ジスタに保持されている上記スタック制御情報中のスタ
ックポインタを参照し、同ポインタの示す上記スタック
フレームに先行するスタックフレームに保存されている
スタック制御情報で上記スタック制御情報レジスタを更
新する第2更新手段と、 上記スタック制御情報レジスタに保持されている上記ス
タック制御情報中の上記レジスタ保存形式を解析する保
存形式解析手段と、 上記リターン命令の実行時に、上記保存形式解析手段の
解析結果をもとに上記レジスタセット回復処理を行なう
回復手段と、 を具備することを特徴とする計算機システム。
(1) Execute a save instruction when calling a subroutine,
The contents of the register set starting from the position indicated by the stack pointer set in the stack pointer register, the register save format specified by the above save instruction, and the stack control information having the above stack pointer at that time are saved in the memory. In a microprogram control computer system that generates a stack frame, executes a return instruction upon return, and performs register set recovery processing using the contents of the register set saved in the stack frame, the most recent one saved in the stack frame is A stack control information register that holds a copy of the above stack control information that is stored and can be read/written by microprogram control, and a stack control information register that stores the contents of the above stack control information register in the latest stack frame when the above save instruction is executed. a first updating means for updating the stack control information stored in the stack control information and updating the contents of the stack pointer register; a second updating means for referencing a pointer and updating the stack control information register with stack control information stored in a stack frame preceding the stack frame indicated by the pointer; a storage format analysis means for analyzing the register storage format in the stack control information; and a recovery means for performing the register set recovery processing based on the analysis result of the storage format analysis means when executing the return instruction. A computer system comprising:
(2)上記保存形式解析手段は、上記リターン命令の実
行前に上記レジスタ保存形式の解析を行なうことを特徴
とする特許請求の範囲第1項記載の計算機システム。
(2) The computer system according to claim 1, wherein the storage format analysis means analyzes the register storage format before executing the return instruction.
(3)上記スタック制御情報レジスタをサブルーチンコ
ールとは無関係に操作するスタック制御情報レジスタ操
作手段を更に備えていることを特徴とする特許請求の範
囲第1項または第2項記載の計算機システム。
(3) The computer system according to claim 1 or 2, further comprising stack control information register operating means for operating the stack control information register independently of subroutine calls.
JP62276011A 1987-10-31 1987-10-31 Computer system Pending JPH01118930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62276011A JPH01118930A (en) 1987-10-31 1987-10-31 Computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62276011A JPH01118930A (en) 1987-10-31 1987-10-31 Computer system

Publications (1)

Publication Number Publication Date
JPH01118930A true JPH01118930A (en) 1989-05-11

Family

ID=17563540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62276011A Pending JPH01118930A (en) 1987-10-31 1987-10-31 Computer system

Country Status (1)

Country Link
JP (1) JPH01118930A (en)

Similar Documents

Publication Publication Date Title
JPH0437927A (en) Processor processing method
JP2560988B2 (en) Information processing apparatus and processing method
JPH10214203A (en) Information processor
JPH01118930A (en) Computer system
JP2715988B2 (en) Program simulator device and program debugging method
JP2552738B2 (en) Data processing device
JP2743860B2 (en) User program debug processing system
JPS60178539A (en) By-pass control system of information processor
JPH03216743A (en) Parallel saving system for data base
JP2568708B2 (en) How to update the double link queue
JP2927102B2 (en) Instruction string switching method and arithmetic processor using the same
JPH0535499A (en) Data processing device and method
JPH04167146A (en) Address tracing system for information processor
JPS58215779A (en) Data processor
JPH0259829A (en) Microcomputer
JPH0421028A (en) Register managing method
JPH03255547A (en) Memory dump output system
JPH03119424A (en) Information processing system and its device
JPH01300352A (en) Dump area instruction control system
JPH06168079A (en) Data backup system
US20040019880A1 (en) Write-through caching a java local variable within a register of a register bank
JPH0844570A (en) System and method for program execution
JPH01195533A (en) Control system for instruction pre-reading direction of pipeline system computer
JPH0454548A (en) Memory check system for computer system
JPS62237533A (en) Data processor