JPS6258340A - Register updating mechanism - Google Patents

Register updating mechanism

Info

Publication number
JPS6258340A
JPS6258340A JP60197935A JP19793585A JPS6258340A JP S6258340 A JPS6258340 A JP S6258340A JP 60197935 A JP60197935 A JP 60197935A JP 19793585 A JP19793585 A JP 19793585A JP S6258340 A JPS6258340 A JP S6258340A
Authority
JP
Japan
Prior art keywords
register
update
exception
holding means
adder
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
JP60197935A
Other languages
Japanese (ja)
Inventor
Koji Iida
飯田 弘司
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP60197935A priority Critical patent/JPS6258340A/en
Publication of JPS6258340A publication Critical patent/JPS6258340A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the firmware capacity and to shorten the exception processing time by providing a switching means which can change the indication of direction for increase or decrease updating with the register updating informationheld by a holding means by an exception signal between the holding means and a constant generating means. CONSTITUTION:A register updating mechanism consists of a register qualifying means 1, a register part 2, a register selecting circuit 3, a holding means 4, a constant generating means 5, an adder 6 and a switching means 7. The means 7 supplies an exception signal 10 through an exception detecting circuit to show the presence or absence of an exception. The circuit 3 selects a register out of the part 2 and connect it to the adder 6 via a bus when the signal 10 applied via an OR circuit 12 or a register replacement signal 11 is active.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理xZfにおけるメモリアドレスの計算
に必要なインデクスレジスタ等の更新機構に関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a mechanism for updating index registers and the like necessary for calculating memory addresses in information processing xZf.

〔従来の技術〕[Conventional technology]

パイプライン制御方式で命令を実行する情報処理装置に
おいて、命令の読出し、解読、実行の各ステップは各々
読み出し部、解読部、実行部で行なわれる。この場合、
命令の実効アドレスは解読部で求められるが、インデク
ス修飾がある場合のインデクスレジスタの更新は実行部
内で行なわれる。このため解読部から実行部へインデク
スレジスタの更新情報の受渡しが必要となる。
In an information processing device that executes instructions using a pipeline control method, the steps of reading, decoding, and executing instructions are performed in a reading section, a decoding section, and an execution section, respectively. in this case,
The effective address of an instruction is found in the decoder, but the index register is updated in the case of index modification in the execution part. Therefore, it is necessary to transfer update information of the index register from the decoding section to the execution section.

第2図は従来のレジスタ更新機構のブロック図であり、
レジスタ修飾手段1と保持手段4に命令解読部からデー
タがセットされると、実行部で命令を実行する直前にこ
のデータを用いてレジスタを更新するよう動作する。即
ち、レジスタ修飾手段Iには命令解読部より更新するレ
ジスタの指定情報がセットされ、レジスタ選択回路3は
その指定情報に基づいてレジスタ部2の複数のレジスタ
の中から1個のレジスタを選択し、その選択されたレジ
スタの内容が加算器6の一方の入力に加えられる。一方
、保持手段4には命令解読部よりレジスタ更新情報がセ
ントされ、定数発生手段5はレジスタ更新情報中の増加
更新・減少更新の方向指示および更新数情報等に応じた
正あるいは負の定数を発生し、加算器6の他方の人力に
加える。
FIG. 2 is a block diagram of a conventional register update mechanism.
When data is set in the register modifying means 1 and the holding means 4 from the instruction decoding section, the execution section operates to update the registers using this data immediately before executing the instruction. That is, the register modification means I is set with designation information of the register to be updated by the instruction decoding section, and the register selection circuit 3 selects one register from among the plurality of registers in the register section 2 based on the designation information. , the contents of the selected register are added to one input of the adder 6. On the other hand, the register update information is sent to the holding means 4 from the instruction decoding section, and the constant generating means 5 generates a positive or negative constant according to the direction instruction of increase update/decrease update and the update number information in the register update information. generated and added to the other power of adder 6.

加算器6は再入力を加算し、その加算結果がレジスタ選
択回路3で選択されたレジスタ部2のレジスタへ書き戻
され、所定のレジスタ更新が完了する。
The adder 6 adds the input again, and the addition result is written back to the register of the register section 2 selected by the register selection circuit 3, completing the predetermined register update.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ところで、実行部で命令を実行中に例外、例えば仮想記
憶のメモリ管理についての例外が発生し現在実行中の命
令を失敗(アボート)シた時、インデクスレジスタとし
て使用されたレジスタを更新したままにしておくと、命
令を再開しようとしたとき正しく再開することが出来な
い。失敗した命令を正しく再開するためにはインデクス
レジスタの更新をキャンセルしておかなければならない
By the way, when an exception occurs while executing an instruction in the execution section, such as an exception related to memory management of virtual memory, and the currently executing instruction fails (aborts), the register used as the index register remains updated. If you do so, you will not be able to restart the command correctly when you try to restart it. In order to correctly restart the failed instruction, it is necessary to cancel the update of the index register.

このようなインデクスレジスタの更新のキャンセルは、
第2図の従来構成では、例外が発生するとその旨を示す
例外信号に応答して、ファームウェアがレジスタの逆更
新に必要なデータを作成して上記バスを介してレジスタ
修飾手段1と保持手段4にそのデータをセントする等の
処理で行なわれていた。そのため、ファームウェアの容
量が増加し、また例外処理時間の増加を招くという問題
点があった。
Cancellation of such an index register update is
In the conventional configuration shown in FIG. 2, when an exception occurs, the firmware creates data necessary for reverse updating of the register in response to an exception signal indicating the occurrence, and sends the data to the register modification means 1 and the holding means 4 via the bus. This was done by sending the data as a cent. Therefore, there are problems in that the capacity of the firmware increases and the time required for exception processing increases.

本発明はこのような従来の問題点を解決したもので、そ
の目的は、レジスタの更新のキャンセルをファームウェ
ア容量をあまり増加させずに実現でき、また、例外処理
時間も短縮できるようにすることにある。
The present invention solves these conventional problems, and its purpose is to make it possible to cancel register updates without significantly increasing firmware capacity, and to shorten exception processing time. be.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記目的を達成するために、レジスタ修飾アド
レシングの命令を実行する為に、レジスタ新情報の保持
手段と、該保持手段に保持されたレジスタ更新情報に応
じた定数を発生する定数発生手段と、更新するレジスタ
の指定情報を保持するレジスタ修飾手段と、複数のレジ
スタを含むレジスタ部と、該レジスタ部の複数のレジス
タのうちから前記レジスタ修飾手段に保持された指定情
報で指定されたレジスタを選択するレジスタ選択回路と
、該レジスタ選択回路で選択されたレジスタの内容と前
記定数発生手段から出力された定数とを加算する加算器
とを有する情報処理装置におけるレジスタ更新機構にお
いて、 前記保持手段からのレジスタ更新情報に含まれる増加更
新・減少更新の方向指示を例外信号によって逆方向に切
換える切換手段が前記保持手段と前記定数発生手段の間
に設けられた構成を採用する。
In order to achieve the above object, the present invention includes a register new information holding means and a constant generating means for generating a constant according to the register update information held in the holding means in order to execute a register modification addressing instruction. a register modification means that holds designation information of a register to be updated; a register section including a plurality of registers; and a register designated by the designation information held in the register modification means from among the plurality of registers in the register section. In a register updating mechanism in an information processing device, the register updating mechanism includes a register selection circuit that selects a register selection circuit, and an adder that adds the contents of the register selected by the register selection circuit and a constant output from the constant generation means, A configuration is adopted in which a switching means is provided between the holding means and the constant generating means for switching the direction instruction of increasing update/decreasing update included in the register update information from to the opposite direction by an exception signal.

〔作用〕[Effect]

例外が検出されないときは、切換手段は保持手段に保持
されたレジスタ更新情報に含まれる増加更新・減少更新
の方向指示をそのままにして保持手段のレジスタ更新情
報を加X器に加えるので、命令解読部から与えられた内
容通りのレジスタ更新が行なわれる。一方、例外が検出
されたときは、切換手段は保持手段に保持されたレジス
タ更新情報をその中の増加更新・減少更新の方向指示を
逆方向に切換えて加算器に加えるので、保持手段のレジ
スタ更新情報が増加更新を指示していれば減少更新が行
なわれ、反対に減少更新を指示していれば増加更新が行
なわれ、レジスタの更新のキャンセルが行なわれる。
When an exception is not detected, the switching means adds the register update information of the holding means to the adder while leaving the direction instruction of increase update/decrease update included in the register update information held in the holding means unchanged, so that the instruction is not decoded. The register is updated according to the contents given from the section. On the other hand, when an exception is detected, the switching means switches the register update information held in the holding means to the increment update/decrease update direction in the reverse direction and adds it to the adder. If the update information instructs an increase update, a decrease update is performed; conversely, if the update information instructs a decrease update, an increase update is performed, and the register update is canceled.

〔実施例〕〔Example〕

第1図は本発明の実施例のブロック図である。 FIG. 1 is a block diagram of an embodiment of the invention.

この実施例のレジスタ更新機構は、レジスタ修飾手段1
と、レジスタ部2と、レジスタ選択回路3と、保持手段
4と、定数発生手段5と、加算器6と、切換手段7とか
ら構成される。切換手段7は図示しない例外検出回路か
ら例外発生の有無を示す例外信号10を入力し、またレ
ジスタ選択回路3は、オア回路12を介して加えられる
例外信号10かレジスフ更新信号11のどちらかがアク
テイブになったときレジスタ部2の中から1個のレジス
タを選択し、この選択したレジスタをハスを通して加算
器6と接続させる。レジスタ更新(8号11は図示しな
いレジスタ更新用シーケンサ−によって、実行部で命令
を実行する直前にレジスタ更新を実行するように制御さ
れる。
The register update mechanism of this embodiment is the register modification means 1.
, a register section 2 , a register selection circuit 3 , a holding means 4 , a constant generation means 5 , an adder 6 , and a switching means 7 . The switching means 7 receives an exception signal 10 indicating whether an exception has occurred from an exception detection circuit (not shown), and the register selection circuit 3 receives either the exception signal 10 applied via the OR circuit 12 or the register update signal 11. When activated, one register is selected from the register section 2, and the selected register is connected to the adder 6 through a lotus. Register update (No. 8 11 is controlled by a register update sequencer (not shown) to execute register update immediately before executing an instruction in the execution section.

今、例外発生が無く通常のレジスタ更新が実行される場
合を考えてみる。レジスタ修飾手段1は例えば6ビノト
容量のレジスタで構成され、例えばレジスタ部2の複数
のレジスタのうちレジスタR1を指す0OOOOIB 
 (末尾のBは2進数であることを示す)という2進数
の値が命令解読部より格納されているとする。また保持
手段4は例えば4ビツト容量のレジスタで構成され、命
令解読部よりセットされた4ビツトのレジスタ更新情報
の最上位のビットが“1”又は“0”かで“更新有り”
又は“更新無し”を示し、次のピントが“1”か“0”
かで“減少更新”か“増加更新”を示し、下位の2ビツ
トで更新数1.2.4.8を決めるものとする。例えば
保持手段4に100IBという2進数の値が格納された
場合、これは+2更新を指示している。
Now, let us consider the case where no exception occurs and a normal register update is executed. The register modification means 1 is composed of, for example, a register with a capacity of 6 bits.
Assume that a binary value (B at the end indicates a binary number) is stored from the instruction decoder. The holding means 4 is composed of a register with a 4-bit capacity, for example, and it is determined whether the most significant bit of the 4-bit register update information set by the instruction decoder is "1" or "0".
Or it shows “no update” and the next focus is “1” or “0”
The number indicates "decreasing update" or "increasing update", and the lower two bits determine the number of updates 1.2.4.8. For example, when a binary value of 100IB is stored in the holding means 4, this indicates a +2 update.

レジスタ修飾手段lに0OOOOIBが、保持手段4に
100IBが格納されているとすると、例外信号が例外
発生宵を示していないとき、保持手段4の内容1001
Bをそのまま定数発生手段5へ伝える。定数発生手段5
では人力の100IBに対して0O02H(末尾のHは
16進数であることを示す)の値を加算器6へ出力する
。一方、レジスタ修飾手段1の内容000001Bによ
ってレジスタ選択回路3はレジスタ部2からレジスタR
1を選択し、レジスタ更新信号11が更新有りを示すア
クティブになった時レジスタR1の内容を加算器6へ出
力する。
Assuming that 0OOOOIB is stored in the register modification means l and 100IB is stored in the holding means 4, when the exception signal does not indicate that an exception has occurred, the contents of the holding means 4 are 1001
B is transmitted as it is to the constant generating means 5. Constant generation means 5
Now, a value of 0O02H (the H at the end indicates a hexadecimal number) is output to the adder 6 for the human-powered 100IB. On the other hand, according to the content 000001B of the register modification means 1, the register selection circuit 3 selects the register R from the register section 2.
1 is selected, and when the register update signal 11 becomes active indicating that there is an update, the contents of the register R1 are output to the adder 6.

加算器6は以上2つのデータを加算し、結果として得ら
れたデータはレジスタ選択回路3で選択されているレジ
スタR1へ書き戻される。この様にしてレジスタR1は
更新され実行部において命令の実行が開始される。
The adder 6 adds the above two pieces of data, and the resulting data is written back to the register R1 selected by the register selection circuit 3. In this way, register R1 is updated and execution of the instruction is started in the execution section.

さて、もしこの実行途中に例外が発生したとすれば、例
外信号10が例外発生有を示すアクティブとなるため、
切換手段7では入力の100IBに対して逆更新を示す
1101Bを出力する。この出力に対して定数発生手段
5ではFFFEI(を出力し、加算器6では例外信号l
Oでレジスタ部2がら続出されたレジスタR1の内容を
”−2”加算してレジスタR1へ書き戻すため、レジス
タR1(7)内容ハこの例外の発生した命令の実行以前
に戻ることになり、直ちに命令の再開が可能となる。
Now, if an exception occurs during this execution, the exception signal 10 becomes active indicating that an exception has occurred, so
The switching means 7 outputs 1101B indicating reverse update with respect to the input 100IB. In response to this output, the constant generating means 5 outputs FFFEI(, and the adder 6 outputs an exception signal l
At O, the contents of register R1 successively read out from register section 2 are added by "-2" and written back to register R1, so the contents of register R1 (7) return to the state before the execution of the instruction in which this exception occurred. Instructions can be resumed immediately.

〔発明の効果〕 以上説明したように本発明は、保持手段と定数発生手段
の間に例外信号によって保持手段に保持されたレジスタ
更新情報中の増加更新・減少更新の方向指示を変更する
ことが可能な切換手段を設けることによって、ファーム
ウェアで意識することな(例外発生時のレジスタの逆更
新つまり更新のキャンセルが可能となり、ファームウェ
ア容量の減少と例外処理時間の短縮ができる効果がある
[Effects of the Invention] As explained above, the present invention is capable of changing the direction of increment update/decrease update in the register update information held in the holding means by an exception signal between the holding means and the constant generation means. By providing a possible switching means, it is possible to reversely update the register when an exception occurs, or cancel the update, without the firmware being aware of it, which has the effect of reducing the firmware capacity and shortening the exception processing time.

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

第1図は本発明の実施例のブロック図および、第2図は
従来のレジスタ更新機構のブロック図であるつ 図において、1はレジスタ修飾手段、2はレジスタ部、
3はレジスタ選択回路、4は更新情報保持手段、5は定
数発生手段、6は加算器、7は切換手段、10は例外信
号、11はレジスタ更新信号、12はオア回路である。 \−一 、本発明の実姉う1]のブロック図 第 1 霧 命令解読悔り           命令MH蛯判従来
例のブロッグ圃 華 2 囚
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a block diagram of a conventional register update mechanism. In the figures, 1 is a register modification means, 2 is a register section,
3 is a register selection circuit, 4 is an update information holding means, 5 is a constant generation means, 6 is an adder, 7 is a switching means, 10 is an exception signal, 11 is a register update signal, and 12 is an OR circuit. \-1, the real sister of the present invention 1] Block diagram 1. Regrets in deciphering foggy commands Blog field of conventional example of command MH verb 2. Prisoners

Claims (1)

【特許請求の範囲】[Claims] レジスタ修飾アドレシングの命令を実行する為に、レジ
スタ更新情報の保持手段と、該保持手段に保持されたレ
ジスタ更新情報に応じた定数を発生する定数発生手段と
、更新するレジスタの指定情報を保持するレジスタ修飾
手段と、複数のレジスタを含むレジスタ部と、該レジス
タ部の複数のレジスタのうちから前記レジスタ修飾手段
に保持された指定情報で指定されたレジスタを選択する
レジスタ選択回路と、該レジスタ選択回路で選択された
レジスタの内容と前記定数発生手段から出力された定数
とを加算する加算器とを有する情報処理装置におけるレ
ジスタ更新機構において、前記保持手段からのレジスタ
更新情報に含まれる増加更新・減少更新の方向指示を例
外信号によって逆方向に切換える切換手段が前記保持手
段と前記定数発生手段の間に設けられた構成を有するこ
とを特徴とするレジスタ更新機構。
In order to execute a register modification addressing instruction, a means for holding register update information, a constant generating means for generating a constant according to the register update information held in the holding means, and information specifying the register to be updated are held. a register modification means, a register section including a plurality of registers, a register selection circuit for selecting a register specified by specification information held in the register modification means from among the plurality of registers of the register section, and the register selection circuit. In a register update mechanism in an information processing device having an adder that adds contents of a register selected by a circuit and a constant output from the constant generating means, an incremental update included in the register update information from the holding means is performed. 1. A register update mechanism, characterized in that a switching means for switching the direction of decrement update to the opposite direction in response to an exception signal is provided between the holding means and the constant generating means.
JP60197935A 1985-09-06 1985-09-06 Register updating mechanism Pending JPS6258340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60197935A JPS6258340A (en) 1985-09-06 1985-09-06 Register updating mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60197935A JPS6258340A (en) 1985-09-06 1985-09-06 Register updating mechanism

Publications (1)

Publication Number Publication Date
JPS6258340A true JPS6258340A (en) 1987-03-14

Family

ID=16382737

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60197935A Pending JPS6258340A (en) 1985-09-06 1985-09-06 Register updating mechanism

Country Status (1)

Country Link
JP (1) JPS6258340A (en)

Similar Documents

Publication Publication Date Title
JPH0332818B2 (en)
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system
JPS6258340A (en) Register updating mechanism
JPH0830971B2 (en) Programmable controller
JPH056281A (en) Information processor
JP2737524B2 (en) Trace circuit
JPH0347536B2 (en)
JPH0731608B2 (en) Information processing equipment
JPS61838A (en) Microprogram controller
JP2985244B2 (en) Information processing device
JPH07152630A (en) Digital signal processor
JPH0833825B2 (en) Microprocessor
JPS62117041A (en) Microcomputer
JPS6149695B2 (en)
JPH033047A (en) Memory with arithmetic function
JPS6320631A (en) Register selecting system
JPH09106344A (en) Pipeline processor
JPS59129995A (en) Storage device
JPS61190648A (en) Inter-memory data transfer control circuit
JPS6212545B2 (en)
JPH02123426A (en) Microprocessor
JPS6260034A (en) Stored program system controller
JPH01283635A (en) Buffer control circuit
JPH0467229A (en) Microprocessor and memory system
JPH02210543A (en) Data processor