JPH04245333A - Information processor - Google Patents

Information processor

Info

Publication number
JPH04245333A
JPH04245333A JP988391A JP988391A JPH04245333A JP H04245333 A JPH04245333 A JP H04245333A JP 988391 A JP988391 A JP 988391A JP 988391 A JP988391 A JP 988391A JP H04245333 A JPH04245333 A JP H04245333A
Authority
JP
Japan
Prior art keywords
register
instruction
window
storage means
register window
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
JP988391A
Other languages
Japanese (ja)
Inventor
Shiro Yoshioka
志郎 吉岡
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP988391A priority Critical patent/JPH04245333A/en
Publication of JPH04245333A publication Critical patent/JPH04245333A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute an instruction right after an instruction, which switches register windows, in parallel by an information processor which has plural window registers. CONSTITUTION:For example, a window register which is currently used is W7, its value is inputted to a signal 14, and one of four instructions 12a-12d, i.e., 12b is an instruction which switches a register window to W7. A control means 11a outputs the value W0 of the signal 14 to a signal 13a since the instruction 12a is not the instruction for switching the register window, but a control means 11b outputs the signal 13a to W7 since the instruction 12b is the switching instruction. Consequently, the instruction, and register window signals W0, W7, W7, and W7 are fetched by instruction fetching means 10a-10d to know for which register window the respective instructions are executed at the stage of the fetch, so that the four instructions are executed in parallel.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、命令によってレジスタ
を切り替える機能を有する情報処理装置に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus having a function of switching registers according to instructions.

【0002】0002

【従来の技術】縮小命令セット型ア−キテクチャをとる
従来の情報処理装置は、命令は32ビット固定長で、演
算はレジスタ間の演算のみを行う。また、8つのレジス
タウィンドウW7, W6,..,W0をもち、どれか
1つのレジスタウィンドウを使用する。それぞれのレジ
スタウィンドウは32本の32ビットレジスタから成り
、8本のグロ−バルレジスタ、8本のロ−カルレジスタ
、8本の入力レジスタ、8本の出力レジスタで構成され
る。グロ−バルレジスタはすべてのレジスタウィンドウ
に共通である。また、レジスタウィンドウはリング状に
時計回りにW7, W6,..,W0と並ぶが、出力レ
ジスタは右隣のレジスタウィンドウの入力レジスタと共
通である。たとえば、レジスタウィンドウW0の出力レ
ジスタとレジスタウィンドウW7の入力レジスタとは共
通である。手続きを呼び出すとき、save命令を実行
して、使用するレジスタウィンドウを右隣のレジスタウ
ィンドウへ切り替える。同様に、手続きから戻るとき、
restore 命令を実行して、左隣のレジスタウィ
ンドウへ切り替える。また、save/restore
命令は切り替える前のレジスタウィンドウのレジスタ間
のデ−タを加算し、結果を切り替えた後のレジスタウィ
ンドウに書き込む。
2. Description of the Related Art In a conventional information processing apparatus having a reduced instruction set architecture, instructions have a fixed length of 32 bits and operations are performed only between registers. Also, eight register windows W7, W6, . .. , W0, and uses any one register window. Each register window consists of 32 32-bit registers: 8 global registers, 8 local registers, 8 input registers, and 8 output registers. Global registers are common to all register windows. The register window is arranged clockwise in a ring shape such as W7, W6, . .. , W0, but the output register is the same as the input register of the register window on the right. For example, the output register of register window W0 and the input register of register window W7 are common. When calling the procedure, execute the save instruction and switch the register window to be used to the register window on the right. Similarly, when returning from a procedure,
Execute the restore command and switch to the register window on the left. Also, save/restore
The instruction adds data between registers in the register window before switching, and writes the result to the register window after switching.

【0003】ここで、かりにレジスタウィンドウW7か
ら使用し始めるとする。restore 命令を一切実
行しないで7回save命令を実行すると、レジスタウ
ィンドウW0を使用することになるが、レジスタウィン
ドウW7の入力レジスタおよびロ−カルレジスタの内容
をメモリのスタック領域に退避しなければならなくなる
。この状態をオ−バ−フロ−と呼ぶ。これは、上述した
ように、レジスタウィンドウW0の出力レジスタとレジ
スタウィンドウW7の入力レジスタとが共通であり、レ
ジスタウィンドウW0の出力レジスタへの書き込みによ
って、レジスタウィンドウW7の入力レジスタの内容を
破壊しないようにするためである。オ−バ−フロ−の例
外が発生すると、CPUは例外処理に移り、ソフトウェ
アの実行によってレジスタウィンドウW7の入力レジス
タおよびロ−カルレジスタの内容をメモリのスタック領
域に退避する。
[0003] Now, suppose that we start using the register window W7. If the save instruction is executed seven times without executing any restore instructions, register window W0 will be used, but the contents of the input registers and local registers in register window W7 must be saved to the stack area of memory. It disappears. This state is called overflow. This is because, as mentioned above, the output register of register window W0 and the input register of register window W7 are common, and writing to the output register of register window W0 does not destroy the contents of the input register of register window W7. This is to make it happen. When an overflow exception occurs, the CPU shifts to exception processing and saves the contents of the input register and local register in the register window W7 to the stack area of the memory by executing software.

【0004】オ−バ−フロ−の例外処理が終わった後、
save命令を一切実行しないで7回restore 
命令を実行すると、レジスタウィンドウW7を使用する
ことになるが、レジスタウィンドウW7の内容をメモリ
のスタック領域から復帰しなければならなくなる。この
状態をアンダ−フロ−と呼ぶ。アンダ−フロ−の例外が
発生すると、CPUは例外処理に移り、ソフトウェアの
実行によってメモリのスタック領域からレジスタウィン
ドウW7の入力レジスタおよびロ−カルレジスタの内容
をもってくる。
[0004] After overflow exception handling is completed,
Restore 7 times without executing any save commands
When the instruction is executed, the register window W7 is used, but the contents of the register window W7 must be restored from the stack area of the memory. This state is called underflow. When an underflow exception occurs, the CPU moves to exception processing, and the contents of the input register and local register of the register window W7 are fetched from the stack area of the memory by executing software.

【0005】[0005]

【発明が解決しようとする課題】従来の情報処理装置は
、現在使用中のレジスタウィンドウを1つ指定する。 したがって、save/restore命令に後続の命
令は、save/restore命令の実行後でなけれ
ば実行できない。save/restore命令とsa
ve/restore命令との間にある複数命令だけの
並列実行は可能だが、上述の理由からsave/res
tore命令の前後の命令を並列に実行することはでき
ない。
A conventional information processing apparatus specifies one register window currently in use. Therefore, the instruction following the save/restore instruction can only be executed after the save/restore instruction is executed. save/restore command and sa
It is possible to execute multiple instructions in parallel between the ve/restore instruction, but for the reasons mentioned above, the save/restore instruction
Instructions before and after the tore instruction cannot be executed in parallel.

【0006】またウィンドウレジスタのアンダ−フロ−
、オ−バ−フロ−が起こると、CPUは例外処理に入り
、ソフトウェアの実行によってレジスタウィンドウの値
をメモリのスタック領域へ退避したり、メモリのスタッ
ク領域からレジスタウィンドウの値を復帰したりする。 したがって、この例外処理の間は、CPUは次の命令を
実行できない。
[0006] Also, the underflow of the window register
When an overflow occurs, the CPU enters exception handling, and executes software to save the register window value to the memory stack area and restore the register window value from the memory stack area. . Therefore, during this exception handling, the CPU cannot execute the next instruction.

【0007】本発明は上記問題を解決するもので、sa
ve/restore命令を含む複数の命令を並列に実
行することが可能であり、また、ウィンドウレジスタの
オ−バ−フロ−およびアンダ−フロ−を起こさないよう
にすることができる情報処理装置を提供することを目的
とするものである。
[0007] The present invention solves the above problems, and
Provided is an information processing device that can execute multiple instructions including ve/restore instructions in parallel, and can prevent window register overflow and underflow from occurring. The purpose is to

【0008】[0008]

【課題を解決するための手段】上記課題を解決するため
に本発明の情報処理装置は、複数のレジスタウィンドウ
を備え、前記レジスタウィンドウを切り替える切り替え
命令を1種類以上有し、複数の命令が入力され、前記複
数の命令の入力以前に入力されていた命令全てが実行終
了した時点で使用されているレジスタウィンドウの番号
が入力され前記切り替え命令および種類を検出し前記複
数の命令個々に対し使用するレジスタウィンドウの番号
を生成する複数の制御手段と、前記制御手段の生成した
前記レジスタウィンドウ番号および前記命令をフェッチ
する命令フェッチ手段とを備えたものである。
[Means for Solving the Problems] In order to solve the above problems, an information processing device of the present invention includes a plurality of register windows, has one or more types of switching instructions for switching the register windows, and has a plurality of instructions inputted. The number of the register window that is being used at the time when all the instructions that were input before the input of the plurality of instructions have finished execution is input, the switching instruction and type are detected, and the number is used for each of the plurality of instructions. The apparatus includes a plurality of control means for generating register window numbers, and an instruction fetch means for fetching the register window number and the instruction generated by the control means.

【0009】また本発明の情報処理装置は、スタックポ
インタを記憶している複数のレジスタウィンドウと、複
数のレジスタから成り前記レジスタウィンドウの値を一
時的に保持する補助レジスタ群と、前記レジスタウィン
ドウの値を退避させるためのメモリと、前記レジスタウ
ィンドウのウィンドウ番号を保持する第1の記憶手段と
、前記レジスタウィンドウのオ−バ−フロ−とアンダ−
フロ−の例外を発生するウィンドウ番号を保持する第2
の記憶手段と、前記レジスタウィンドウから前記補助レ
ジスタ群へデ−タを転送しスタックポインタを生成する
第1のデ−タ転送手段と、前記補助レジスタ群から前記
メモリへデ−タを転送する第2のデ−タ転送手段と、前
記メモリから前記レジスタウィンドウへデ−タを転送す
る第3のデ−タ転送手段とを有し、前記レジスタウィン
ドウを切り替える命令として、手続きを呼び出すときに
用いられる命令Aと手続きから戻るときに用いられる命
令Bとを備え、命令Aを2回実行したときに、前記第2
の記憶手段に保持されたウィンドウ番号のレジスタウィ
ンドウ(たとえばW0とする)に切り替わるような状態
で、命令Aを実行すると、前記第1のデ−タ転送手段が
前記第2の記憶手段に保持されたウィンドウ番号(W0
) で命令Aを実行したとき切り替わるレジスタウィン
ドウ(W7) の全てまたは一部の内容およびスタック
ポインタを前記補助レジスタ群に転送し、さらに命令A
を実行すると、前記第2のデ−タ転送手段が前記第2の
記憶手段の値(W0) を前記第2の記憶手段に保持さ
れたウィンドウ番号(W0) で命令Aを実行したとき
切り替わるウィンドウ番号(W7)に書き換え、前記第
2のデ−タ転送手段が前記補助レジスタ群の内容を前記
補助レジスタ群に格納されたスタックポインタを用いて
前記メモリに転送するように制御するとともに命令Bを
2回実行したときに、第2の記憶手段に保持されたウィ
ンドウ番号のレジスタウィンドウ(たとえばW7とする
) に切り替わるような状態で、命令Bを実行すると、
前記第1のデ−タ転送手段が前記第1の記憶手段に保持
されたウィンドウ番号(W6)を用いてレジスタウィン
ドウ(W6) の値を読み込んでスタックポインタを前
記第3のデ−タ転送手段へ転送し、前記第3のデ−タ転
送手段が前記第2の記憶手段に保持されたウィンドウ番
号(W7)のレジスタウィンドウ(W7)の全てまたは
一部の内容を前記メモリからレジスタウィンドウ(W7
)に転送し、さらに命令Bを実行すると、前記第3のデ
−タ転送手段が前記第2の記憶手段の値(W7)を前記
第2の記憶手段に保持されたウィンドウ番号(W7)で
命令Bを実行したとき切り替わるウィンドウ番号(W0
)に書き換えるように制御する構成にしたものである。
Further, the information processing device of the present invention includes a plurality of register windows storing stack pointers, an auxiliary register group consisting of a plurality of registers and temporarily holding the values of the register windows, and a register window storing the register windows. a memory for saving values, a first storage means for holding the window number of the register window, and overflow and underflow of the register window.
A second window that holds the window number that causes the flow's exception.
a first data transfer means for transferring data from the register window to the auxiliary register group and generating a stack pointer; and a first data transfer means for transferring data from the auxiliary register group to the memory. and a third data transfer means for transferring data from the memory to the register window, and is used as an instruction to switch the register window when calling a procedure. It includes an instruction A and an instruction B used when returning from the procedure, and when the instruction A is executed twice, the second
When instruction A is executed in a state where the register window is switched to the register window having the window number (for example, W0) held in the storage means, the first data transfer means is held in the second storage means. window number (W0
) transfers all or part of the contents of the register window (W7) and the stack pointer that are switched when instruction A is executed to the auxiliary register group, and then executes instruction A.
When executed, the second data transfer means transfers the value (W0) of the second storage means to the window to be switched when executing instruction A using the window number (W0) held in the second storage means. number (W7), and controls the second data transfer means to transfer the contents of the auxiliary register group to the memory using the stack pointer stored in the auxiliary register group, and executes instruction B. If instruction B is executed in such a state that when executed twice, the register window is switched to the register window with the window number held in the second storage means (for example, W7).
The first data transfer means reads the value of the register window (W6) using the window number (W6) held in the first storage means and transfers the stack pointer to the third data transfer means. The third data transfer means transfers all or part of the contents of the register window (W7) of the window number (W7) held in the second storage means from the memory to the register window (W7).
) and further execute instruction B, the third data transfer means transfers the value (W7) of the second storage means to the window number (W7) held in the second storage means. Window number (W0
).

【0010】0010

【作用】上記構成により、制御手段は、以前に入力され
ていた命令全てが実行終了した時点で使用されているレ
ジスタウィンドウの番号が入力され、かつ複数の命令が
入力され、切り替え命令および種類を検出し前記複数の
命令個々に対して使用するレジスタウィンドウの番号を
生成し、命令フェッチ手段が前記制御手段の生成した前
記レジスタウィンドウ番号および前記命令をフェッチす
ることで、フェッチの段階でどのレジスタウィンドウに
対してどの命令を実行すればよいかがわかり、レジスタ
ウィンドウを切り替える命令の前後の命令を複数のレジ
スタウィンドウで並列実行することが可能となる。
[Operation] With the above configuration, the control means receives the number of the register window in use at the time when all the previously input instructions have finished executing, receives a plurality of instructions, and selects the switching instruction and type. The instruction fetch means detects and generates a register window number to be used for each of the plurality of instructions, and the instruction fetch means fetches the register window number and the instruction generated by the control means, thereby identifying which register window at the fetch stage. It is possible to know which instruction to execute for a register window, and to execute instructions before and after an instruction to switch register windows in parallel in multiple register windows.

【0011】また命令Aを2回実行したときに第2の記
憶手段に保持されたウィンドウ番号(たとえばW0とす
る)のレジスタウィンドウW0に切り替わるような時点
で、1回目の命令Aを実行すると、2回目の命令Aを実
行したとき切り替わるレジスタウィンドウW7の全てま
たは一部の内容およびスタックポインタを補助レジスタ
群に転送し、さらに2回目の命令Aを実行すると、第2
の記憶手段の値W0を、2回目の命令Aを実行したとき
に切り替わるウィンドウ番号W7に書き換え、同時に補
助レジスタ群の内容をメモリに転送するように動作し、
また、命令Bを2回実行したときに第2の記憶手段に保
持されたウィンドウ番号(たとえばW7とする)のレジ
スタウィンドウW7に切り替わるような時点で、1回目
の命令Bを実行すると、第1の記憶手段に保持されてい
るウィンドウ番号W6を用いて、第2の記憶手段に保持
されたウィンドウ番号W7のレジスタウィンドウW7の
全部または一部を退避させてある前記メモリからレジス
タウィンドウW7に転送し、さらに2回目の命令Bを実
行すると、第2の記憶手段の値W7を、この2回目の命
令Bを実行したときに切り替わるウィンドウ番号W0に
書き換えるように動作する。このように、レジスタウィ
ンドウの値の退避/復帰を専用のハードウエアで処理す
ることで命令の実行と並列にしかも高速に処理でき、そ
の結果、レジスタウィンドウのオーバーフローおよびア
ンダーフローを避けることができる。
Furthermore, if the first instruction A is executed at a point where the register window W0 corresponding to the window number (for example, W0) held in the second storage means is executed when the instruction A is executed twice, When the second instruction A is executed, all or part of the contents of the register window W7 and the stack pointer are transferred to the auxiliary register group, and when the second instruction A is executed, the second
rewrites the value W0 of the storage means to the window number W7 that changes when the second instruction A is executed, and at the same time transfers the contents of the auxiliary register group to the memory,
Furthermore, when executing instruction B for the first time at a point where the register window W7 of the window number (for example, W7) held in the second storage means is selected when instruction B is executed twice, the first Using the window number W6 held in the second storage means, all or part of the register window W7 with the window number W7 held in the second storage means is transferred from the saved memory to the register window W7. , when the second instruction B is executed, the value W7 in the second storage means is rewritten to the window number W0 which is changed when the second instruction B is executed. In this way, by processing the saving/restoring of register window values using dedicated hardware, the processing can be performed in parallel with the execution of instructions and at high speed, and as a result, overflow and underflow of the register window can be avoided.

【0012】0012

【実施例】以下本発明の一実施例を図面に基づいて説明
する。本発明の第1の実施例における情報処理装置は、
単一の命令ストリームの中から1サイクル内で4つの命
令をフェッチ/デコードし、可能な限り命令を並列に実
行する情報処理装置である。命令は固定長であり、演算
はレジスタ間演算のみを定義した縮小命令セット型アー
キテクチャをとり、8つのレジスタウィンドウを備えて
いる。また、レジスタウィンドウの構成ならびにその制
御については従来の技術の項で説明したため、ここでの
説明は省略する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. The information processing device according to the first embodiment of the present invention includes:
It is an information processing device that fetches/decodes four instructions from a single instruction stream within one cycle and executes the instructions in parallel as much as possible. The instructions have a fixed length, the operations use a reduced instruction set architecture that defines only operations between registers, and eight register windows are provided. Furthermore, since the configuration of the register window and its control have been explained in the section of the prior art, their explanation will be omitted here.

【0013】図1は本発明の第1の実施例における情報
処理装置のブロック図を示す。図1において、15は命
令ストリ−ム、12a,12b,12c,12d は命
令ストリ−ム15からフェッチされる4つの命令、13
a,13b,13c,13d,14はレジスタウィンド
ウ選択信号、10a,10b,10c,10dは命令お
よびレジスタウィンドウ選択信号をフェッチする命令フ
ェッチ手段、11a,11b,11c,11d はレジ
スタウィンドウ選択信号および命令を入力としレジスタ
ウィンドウ選択信号を出力する制御手段である。
FIG. 1 shows a block diagram of an information processing apparatus according to a first embodiment of the present invention. In FIG. 1, 15 is an instruction stream, 12a, 12b, 12c, and 12d are four instructions fetched from the instruction stream 15, and 13
a, 13b, 13c, 13d, 14 are register window selection signals; 10a, 10b, 10c, 10d are instruction fetch means for fetching instructions and register window selection signals; 11a, 11b, 11c, 11d are register window selection signals and instructions This is a control means that receives as input and outputs a register window selection signal.

【0014】このように構成された第1の実施例におけ
る情報処理装置の動作について以下に説明する。以下で
は、命令ストリ−ム15からsave命令を含む4つの
命令をフェッチし、並列実行する場合について述べる。 また、現在使用中のレジスタウィンドウはW0であり、
 save 命令を実行してもオ−バ−フロ−は起こら
ないものとする。いま、命令12b がsave命令で
、4つの命令12a,12b,12c,12d はそれ
ぞれ違った演算器(図示せず)を使用して命令が実行さ
れ、使用するレジスタが競合していないとする。
The operation of the information processing apparatus in the first embodiment configured as described above will be explained below. In the following, a case will be described in which four instructions including a save instruction are fetched from the instruction stream 15 and executed in parallel. Also, the register window currently in use is W0,
It is assumed that no overflow occurs even if the save instruction is executed. Assume now that instruction 12b is a save instruction, four instructions 12a, 12b, 12c, and 12d are executed using different arithmetic units (not shown), and there is no conflict in the registers used.

【0015】まず、制御手段11a はレジスタウィン
ドウ選択信号14から現在使用中のレジスタウィンドウ
の番号W0を入力し、同時に命令12a を入力し、命
令12a が save/restore 命令でない
ことからレジスタウィンドウ選択信号13a にレジス
タウィンドウ選択信号14の値を出力する。次に、制御
手段11b はレジスタウィンドウ選択信号13a を
入力し、同時に命令12b を入力し、命令12b が
save命令であることから、レジスタウィンドウ選択
信号13a で示されるレジスタウィンドウW0でsa
ve命令を実行して切り替わるレジスタウィンドウの番
号W7をレジスタウィンドウ選択信号13b に出力す
る。さらに、制御手段11c はレジスタウィンドウ選
択信号13b を入力し、同時に命令12c を入力し
、命令12c がsave/restore命令でない
ことからレジスタウィンドウ選択信号13c にレジス
タウィンドウ選択信号13b の値W7を出力する。最
後に、制御手段11d はレジスタウィンドウ選択信号
13cを入力し、同時に命令12d を入力し、命令1
2d がsave/restore命令でないことから
レジスタウィンドウ選択信号13d にレジスタウィン
ドウ選択信号13c の値W7を、次の4命令のフェッ
チ時のレジスタウィンドウ選択信号14の値として出力
する。
First, the control means 11a inputs the number W0 of the register window currently in use from the register window selection signal 14, and at the same time inputs the instruction 12a.Since the instruction 12a is not a save/restore instruction, the control means 11a inputs the register window selection signal 13a. The value of the register window selection signal 14 is output to. Next, the control means 11b inputs the register window selection signal 13a and at the same time inputs the instruction 12b, and since the instruction 12b is a save instruction, sa is selected in the register window W0 indicated by the register window selection signal 13a.
The number W7 of the register window to be switched by executing the ve instruction is output to the register window selection signal 13b. Further, the control means 11c inputs the register window selection signal 13b, and at the same time inputs the instruction 12c. Since the instruction 12c is not a save/restore instruction, it outputs the value W7 of the register window selection signal 13b as the register window selection signal 13c. Finally, the control means 11d inputs the register window selection signal 13c, simultaneously inputs the instruction 12d, and inputs the instruction 12d.
Since 2d is not a save/restore instruction, the value W7 of the register window selection signal 13c is output to the register window selection signal 13d as the value of the register window selection signal 14 when fetching the next four instructions.

【0016】以上の動作により、命令フェッチ手段10
a,10b,10c,10d には命令12a,12b
,12c,12d およびそれぞれの命令が参照すべき
レジスタウィンドウの番号W0,W7,W7, W7が
フェッチされる。よって、4つの命令フェッチ手段10
a,10b,10c,10d に格納された命令を実行
するときには、それぞれの命令がどのレジスタウィンド
ウを参照すればよいかが確定しており、上述したように
4つの命令はそれぞれ違った演算器を使用し、使用する
レジスタが競合していないので、4つの命令が並列に実
行される。ここで、 save 命令の実行時に命令フ
ェッチ手段10b に格納されたレジスタウィンドウ番
号W7を使ってレジスタウィンドウW0の2つのレジス
タの値を加算しレジスタウィンドウW7に書き込んでい
る。
With the above operation, the instruction fetch means 10
instructions 12a, 12b for a, 10b, 10c, 10d
, 12c, 12d and the register window numbers W0, W7, W7, W7 to be referenced by the respective instructions are fetched. Therefore, four instruction fetch means 10
When executing instructions stored in a, 10b, 10c, and 10d, it is determined which register window each instruction should refer to, and as mentioned above, each of the four instructions uses a different arithmetic unit. However, since there is no conflict in the registers used, the four instructions are executed in parallel. Here, using the register window number W7 stored in the instruction fetch means 10b when the save instruction is executed, the values of the two registers in the register window W0 are added and written in the register window W7.

【0017】以上説明したように、第1の実施例におけ
る情報処理装置は、レジスタウィンドウを切り替えるs
ave/restore命令を含む複数の命令を並列に
実行できる。 なお、この実施例においては4命令を並列に実行する情
報処理装置を示したが、5命令以上を並列に実行する情
報処理装置でも同様の方法でsave/restore
命令を含む複数の命令の並列実行が可能となる。また、
この実施例においては、命令およびi番目の制御手段か
ら出力されたレジスタウィンドウ選択信号を、i番目の
命令フェッチ手段に入力したが、命令およびi番目の制
御手段に入力されるレジスタウィンドウ選択信号を、i
番目の命令フェッチ手段に入力しても同様の効果が得ら
れる。さらに、制御手段11a,11b,11c がs
ave/restore命令を検出したことを表す信号
を出力し、制御手段11d がそれら3つの信号を用い
てレジスタウィンドウ選択信号を生成し、制御手段11
c が制御手段11a,11b の出力する信号を用い
てレジスタウィンドウ選択信号を生成し、制御手段11
b が制御手段11a の出力する信号を用いてレジス
タウィンドウ選択信号を生成することも容易に可能であ
る。
As explained above, the information processing apparatus in the first embodiment has the advantage of switching register windows.
Multiple instructions including ave/restore instructions can be executed in parallel. Although this embodiment shows an information processing device that executes four instructions in parallel, save/restore operations can also be performed using the same method in information processing devices that execute five or more instructions in parallel.
It becomes possible to execute multiple instructions in parallel. Also,
In this embodiment, the instruction and the register window selection signal output from the i-th control means are input to the i-th instruction fetch means, but the instruction and the register window selection signal input to the i-th control means are ,i
A similar effect can be obtained by inputting the instruction to the second instruction fetch means. Furthermore, the control means 11a, 11b, 11c are
A signal indicating that an ave/restore command has been detected is output, and the control means 11d generates a register window selection signal using these three signals.
c generates a register window selection signal using the signals output from the control means 11a and 11b, and
It is also easily possible for b to generate the register window selection signal using the signal output from the control means 11a.

【0018】本発明の第2の実施例における情報処理装
置は、8つのレジスタウィンドウを備える。レジスタウ
ィンドウの構成ならびにその制御については従来の技術
の項で説明したため、ここでの説明は省略する。
The information processing apparatus according to the second embodiment of the present invention includes eight register windows. The configuration of the register window and its control have been explained in the section of the prior art, so their explanation will be omitted here.

【0019】図2は本発明の第2の実施例における情報
処理装置のブロック図を示す。図2において、200 
は8つのレジスタウィンドウから成るウィンドウレジス
タ、201 は現在のレジスタウィンドウのウィンドウ
番号を保持する第1の記憶手段、202 はレジスタウ
ィンドウのオ−バ−フロ−とアンダーフローの例外を発
生するウィンドウ番号を保持する第2の記憶手段、20
3 〜209,223,224 はデ−タバス、210
 は補助レジタス群、211 はレジスタウィンドウの
値を退避させるメモリ、212 はレジスタウィンドウ
200 の値を補助レジスタ群210 に転送する第1
のデ−タ転送手段、213 は補助レジスタ群210 
の値をメモリ211 に転送する第2のデ−タ転送手段
、214 はメモリ211 の値をレジスタウィンドウ
200 に転送する第3のデ−タ転送手段、215 〜
219,225,226,はアドレスバス、220,2
21 はスタックポインタ、222 はCPUである。
FIG. 2 shows a block diagram of an information processing apparatus according to a second embodiment of the present invention. In Figure 2, 200
is a window register consisting of eight register windows, 201 is a first storage means that holds the window number of the current register window, and 202 is a window number that holds the register window overflow and underflow exceptions. second storage means for holding, 20
3 to 209, 223, 224 are data buses, 210
is an auxiliary register group, 211 is a memory for saving the value of the register window, and 212 is a first memory for transferring the value of the register window 200 to the auxiliary register group 210.
data transfer means 213 is an auxiliary register group 210
214 is a third data transfer means that transfers the value of the memory 211 to the register window 200;
219, 225, 226 are address buses, 220, 2
21 is a stack pointer, and 222 is a CPU.

【0020】このように構成された第2の実施例におけ
る情報処理装置の動作について以下に説明する。なお、
レジスタウィンドウをメモリ211 に退避するための
スタックポインタは出力レジスタに書き込まれているも
のとする。ここで、かりにレジスタウィンドウW7から
使用し始めるとする。従来の情報処理装置ではレジスタ
ウィンドウW0でオ−バ−フロ−の例外を発生する。本
実施例では、第2の記憶手段202 の値をW0とする
The operation of the information processing apparatus in the second embodiment configured as described above will be explained below. In addition,
It is assumed that the stack pointer for saving the register window to the memory 211 has been written to the output register. Now, assume that you start using the register window W7. In a conventional information processing device, an overflow exception occurs in the register window W0. In this embodiment, the value of the second storage means 202 is assumed to be W0.

【0021】いま、第2の記憶手段202 の値W0を
書き換えることなしに何度かsave/restore
命令を実行した後、save命令を実行してレジスタウ
ィンドウW1に切り替わったとする。ここでもう一度s
ave命令を実行すれば第2の記憶手段202 に記憶
されたレジスタウィンドウW0に切り替わる状態にあり
、従来の情報処理装置ではレジスタウィンドウW0でオ
−バ−フロ−の例外を発生する。すると、第1のデ−タ
転送手段212 がデ−タバス204,205 から第
1の記憶手段201 の値および第2の記憶手段202
 の値を読み出し比較して、あと1回save命令を実
行すれば第1の記憶手段201 の値が第2の記憶手段
202 の値W0に一致することを検出し、レジスタウ
ィンドウW1を使用する命令の実行と並列に、第1のデ
−タ転送手段212 が第2の記憶手段202 値W0
を用いてアドレスバス219 にアドレスを出力してレ
ジスタウィンドウW7の入力レジスタおよびロ−カルレ
ジスタの値およびレジスタウィンドウW7の出力レジス
タに記憶されているスタックポインタを読み出し補助レ
ジスタ群210 に転送し始める。補助レジスタ群21
0 への転送が終了後、もう1度 save 命令が実
行されると、第2のデ−タ転送手段213 がデ−タバ
ス204 ,205から第1の記憶手段201 の値お
よび第2の記憶手段202 の値を読み出し比較し一致
していることを検出し、第2の記憶手段202 の値を
W7に書き換え、レジスタウィンドウW0を使用する命
令の実行と並列に、第2のデ−タ転送手段213 が補
助レジスタ群210 に格納されたスタックポインタを
用いてアドレスバス217 にアドレスを出力して補助
レジスタ群210 の値(前のsave命令でメモリ2
11 に転送されたレジスタウィンドウW7の値)をメ
モリ211 に転送し始める。以上でレジスタウィンド
ウW7のオ−バ−フロ−を避けることができる。
[0021] Now, the value W0 of the second storage means 202 can be saved/restored several times without rewriting it.
Assume that after executing an instruction, a save instruction is executed and the window is switched to the register window W1. Here again s
When the ave instruction is executed, the register window W0 stored in the second storage means 202 is switched to, and in the conventional information processing apparatus, an overflow exception occurs in the register window W0. Then, the first data transfer means 212 transfers the value of the first storage means 201 and the second storage means 202 from the data buses 204 and 205.
reads and compares the values of , and if the save instruction is executed one more time, it is detected that the value of the first storage means 201 matches the value W0 of the second storage means 202, and the instruction to use the register window W1 is executed. In parallel with the execution of
is used to output an address to the address bus 219 and begin to transfer the values of the input register and local register of the register window W7 and the stack pointer stored in the output register of the register window W7 to the read auxiliary register group 210. Auxiliary register group 21
When the save instruction is executed again after the transfer to 0 is completed, the second data transfer means 213 transfers the value of the first storage means 201 and the second storage means from the data buses 204 and 205. 202 is read out and compared, it is detected that they match, the value of the second storage means 202 is rewritten to W7, and the second data transfer means is written in parallel with the execution of the instruction using the register window W0. 213 uses the stack pointer stored in the auxiliary register group 210 to output an address to the address bus 217 and outputs the value of the auxiliary register group 210 (memory 2 in the previous save instruction).
11) starts to be transferred to the memory 211. In the above manner, overflow of the register window W7 can be avoided.

【0022】次に、レジスタウィンドウのアンダ−フロ
−を避ける動作を述べる。以上の動作に引き続き、第2
の記憶手段202 の値W7を書き換えることなしに何
度かsave/restore命令を実行した後、re
store 命令を実行してレジスタウィンドウW6に
切り替わったとする。ここでもう一度restore 
命令を実行すれば第2の記憶手段202 に記憶された
レジスタウィンドウW7に切り替わる状態にあり、従来
の情報処理装置ではレジスタウィンドウW7でアンダ−
フロ−の例外を発生する。すると、第3のデ−タ転送手
段214 および第1のデ−タ転送手段212がデ−タ
バス204,205 から第1の記憶手段201 の値
W6および第2の記憶手段202 の値W7を読み出し
比較して、あと1回restore 命令を実行すれば
第1の記憶手段201 の値が第2の記憶手段202 
の値W7に一致することを検出し、第1のデ−タ転送手
段212 が第1の記憶手段201 の値W6を用いて
アドレスバス219 にアドレスを出力しレジスタウィ
ンドウW6の入力レジスタに記憶されているスタックポ
インタを読み込んで第3のデ−タ転送手段214 に転
送し、レジスタウィンドウW6を使用する命令の実行と
並列に、第3のデ−タ転送手段214 がアドレスバス
218,219 にアドレスを出力してメモリ211 
に転送してあったレジスタウィンドウW7の入力レジス
タおよびロ−カルレジスタの値をレジスタウィンドウW
7に転送し始める。ここで、アドレスバス218 に出
力されるアドレスはスタックポインタを用いて生成され
、アドレスバス219 に出力されるアドレスは第2の
記憶手段202 の値W7を用いて生成される。レジス
タウィンドウW7への転送の終了後、restore 
命令が実行されると第3のデ−タ転送手段214 が第
2の記憶手段202 の値をW0に書き換える。このレ
ジスタウィンドウW7への転送の終了後にrestor
e 命令が実行されれば、アンダ−フロ−は起こらない
Next, the operation for avoiding underflow of the register window will be described. Following the above operation, the second
After executing the save/restore command several times without rewriting the value W7 of the storage means 202, the restore
Assume that the store instruction is executed and the register window W6 is displayed. Restore again here
When the instruction is executed, the register window W7 stored in the second storage means 202 is switched to.
Generates a flow exception. Then, the third data transfer means 214 and the first data transfer means 212 read the value W6 of the first storage means 201 and the value W7 of the second storage means 202 from the data buses 204 and 205. By comparison, if the restore command is executed one more time, the value of the first storage means 201 will be changed to the value of the second storage means 202.
The first data transfer means 212 outputs an address to the address bus 219 using the value W6 of the first storage means 201, and the address is stored in the input register of the register window W6. The third data transfer means 214 reads the stack pointer and transfers it to the third data transfer means 214, and in parallel with the execution of the instruction using the register window W6, the third data transfer means 214 transfers the address to the address buses 218 and 219. Output and store in memory 211
The input register and local register values of register window W7 that were transferred to register window W
Start transferring to 7. Here, the address output to the address bus 218 is generated using a stack pointer, and the address output to the address bus 219 is generated using the value W7 of the second storage means 202. After completing the transfer to register window W7, restore
When the command is executed, the third data transfer means 214 rewrites the value of the second storage means 202 to W0. After the transfer to this register window W7 is completed, restore
If the e instruction is executed, no underflow will occur.

【0023】以上説明したように、第2の実施例におけ
る情報処理装置は、レジスタウィンドウの値の退避/復
帰を専用のハ−ドウェアで処理することで、命令の実行
と並列にしかも高速に処理でき、その結果、ウィンドウ
レジスタのアンダ−フロ−およびオーバーフローを避け
ることができる。また、メモリへ退避すべきレジスタウ
ィンドウ(たとえばW7)の2つ前のレジスタウィンド
ウ(たとえばW1)を使用する命令と並列に、レジスタ
ウィンドウの値を退避するが、補助レジスタ群を設けた
ことにより、メモリへ退避すべきレジスタウィンドウ(
たとえばW7)の1つ前のレジスタウィンドウ(たとえ
ばW0)に切り替わって始めて、レジスタウィンドウの
値をメモリへ退避することができる。
As explained above, the information processing device in the second embodiment uses dedicated hardware to process the saving/restoring of the values in the register window, so that the processing can be performed in parallel with the execution of instructions and at high speed. As a result, underflow and overflow of the window register can be avoided. Also, the value of the register window is saved in parallel with an instruction that uses the register window (for example, W1) two registers before the register window (for example, W7) that should be saved to memory, but by providing a group of auxiliary registers, Register window to be saved to memory (
For example, the value of the register window can be saved to memory only after switching to the previous register window (for example, W0) from W7).

【0024】なお、以上の第2の実施例に述べたメモリ
は、CPUが命令の実行によってアクセスできる記憶装
置であってもよく、マイクロプロセッサに内蔵されたキ
ャッシュメモリやマイクロプロセッサ外部のメインメモ
リなどが一例である。
The memory described in the second embodiment may be a storage device that the CPU can access by executing an instruction, such as a cache memory built into a microprocessor or a main memory external to the microprocessor. is an example.

【0025】[0025]

【発明の効果】以上のように本発明によれば、複数のレ
ジスタウィンドウを持つ情報処理装置において、sav
e/restore命令を含む複数の命令をフェッチし
た段階で、それぞれの命令がどのレジスタウィンドウを
使えばよいかがわかるため、save/restore
命令を含む複数の命令を並列に実行できる。
As described above, according to the present invention, in an information processing apparatus having a plurality of register windows, sav
When multiple instructions including the e/restore instruction are fetched, it is known which register window each instruction should use.
Multiple instructions including instructions can be executed in parallel.

【0026】また、レジスタウィンドウの値の退避を専
用のハ−ドウェアで処理することで、命令の実行と並列
にしかも高速に処理でき、save命令によりオ−バ−
フロ−が起こるのを避けることができ、かつメモリへ退
避すべきレジスタウィンドウの1つ前のレジスタウィン
ドウに切り替わって始めてメモリへ退避を行うことが可
能となる。そして、メモリからレジスタウィンドウへの
デ−タの復帰を専用のハ−ドウェアで処理することで、
命令の実行と並列にしかも高速に処理でき、resto
re 命令によりアンダ−フロ−が起こるのを避けるこ
とができ、処理が高速化され、その実用的価値は大きい
Furthermore, by processing the saving of register window values using dedicated hardware, processing can be performed in parallel with the execution of instructions and at high speed.
It is possible to avoid the occurrence of a flow, and it is possible to save to the memory only after switching to the register window immediately before the register window to be saved to the memory. Then, by processing the return of data from memory to the register window using dedicated hardware,
Can be processed in parallel with instruction execution and at high speed, resto
The re instruction makes it possible to avoid underflow, speed up processing, and has great practical value.

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

【図1】本発明の第1の実施例のレジスタウィンドウを
切り替えるsave/restore命令を含む複数の
命令を並列実行できる情報処理装置のブロック図である
FIG. 1 is a block diagram of an information processing device that can execute a plurality of instructions in parallel, including a save/restore instruction for switching register windows, according to a first embodiment of the present invention.

【図2】本発明の第2の実施例のレジスタウィンドウの
アンダ−フロ−をなくし、かつオ−バ−フロ−例外処理
と並列に次の命令を実行できる情報処理装置のブロック
図である。
FIG. 2 is a block diagram of an information processing device according to a second embodiment of the present invention that eliminates register window underflow and can execute the next instruction in parallel with overflow exception processing.

【符号の説明】[Explanation of symbols]

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  複数のレジスタウィンドウを備え、前
記レジスタウィンドウを切り替える切り替え命令を1種
類以上有し、複数の命令が入力され、前記複数の命令の
入力以前に入力されていた命令全てが実行終了した時点
で使用されているレジスタウィンドウの番号が入力され
、前記切り替え命令および種類を検出し、前記複数の命
令個々に対し使用するレジスタウィンドウの番号を生成
する複数の制御手段と、前記制御手段の生成した前記レ
ジスタウィンドウ番号および前記命令をフェッチする命
令フェッチ手段とを備えたことを特徴とする情報処理装
置。
1. A device comprising a plurality of register windows, having one or more types of switching instructions for switching the register windows, in which a plurality of instructions are input, and execution of all instructions input before the input of the plurality of instructions is completed. a plurality of control means for detecting the switching instruction and type, and generating a register window number to be used for each of the plurality of instructions; An information processing device comprising: an instruction fetch unit that fetches the generated register window number and the instruction.
【請求項2】  スタックポインタを記憶している複数
のレジスタウィンドウと、複数のレジスタから成り前記
レジスタウィンドウの値を一時的に保持する補助レジス
タ群と、前記レジスタウィンドウの値を退避させるため
のメモリと、前記レジスタウィンドウのウィンドウ番号
を保持する第1の記憶手段と、前記レジスタウィンドウ
のオ−バ−フロ−とアンダ−フロ−の例外を発生するウ
ィンドウ番号を保持する第2の記憶手段と、前記レジス
タウィンドウから前記補助レジスタ群へデ−タを転送し
スタックポインタを生成する第1のデ−タ転送手段と、
前記補助レジスタ群から前記メモリへデ−タを転送する
第2のデ−タ転送手段と、前記メモリから前記レジスタ
ウィンドウへデ−タを転送する第3のデ−タ転送手段と
を有し、前記レジスタウィンドウを切り替える命令とし
て、手続きを呼び出すときに用いられる命令Aと手続か
ら戻るときに用いられる命令Bとを備え、前記命令Aを
2回実行したときに前記第2の記憶手段に保持されたウ
ィンドウ番号のレジスタウィンドウに切り替わるような
状態で、前記命令Aを実行すると、前記第1のデ−タ転
送手段が前記第2の記憶手段に保持されたウィンドウ番
号で命令Aを実行したとき切り替わるレジスタウィンド
ウ全てまたは一部の内容およびスタックポインタを前記
補助レジスタ群に転送し、さらに命令Aを実行すると、
前記第2のデ−タ転送手段が前記第2の記憶手段の値を
前記第2の記憶手段に保持されたウィンドウ番号で命令
Aを実行したとき切り替わるウィンドウ番号に書き換え
、前記第2のデ−タ転送手段が前記補助レジスタ群の内
容を前記補助レジスタ群に格納されたスタックポインタ
を用いて前記メモリに転送する制御と、命令Bを2回実
行したときに第2の記憶手段に保持されたウィンドウ番
号のレジスタウィンドウに切り替わるような状態で、命
令Bを実行すると、前記第1のデ−タ転送手段が前記第
1の記憶手段に保持されたウィンドウ番号を用いてレジ
スタウィンドウの値を読み込んでスタックポインタを前
記第3のデ−タ転送手段へ転送し、前記第3のデ−タ転
送手段が前記第2の記憶手段に保持されたウィンドウ番
号のレジスタウィンドウ全てまたは一部の内容を前記メ
モリから前記レジスタウィンドウに転送し、さらに命令
Bを実行すると、前記第3のデ−タ転送手段が前記第2
の記憶手段の値を前記第2の記憶手段に保持されたウィ
ンドウ番号で命令Bを実行したとき切り替わるウィンド
ウ番号に書き換える制御とを実行するように構成したこ
とを特徴とする情報処理装置。
2. A plurality of register windows storing stack pointers, a group of auxiliary registers consisting of a plurality of registers and temporarily holding values of the register windows, and a memory for saving the values of the register windows. a first storage means for holding a window number of the register window; a second storage means for holding a window number for generating an overflow and underflow exception of the register window; first data transfer means for transferring data from the register window to the auxiliary register group and generating a stack pointer;
a second data transfer means for transferring data from the auxiliary register group to the memory; and a third data transfer means for transferring data from the memory to the register window; The instruction to switch the register window includes an instruction A used when calling a procedure and an instruction B used when returning from the procedure, and when the instruction A is executed twice, the instruction is retained in the second storage means. When the instruction A is executed in such a state that the register window is switched to the register window of the window number held in the second storage means, the first data transfer means switches when the instruction A is executed with the window number held in the second storage means. Transferring all or part of the contents of the register window and the stack pointer to the auxiliary register group, and further executing instruction A,
The second data transfer means rewrites the value of the second storage means to the window number that is changed when instruction A is executed using the window number held in the second storage means, and transfers the second data to the window number that changes when instruction A is executed. The data transfer means controls to transfer the contents of the auxiliary register group to the memory using the stack pointer stored in the auxiliary register group, and when the instruction B is executed twice, the contents are retained in the second storage means. When instruction B is executed in a state where the register window is switched to the register window of the window number, the first data transfer means reads the value of the register window using the window number held in the first storage means. The stack pointer is transferred to the third data transfer means, and the third data transfer means stores the contents of all or part of the register window of the window number held in the second storage means in the memory. When the third data transfer means transfers the data to the register window and further executes instruction B, the third data transfer means transfers the
An information processing apparatus characterized in that the information processing apparatus is configured to execute control for rewriting the value of the storage means to a window number that changes when instruction B is executed using the window number held in the second storage means.
JP988391A 1991-01-30 1991-01-30 Information processor Pending JPH04245333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP988391A JPH04245333A (en) 1991-01-30 1991-01-30 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP988391A JPH04245333A (en) 1991-01-30 1991-01-30 Information processor

Publications (1)

Publication Number Publication Date
JPH04245333A true JPH04245333A (en) 1992-09-01

Family

ID=11732553

Family Applications (1)

Application Number Title Priority Date Filing Date
JP988391A Pending JPH04245333A (en) 1991-01-30 1991-01-30 Information processor

Country Status (1)

Country Link
JP (1) JPH04245333A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021117086A (en) * 2020-01-24 2021-08-10 鹿島建設株式会社 Preparation method of triaxial testing sample, triaxial testing laminate, and triaxial testing sample

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021117086A (en) * 2020-01-24 2021-08-10 鹿島建設株式会社 Preparation method of triaxial testing sample, triaxial testing laminate, and triaxial testing sample

Similar Documents

Publication Publication Date Title
US4631672A (en) Arithmetic control apparatus for a pipeline processing system
JPH08212075A (en) Information processor
JPH04245333A (en) Information processor
JPH05241827A (en) Command buffer controller
JP2812610B2 (en) Pipeline control method
JPH01273132A (en) Microprocessor
JPH07114509A (en) Memory access device
JPS635442A (en) Program loop detecting and storing device
JPH0991139A (en) Information processor
JPH0228828A (en) Maximum value and minimum value detecting circuit
JP2583614B2 (en) Vector arithmetic unit
JPH08272608A (en) Pipeline processor
JPH04230533A (en) Interruption control circuit
JP2528394B2 (en) Arithmetic control device
JP3239042B2 (en) Microcomputer
JPH0228724A (en) System for controlling branching instruction
JPH03263264A (en) Information processor
JPH01316826A (en) Register file address circuit
JPS63137358A (en) Data processor
JPH02103635A (en) Digital system
JPH0419575B2 (en)
JPH0340075A (en) Microcomputer
JPH0282318A (en) Floating-point arithmetic unit
JPS6120139A (en) Interruption control system
JPH06301532A (en) Microprocessor unit