JPH0480824A - Data processor - Google Patents

Data processor

Info

Publication number
JPH0480824A
JPH0480824A JP19571390A JP19571390A JPH0480824A JP H0480824 A JPH0480824 A JP H0480824A JP 19571390 A JP19571390 A JP 19571390A JP 19571390 A JP19571390 A JP 19571390A JP H0480824 A JPH0480824 A JP H0480824A
Authority
JP
Japan
Prior art keywords
register
branch
address
instruction
general
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
JP19571390A
Other languages
Japanese (ja)
Inventor
Takeshi Morisada
森定 剛
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 JP19571390A priority Critical patent/JPH0480824A/en
Publication of JPH0480824A publication Critical patent/JPH0480824A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the estimation of undesired branch destinations and also to suppress the deterioration of performance due to the estimation of the undesired branch destinations by controlling the change of contents of a general-purpose register used for generation of addresses of the branch destinations. CONSTITUTION:When a branch instruction is registered into a branch history table 31, the Fxy shown by the lower rank bits of an instruction address register 2 are all set at '1'. When this instruction is taken out in the next time, the output of a branch instruction address comparator 9 is set at '1' since the coincidence is secured between the instruction extracting address of the register 2 and the output of a branch instruction address buffer 6. Under such conditions, the Fxy related to a register is reset to '0' as long as the contents of this register are previously changed. Thus the output of an AND circuit 10 is set at '0' and '1' when the Fxy selected by the No of a register No register 4 pointed by the instruction extracting address is equal to '0' and '1' respectively. These Fxy are set to a branch destination detection flag 11.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータ処理における分岐ヒストリテーブルの読
出し時の制御に利用する。本発明は分岐先アドレス生成
に汎用レジスタの内容を使用し分岐命令読出しを行うと
きに余分な分岐先の予測を抑止して性能を向上させるこ
とができるデータ処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application] The present invention is used for control when reading a branch history table in data processing. The present invention relates to a data processing device that uses the contents of a general-purpose register to generate a branch destination address and can improve performance by suppressing redundant branch destination prediction when reading a branch instruction.

〔ヰ既要二 本発明は分岐命令のアドレスと、この分岐命令の分岐先
アドレスとを対にして記憶する分岐ヒストリテーブル、
およびアドレス修飾に用いる汎用レジスタを備えたデー
タ処理装置において、分岐先のアドレス生成に使用した
汎用レジスタの内容の変更を管理し、予測に適さないと
きには出力を禁止することにより、 余分な分岐先の予測によって発生する性能低下を抑える
ようにしたものである。
[2] The present invention provides a branch history table that stores the address of a branch instruction and the branch destination address of this branch instruction as a pair;
In a data processing device equipped with a general-purpose register used for address modification, the content of the general-purpose register used to generate the address of the branch destination is managed, and output is prohibited when it is not suitable for prediction. This is designed to suppress performance degradation caused by prediction.

〔従来の技術〕[Conventional technology]

従来の分岐ヒストリテーブルは特公昭50−22384
号公報(U S P70942)に開示されているよう
に、命令取出し時の命令取出しアドレスによって分岐先
アドレスを予測することを可能にし、分岐命令を処理す
る以前に分岐先命令を先取りすることをできるようにし
て分岐命令の処理の高速化を計ったものがある。第5図
はその構成を示したものである。
The conventional branch history table was published in Tokuko Sho 50-22384.
As disclosed in US Pat. No. 70942, it is possible to predict the branch destination address based on the instruction fetch address at the time of instruction fetch, and it is possible to prefetch the branch destination instruction before processing the branch instruction. There is a method that speeds up the processing of branch instructions in this way. FIG. 5 shows its configuration.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

しかしながら、分岐命令の分岐先アドレス生成に汎用レ
ジスタを使用している場合、その分岐命令は汎用レジス
タの内容で分岐先アドレスを変更することを意図したも
のであり、せっかく分岐ヒストリテーブルに記憶しても
その分岐先アドレスが変更されたときに、実際そのこと
が判明するのは分岐命令を処理しているときであるため
、その後処理によって高速に処理できず、ペナルティに
より遅くなってしまう可能性がある。
However, when a general-purpose register is used to generate a branch destination address for a branch instruction, the branch instruction is intended to change the branch destination address based on the contents of the general-purpose register, so it is not necessary to store it in the branch history table. However, when the branch destination address changes, this is actually known when the branch instruction is being processed, so there is a possibility that subsequent processing will not be able to process it quickly, and that it will become slower due to penalties. be.

本発明はこのような問題を解決するもので、分岐先アド
レスが変更されても処理を高速に行うことができる装置
を提供することを目的とする。
The present invention solves these problems, and aims to provide a device that can perform processing at high speed even if the branch destination address is changed.

〔課題を解決するたtの手段〕[Means to solve the problem]

本発明は、分岐命令のアドレスと、この分岐命令の分岐
先アドレスとを対にして記憶する分岐ヒストリテーブル
と、アドレスの修飾に用いる複数の汎用レジスタとを備
えたデータ処理装置において、前記分岐ヒストリテーブ
ルの各エントリに対応して分岐先アドレス生成時に前記
汎用レジスタを使用したかどうかを示すアドレス生成情
報を記憶する第一の記憶手段と、前記汎用レジスタの内
容を変更する際にどの汎用レジスタを変更したかを記憶
する第二の記憶手段と、前記分岐ヒス) IJテーブル
に記憶された命令取出しアドレスで比較する分岐命令の
アドレスに対応して前記第一の記憶手段からアドレス生
成情報を読出す読出し手段とを含むレジスタ可変検出回
路を設け、命令取出し時に、命令取出しアドレスと前記
分岐ヒストリテーブルに記憶された分岐命令のアドレス
とを比較する分岐命令アドレス比較器と、前記読出し手
段によって読出されたアドレス生成情報により示された
前記汎用レジスタが前記第二の記憶手段によってその内
容が変更されていることが示されているときに、前記分
岐命令アドレス比較器によって示された比較結果を無効
にする回路とを備えたことを特徴とする。
The present invention provides a data processing device that includes a branch history table that stores the address of a branch instruction and a branch destination address of this branch instruction as a pair, and a plurality of general-purpose registers that are used to modify the address. a first storage means for storing address generation information indicating whether or not the general-purpose register is used when generating a branch destination address corresponding to each entry in the table; and which general-purpose register is used when changing the contents of the general-purpose register; a second storage means for storing whether the change has been made; and the branch histogram); reading address generation information from the first storage means corresponding to the address of the branch instruction to be compared with the instruction fetch address stored in the IJ table; a register variable detection circuit including a reading means; a branch instruction address comparator for comparing an instruction fetch address with an address of a branch instruction stored in the branch history table when fetching an instruction; invalidating the comparison result indicated by the branch instruction address comparator when the second storage means indicates that the contents of the general-purpose register indicated by the address generation information have been changed; It is characterized by being equipped with a circuit.

前記第一の記憶手段は、前記分岐ヒストリテーブルと対
応して分岐命令の分岐先アドレス生成時に使用した前記
汎用レジスタの番号を記憶するしジスク番号バッファで
あり、前記第二の記憶手段には、レジスタの書換えを管
理する書込みレジスタデコーダおよび変更レジスタデコ
ーダと、各エンl−IJと前記汎用レジスタ対応にその
内容の変更を管理する複数のフリップフロップとを含み
、前記読出し手段には、前記分岐ヒス) IJ子テーブ
ル索引時に対応エン) IJの前記各汎用レジスタの内
容の変更状況を出力する複数のエントリ読出し選択器と
、前記分岐ヒストリテーブルの索引時に分岐先アドレス
生成に使用する前記汎用レジスタに変更があったか否か
を示すレジスタ選択器とを含むことが望ましい。
The first storage means is a disk number buffer that stores the number of the general-purpose register used when generating the branch destination address of the branch instruction in correspondence with the branch history table, and the second storage means includes: The reading means includes a write register decoder and a change register decoder that manage register rewriting, and a plurality of flip-flops that manage changes in the contents corresponding to each encoder I-IJ and the general-purpose register. ) Corresponding when indexing the IJ child table) Multiple entry read selectors that output the change status of the contents of each of the general-purpose registers of the IJ, and changes to the general-purpose registers used to generate branch destination addresses when indexing the branch history table. It is preferable to include a register selector indicating whether or not there was a register selector.

〔作用〕[Effect]

命令取出し時に、命令取出しアドレスと分岐ヒス) I
J子テーブル記憶された分岐命令のアドレスとを比較し
、この命令取出しアドレスで比較している分岐ヒストリ
テーブルに記憶された分岐命令のアドレスに対応して、
分岐先アドレス生成時に汎用レジスタを使用したかどう
かを示すアドレス生成情報を読出す。このアドレス生成
情報により汎用レジスタが変更されていることが示され
ていれば、命令取出しアドレスと分岐ヒストリテーブル
に記憶された分岐命令のアドレスとの比較結果の送出を
禁止する。
When fetching an instruction, the instruction fetch address and branch history) I
Compare the address of the branch instruction stored in the J child table, and use this instruction fetch address to correspond to the address of the branch instruction stored in the branch history table being compared.
Read address generation information indicating whether a general-purpose register was used when generating a branch destination address. If this address generation information indicates that the general-purpose register has been changed, sending out the comparison result between the instruction fetch address and the address of the branch instruction stored in the branch history table is prohibited.

このように、分岐先のアドレス生成に使用した汎用レジ
スタの内容の変更を管理することにより、余分な分岐先
の予測を抑えるとともに、それによって発生する性能の
低下を抑止することができる。
In this manner, by managing the changes in the contents of the general-purpose register used to generate the address of the branch destination, it is possible to suppress redundant prediction of the branch destination and to prevent the performance from decreasing due to the prediction.

口実絶倒〕 次に、本発明実施例を図面に基づいて説明する。Absolute excuse] Next, embodiments of the present invention will be described based on the drawings.

第1図は本発明実施例の構成を示すブロック図、第2図
は本発明実施例に係るレジスタ変更検出回路の構成を示
すブロック図、第3図は本発明実施例に係る全体構成を
示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, FIG. 2 is a block diagram showing the configuration of a register change detection circuit according to the embodiment of the present invention, and FIG. 3 is a block diagram showing the overall configuration of the embodiment of the present invention. It is a block diagram.

本発明実施例に係る全体構成としては、第3図に示すよ
うに命令取出し制御回路32、アドレス生成回路33、
主記憶装置34、実行部35、分岐ヒストリテーブル3
1、分岐命令アドレス比較器9、およびAND回路10
を備える。
As shown in FIG. 3, the overall configuration according to the embodiment of the present invention includes an instruction fetch control circuit 32, an address generation circuit 33,
Main storage device 34, execution unit 35, branch history table 3
1, branch instruction address comparator 9, and AND circuit 10
Equipped with

次に、本発明実施例の構成の詳細を第1図および第2図
を参照して説明する。
Next, details of the configuration of the embodiment of the present invention will be explained with reference to FIGS. 1 and 2.

本発明実施例は、分岐命令のアドレスと、この分岐命令
の分岐先アドレスとを対にして記憶する分岐ヒス) +
J子テーブル1と、アドレスの修飾に用いる命令アドレ
スレジスタ (IAR)2、分岐先アドレス書込みレジ
スタ (DAVv’R)3、レジスタ番号レジスタ(R
NR)4、および予測分岐先アドレスレジスタ(PDA
R)12の汎用レジスタとを備え、さらに本発明の特徴
として、分岐ヒストリテーブル31の各エン)IJに対
応して分岐先アドレス生成時に前記各汎用レジスタを使
用したかどうかを示すアドレス生成情報を記憶する第一
の記憶手段としてのレジスタ番号バッファ(RNB)8
1と、前記各汎用レジスタの内容を変更する際にどの汎
用レジスタを変更したかを記憶する第二の記憶手段とし
ての書込みレジスタデコーダ(WRD)82、変更レジ
スタデコーダ(URD)83、および複数のフリップフ
ロップ84と、分岐ヒストリテーブル31に記憶された
命令取出しアドレスで比較する分岐命令のアドレスに対
応してレジスタ番号バッファ(RNB)81からアドレ
ス生成情報を読出す読出し手段としての複数のエン) 
IJ読出し選択器(ERX)85と、レジスタ選択器(
RX)86とを含むレジスタ可変検出回路(RUCC)
8が設けられる。
The embodiment of the present invention has a branch history (branch history) that stores the address of a branch instruction and the branch destination address of this branch instruction as a pair.
J child table 1, instruction address register (IAR) 2 used for address modification, branch destination address write register (DAVv'R) 3, and register number register (R
NR) 4, and predicted branch destination address register (PDA
R) 12 general-purpose registers, and as a feature of the present invention, address generation information indicating whether each of the general-purpose registers is used when generating a branch destination address is provided corresponding to each entry (IJ) of the branch history table 31. Register number buffer (RNB) 8 as a first storage means for storing
1, a write register decoder (WRD) 82, a change register decoder (URD) 83, and a plurality of A flip-flop 84 and a plurality of encoders as reading means for reading address generation information from the register number buffer (RNB) 81 in correspondence with the address of the branch instruction compared with the instruction fetch address stored in the branch history table 31).
IJ read selector (ERX) 85 and register selector (
Register variable detection circuit (RUCC) including RX) 86
8 is provided.

書込みフラグ(WF)1は、分岐ヒストリテーブルの動
作を示すフリップフロップであり、この書込みフラグ(
WF)1の“1”の場合登録を示し、“0”の場合索引
を示す。書込みフラグ(WF)1は命令取出し制御回路
(IFC)32から送aされる信号を信号線101を介
して受けられ、信号線106を介して分岐命令アドレス
バッファ(TAB)6、分岐先アドレスバッファ (D
AB)7、レジスタ変更検出回路(RUCC)8および
分岐命令アドレス比較器(TAC)9に送出される。
Write flag (WF) 1 is a flip-flop that indicates the operation of the branch history table.
WF) 1: “1” indicates registration; “0” indicates index. A write flag (WF) 1 receives a signal a sent from an instruction fetch control circuit (IFC) 32 via a signal line 101, and is connected to a branch instruction address buffer (TAB) 6 and a branch destination address buffer via a signal line 106. (D
AB) 7, register change detection circuit (RUCC) 8 and branch instruction address comparator (TAC) 9.

命令アドレスレジスタ(IAR)2は、命令取出し時の
命令取出しアドレスまたは分岐命令の分岐ヒストリテー
ブルの登録時の分岐命令の命令アドレスを保持するため
のレジスタであり、信号線102を介しアドレス生成回
路(ADC)33から送出された命令アドレスを受け、
この命令アドレスを信号線107を介しその上位ビット
を分岐命令アドレスバッファ(TAB)6および分岐命
令アドレス比較器(TAC)9に送出し、また信号線1
08を介しその下位ビットを分岐命令アドレスバッファ
 (TAB)6、分岐先アドレスバッファ (DAB)
7およびレジスタ変更検出回路(RUCC)8に送出す
る。
The instruction address register (IAR) 2 is a register for holding an instruction fetch address at the time of fetching an instruction or an instruction address of a branch instruction at the time of registering the branch history table of the branch instruction. Receives the command address sent from ADC) 33,
This instruction address is sent via signal line 107 to the branch instruction address buffer (TAB) 6 and branch instruction address comparator (TAC) 9, and the signal line 1
08 to the branch instruction address buffer (TAB) 6, branch destination address buffer (DAB)
7 and a register change detection circuit (RUCC) 8.

分岐先アドレス書込みレジスタ (DAWR)3は、分
岐命令を分岐ヒストリテーブルへ登録する際に、その分
岐先アドレスを保持するレジスタであり、アドレス生成
回路(ADC)33より送出された分岐先アドレスを信
号線103を介して受け、信号線109を介して分岐先
アドレスバッファ(DAB)7に送出する。
The branch destination address write register (DAWR) 3 is a register that holds the branch destination address when registering a branch instruction in the branch history table, and outputs the branch destination address sent from the address generation circuit (ADC) 33 as a signal. It is received via line 103 and sent to branch destination address buffer (DAB) 7 via signal line 109.

レジスタ番号レジスタ(RNR)4は、分岐命令の分岐
ヒス) +Jテーブル登録時に分岐先アドレスを生成し
たときに使用した汎用レジスタ番号を受け、また汎用レ
ジスタの内容を変更する場合にはその汎用レジスタ番号
を受けるレジスタであり、実行部35から送出されるレ
ジスタ番号を受は信号線110を介してレジスタ変更検
出回路(RUCC)8に送出する。
Register number register (RNR) 4 receives the general-purpose register number used when generating the branch destination address when registering the branch instruction +J table, and also receives the general-purpose register number when changing the contents of the general-purpose register. The register number sent from the execution unit 35 is sent to the register change detection circuit (RUCC) 8 via the signal line 110.

レジスタ変更フラグ(RUF)5は、汎用レジスタ変更
の場合にレジスタ番号レジスタ(RNR)4にレジスタ
番号を受けると同時に点灯するフリップフロップであり
、実行部35から信号線1(15を介して受けた信号を
信号線111を介してレジスタ変更検出回路(RUCC
)8に送出する。
The register change flag (RUF) 5 is a flip-flop that lights up at the same time as the register number is received in the register number register (RNR) 4 when a general-purpose register is changed. The signal is sent to the register change detection circuit (RUCC) via the signal line 111.
)8.

分岐命令アドレスバッファ(TAB)6は、分岐ヒスト
リテーブルのうち分岐命令のアドレスを記憶するメモリ
であり、信号線106を介し書込みフラグ1から登録を
指示された場合、信号線108を介し命令アドレスレジ
スタ(IAR)2の下位ビットで示されるアドレスに信
号線107を介し命令アドレスレジスタ(IAR)2の
上位ビットで示される命令アドレス情報を記憶し、書込
みフラグ(WF)1が登録を指示していない場合、信号
線108を介して示されたアドレスから命令アドレス情
報を読出し信号線112に送出する。
The branch instruction address buffer (TAB) 6 is a memory that stores the address of a branch instruction in the branch history table, and when it is instructed to register from the write flag 1 via the signal line 106, it is stored in the instruction address register via the signal line 108. The instruction address information indicated by the upper bits of the instruction address register (IAR) 2 is stored in the address indicated by the lower bits of (IAR) 2 via the signal line 107, and the write flag (WF) 1 does not instruct registration. In this case, the command address information is read from the address indicated via the signal line 108 and sent to the read signal line 112.

分岐先アドレスバッファ(D’AB)7は、分岐命令ア
ドレスバッファ(TAB>6に対応してその分岐先アド
レスを記憶するメモリであり、信号線106を介し書込
みフラグ(WF)1より登録を指示された場合、信号線
108を介し命令アドレスレジスタ(IAR)2の下位
ビットで示されるアドレスに信号線109を介し分岐先
アドレス書込みレジスタ(DAWR)3により示される
分岐先アドレスを記憶し、書込みフラグ1が登録を指示
していない場合は信号線108を介して示されるアドレ
スから分岐先アドレスを読出し、信号線113を介して
予測分岐先アドレスレジスタ (PDAR)12に送出
する。
The branch destination address buffer (D'AB) 7 is a memory that stores the branch destination address corresponding to the branch instruction address buffer (TAB>6), and is instructed to register from the write flag (WF) 1 via the signal line 106. If the branch destination address is indicated by the branch destination address write register (DAWR) 3 via the signal line 109, it is stored in the address indicated by the lower bits of the instruction address register (IAR) 2 via the signal line 108, and the write flag is set. 1 does not instruct registration, the branch destination address is read from the address indicated via the signal line 108 and sent to the predicted branch destination address register (PDAR) 12 via the signal line 113.

レジスタ変更検出回路(RUCC)8は、本発明の特徴
とするところであり、信号線106.108.110.
111を介し、各々書込みフラグ1、命令アドレスレジ
スタ (IAR)2の下位ビット、レジスタ番号レジス
タ(RNR)4、レジスタ変更フラグ(RUF)5より
送出される情報を受け、比較許可信号を信号線114を
介しAND回路10に送出する。
The register change detection circuit (RUCC) 8 is a feature of the present invention, and is connected to the signal lines 106, 108, 110, .
Information sent from the write flag 1, the lower bit of the instruction address register (IAR) 2, the register number register (RNR) 4, and the register change flag (RUF) 5 are received via the signal line 111, and a comparison permission signal is sent to the signal line 114. The signal is sent to the AND circuit 10 via.

分岐命令アドレス比較器(TAC)9は、命令取出しア
ドレスと分岐ヒストリテーブルに記憶された分岐命令ア
ドレスを比較する回路であり、信号線106を介して送
出された書込みフラグ(WF)lの出力が“1”である
場合は“0”を信号線115に送出し、書込みフラグ(
”vVF)1の出力が“0”である場合は信号線107
を介し送出される命令アドレスレジスタ(IAR)2の
上位ビットと信号線112を介し分岐命令アドレスバッ
ファ(TAB)6より送出される命令アドレス情報とを
比較し、その結果等しければ“1”、等しくなければ“
0”を信号線115を介しAND回路10に送出する。
The branch instruction address comparator (TAC) 9 is a circuit that compares the instruction fetch address with the branch instruction address stored in the branch history table. If it is “1”, “0” is sent to the signal line 115, and the write flag (
If the output of “vVF)1 is “0”, the signal line 107
The upper bit of the instruction address register (IAR) 2 sent out via the signal line 112 is compared with the instruction address information sent out from the branch instruction address buffer (TAB) 6 via the signal line 112, and if the result is equal, it is "1". If not “
0'' is sent to the AND circuit 10 via the signal line 115.

AND回路10は、索引結果を求めるた砧に論理積をと
るアンド回路であり、信号線115を介し分岐命令アド
レス比較器(TAC)9より送出される比較結果と信号
線114を介しレジスタ変更検出回路(RUCC)gよ
り送出される比較許可信号の論理積をとり、その結果を
検出信号として信号線116を介し分岐先検出フラグ(
DHF)11に送出する。
The AND circuit 10 is an AND circuit that performs a logical product on the index result obtained, and detects a register change via the signal line 114 with the comparison result sent from the branch instruction address comparator (TAC) 9 via the signal line 115. The logical product of the comparison permission signals sent from the circuit (RUCC) g is taken, and the result is used as a detection signal to send the branch destination detection flag (
DHF) 11.

分岐先検出フラグ(DHF)11は2予測分岐先アドレ
スが検出されたことを示すフラグであり、信号線116
を介しAND回路10より送出された検出信号を受は信
号線117を介し命令取出し制御回路(IFC)32に
送出する。
The branch destination detection flag (DHF) 11 is a flag indicating that a 2-prediction branch destination address has been detected, and the signal line 116
The detection signal sent from the AND circuit 10 is sent to the instruction fetch control circuit (IFC) 32 via a signal line 117.

予測分岐先アドレスレジスフ (PDAR)12は、分
岐先検出フラグ(DHF)11と同期してその予測分岐
先アドレスを受けるレジスタであり、信号線113を介
し分岐先アドレスバッファ(DAB)7より送出される
分岐先アドレスを受け、信号線118を介しアドレス生
成回路(ADC)33に送出する。
The predicted branch destination address register (PDAR) 12 is a register that receives the predicted branch destination address in synchronization with the branch destination detection flag (DHF) 11, and is sent from the branch destination address buffer (DAB) 7 via the signal line 113. It receives the branch destination address and sends it to the address generation circuit (ADC) 33 via the signal line 118.

第2図は本発明実施例におけるレジスタ可変検出回路の
構成を示すブロック図である。レジスタ番号バッファ(
RNB)81は、分岐命令アドレスバッファ(TAB)
6、分岐先アドレスバッファ(DAB)7と対応して分
岐命令の分岐先アドレス生成時に使用した汎用レジスタ
の番号を記憶するメモリであり、信号線106を介し書
込みフラグ(WF)1より登録が指示された場合に、信
号線108を介し命令アドレスレジスタ(IAR)2の
下位ビットによって示されるアドレスに信号線110を
介しレジスタ番号レジスタ (RNR)4によって示さ
れるレジスタ番号を記憶し、書込みフラグ1が登録を示
してない場合は同アドレスから記憶しているレジスタ番
号を読出し、信号線801を介しレジスタ選択器(RX
)86へ送出する。
FIG. 2 is a block diagram showing the configuration of the register variable detection circuit in the embodiment of the present invention. Register number buffer (
RNB) 81 is a branch instruction address buffer (TAB)
6. Branch destination address buffer (DAB) This is a memory that stores the number of the general-purpose register used when generating the branch destination address of a branch instruction, corresponding to 7. Registration is instructed by write flag (WF) 1 via signal line 106. When the write flag 1 is set, the register number indicated by the register number register (RNR) 4 is stored via the signal line 110 at the address indicated by the lower bits of the instruction address register (IAR) 2 via the signal line 108, and the write flag 1 is set. If registration is not indicated, read the stored register number from the same address and send it to the register selector (RX) via the signal line 801.
)86.

書込みレジスタデコーダ(WRD)82は、レジスタ内
容の書換えを管理するためのデコーダであり、信号線1
06を介し書込みフラグ(WF)1より登録が指示され
た場合、信号線108を介し命令アドレスレジスタ (
IAR)2の下位ビットをデコードし、それに対応する
出力線802.803.804だけを“1”にし、また
書込みフラグ(W F )1が登録を指示していない場
合はすべての出力線802.803、−、.804は“
0”のままである。また、出力線802.803、80
4は各々フラグFooF+。
A write register decoder (WRD) 82 is a decoder for managing rewriting of register contents, and is a decoder for managing rewriting of register contents.
When registration is instructed by write flag (WF) 1 via signal line 108, the instruction address register (
The lower bits of IAR)2 are decoded and only the corresponding output lines 802.803.804 are set to "1", and if the write flag (W F )1 does not indicate registration, all output lines 802.802. 803,-,. 804 is “
0". Also, the output lines 802, 803, 80
4 is each flag FooF+.

F mQ、  FIIFI+””’Fml+ ””’F
OIFlh””’F+attに接続され、nは分岐命令
アドレスバッファ(TAB)6、分岐先アドレスバッフ
ァ (DAB)7、レジスタ番号バッファ(RNB)8
1のエントリ分、mはレジスタの数だけ存在する。
F mQ, FIIFI+""'Fml+ ""'F
OIFlh""' is connected to F+att, and n is branch instruction address buffer (TAB) 6, branch destination address buffer (DAB) 7, register number buffer (RNB) 8
For one entry, there are as many m as there are registers.

変更レジスタデコーダ(URD)83は、書込みレジス
タデコーダ(WRD)82同様にレジスタ内容の書換え
を管理するためのデコーダであり、信号線111を介し
レジスタ変更フラグ(RUF)5よりレジスタの内容の
変更を示された場合、信号線110を介しレジスタ番号
レジスタ (RNR)4によって示されるレジスタ番号
に対応する出力線805.806、807だけを“1”
にし、また変更を示されなかった場合は、すべての出力
線を“0”にする。出力線805.806、807 は
各々FooFa+F OR+  F I OF I +
””’ F l n+ ””’ F IROF ff1
l l””’ F mnに接続される。
The change register decoder (URD) 83, like the write register decoder (WRD) 82, is a decoder for managing the rewriting of register contents. If indicated, only the output lines 805, 806 and 807 corresponding to the register number indicated by the register number register (RNR) 4 via the signal line 110 are set to “1”.
If no change is indicated, all output lines are set to "0". Output lines 805, 806 and 807 are respectively FooFa+FOR+FI OFI+
""' F l n+ ""' F IROF ff1
l l""' F mn.

フラグ(F 、y) (x = 0−m5Y = (L
−n ) 84は各エントリ (y)と各汎用レジスタ
(X)対応に汎用レジスタ内容の変更を管理するための
フリップフロップ(F/F)であり、例えばF。0の場
合、出力線802を介し書込みレジスタデコーダ(WR
D)82より新しいエントリに対する登録が示される(
“1”になる)とセットされ“1”となり、それを保持
し、出力線805を介し変更レジスタデコーダ(URD
)83より該当汎用レジスタの変更が示された場合リセ
ットされ“0″′となる。また、その出力はエントリ読
出し選択器(ERX)85に各汎用レジスタ対応に出力
される。
Flag (F, y) (x = 0-m5Y = (L
-n) 84 is a flip-flop (F/F) for managing changes in general-purpose register contents corresponding to each entry (y) and each general-purpose register (X); 0, the write register decoder (WR
D) Registration for entries newer than 82 is indicated (
It is set to "1" and held, and is sent to the change register decoder (URD) via the output line 805.
) 83 indicates that the corresponding general-purpose register has been changed, it is reset to "0"'. Further, the output is outputted to an entry read selector (ERX) 85 corresponding to each general-purpose register.

エン) IJ読出し選択器(ERX)85は、分岐ヒス
) IJテーブルの索引時に対応エントリの各汎用レジ
スタの内容の変更状況を出力するための選択器であり、
各汎用レジスタ対応にFIIY(X=0・m、y=On
)の出力線を受け、信号線108を介し命令アドレスレ
ジスタ(IAR)2の下位ビットで示されるエントリの
出力を選択し、レジスタ選択器(RX)86に出力する
The IJ read selector (ERX) 85 is a selector for outputting the change status of the contents of each general-purpose register of the corresponding entry when indexing the IJ table.
FIIY (X=0・m, y=On) for each general-purpose register
), selects the output of the entry indicated by the lower bit of the instruction address register (IAR) 2 via the signal line 108, and outputs it to the register selector (RX) 86.

レジスタ選択器(RX)86は、分岐ヒストリテーブル
の索引時に分岐先アドレス生成に使用する汎用レジスタ
に変更があったかどうかを示す選択器であり、エントリ
読出し選択器(ERX)85の各々の出力を受け、信号
線801を介しレジスタ番号バッファ(RNB)811
により示される汎用レジスタ番号により選択し、信号線
114を介しAND回路IOに出力する。
The register selector (RX) 86 is a selector that indicates whether or not there has been a change in the general-purpose register used to generate a branch destination address when indexing the branch history table, and receives the output of each entry read selector (ERX) 85. , register number buffer (RNB) 811 via signal line 801
It is selected based on the general-purpose register number indicated by and outputted to the AND circuit IO via the signal line 114.

次に、本発明実施例の動作について説明する。Next, the operation of the embodiment of the present invention will be explained.

第4図は本発明実施例の動作の流れを示す流れ図である
FIG. 4 is a flowchart showing the operation flow of the embodiment of the present invention.

まだ分岐ヒストリテーブルに1に該当する分岐命令が登
録されてない場合、命令アドレスレジスタ(IAR)2
に命令取出しアドレスがセットされても、分岐命令アド
レスバッファ(TAB)6の出力(信号線112への出
力)と一致しないため、分岐命令アドレス比較器(TA
C)9の出力(信号線115への出力)が“O”となり
、AND回路10の出力(信号線116への出力)も“
0”となり分岐先検出フラグ(DHF)11は点灯しな
い。
If the branch instruction corresponding to 1 is not yet registered in the branch history table, the instruction address register (IAR) 2
Even if the instruction fetch address is set in
C) The output of 9 (output to signal line 115) becomes "O", and the output of AND circuit 10 (output to signal line 116) also becomes "
0'' and the branch destination detection flag (DHF) 11 does not light up.

分岐ヒストリテーブル31に分岐命令を登録する場合、
書込みフラグ(WF)1が点灯する(“1”になる)と
同時に分岐命令の命令アドレスが命令アドレスレジスタ
(IAR)2に、分岐先アドレスが分岐先アドレス書込
みレジスタ(DAWR)3に、分岐先アドレスの生成に
使用した汎用レジスタ番号がレジスタ番号レジスタ(R
NR)4にセットされる。書込みフラグ(WF)1が“
1”になったことにより分岐命令アドレスバッファ(T
AB)6の命令アドレスレジスタ (IAR)2の下位
ビットで示されるアドレスに命令アドレスレジスタ(I
AR)2の上位ビットが分岐先アドレスバッファ (D
AB)7には、分岐先アドレス書込みレジスタ (DA
WR)3の内容がレジスタ番号バッファ(RNB)81
にはレジスタ番号レジスタ(RNR)4で示されるレジ
スタ番号が書込まれ、これと同時に命令アドレスレジス
タ(IAR)2の下位ビットで示されるF xyが全て
“1”にセットされる。
When registering a branch instruction in the branch history table 31,
At the same time that write flag (WF) 1 lights up (becomes "1"), the instruction address of the branch instruction is written to instruction address register (IAR) 2, the branch destination address is written to branch destination address write register (DAWR) 3, and the branch destination address is written to instruction address register (IAR) 2. The general register number used to generate the address is the register number register (R
NR) is set to 4. Write flag (WF) 1 is “
1”, the branch instruction address buffer (T
AB) 6 instruction address register (IAR) The address indicated by the lower bit of 2 is the instruction address register (IAR).
The upper bit of AR) 2 is the branch destination address buffer (D
AB) 7 contains a branch destination address write register (DA
The contents of WR) 3 are the register number buffer (RNB) 81
The register number indicated by the register number register (RNR) 4 is written into , and at the same time, F xy indicated by the lower bits of the instruction address register (IAR) 2 are all set to "1".

次回に命令を取出すときは、命令アドレスレジスタ(I
AR)2の命令取出しアドレスと、分岐命令アドレスバ
ッファ(TAB)6の出力とが一致するので分岐命令ア
ドレス比較器(TAC)9の出力が“1′″となる。こ
のとき、それ以前にレジスタの内容が変更されていれば
そのレジスタに関するF )lyがリセットされ“0″
になっている。
The next time you retrieve an instruction, use the instruction address register (I
Since the instruction fetch address of AR) 2 and the output of the branch instruction address buffer (TAB) 6 match, the output of the branch instruction address comparator (TAC) 9 becomes "1'". At this time, if the contents of the register have been changed before then, the F)ly associated with that register is reset to "0".
It has become.

これにより、この命令取出しアドレスで示されるレジス
タ番号レジスタ(RNR)4のレジスタ番号で選択され
るF llyが“0”であれはA N D回路10の出
力が“0”、FMyが“1”であれば“1”となり、そ
れが分岐先検出フラグ(DHF)11にセットされる。
As a result, if Flly selected by the register number of the register number register (RNR) 4 indicated by this instruction fetch address is "0", the output of the AAND circuit 10 is "0" and FMy is "1". If so, it becomes "1" and is set in the branch destination detection flag (DHF) 11.

〔発胡の効果〕[Effect of Hathu]

以上説明したように本発明によれば、分岐先のアドレス
生成に使用した汎用レジスタの内容の変更を管理するこ
とにより、余分な分岐先の予測を抑止するとともに、そ
れによって発生する性能低下を抑止することができる効
果がある。
As explained above, according to the present invention, by managing changes in the contents of general-purpose registers used to generate branch destination addresses, redundant prediction of branch destinations is suppressed, and performance degradation caused by this is suppressed. There is an effect that can be done.

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

第1図は本発明実施例の構成を示すブロック図。 第2図は本発明実施例に係るレジスタ変更検出回路の構
成を示すブロック図。 第3図は本発明実施例に係る全体構成を示すブロック図
。 第4図は本発明実施例の動作の流れを示すフローチャー
ト。 第5図は従来の構成を示すブロック図。 1・・・書込みフラグ(WF)、2・・・命令アドレス
レジスタ (IAR) 、3・・・分岐先アドレス書込
みレジスタ (DAWR) 、4・・・レジスタ番号レ
ジスタ (RNR)、5・・・レジスタ変更フラグ(R
UF)6・・・分岐命令アドレスバッファ(TAB) 
、?・・・分岐先アドレスバッファ(DAB) 、訃・
・レジスタ変更検出回路(RUCC) 、9・・・分岐
命令アドレス比較器(TAC) 、10・・・AND回
路、11・・・分岐先検出フラグ(DHF) 、12・
・・予測分岐先アドレスレジスタ (PDAR) 、3
1・・・分岐ヒストリテーブル、32・・・命令取出し
制御回路(IFC)、33・・・アドレス生成回路(A
DC) 、34・・・主記憶装置、35・・・実行部、
81・・・レジスタ番号バッファ(RNB)82・・・
書込みレジスタデコーダ(WR’D) 、83・・・変
更レジスタデコーダ(URD) 、84・・・フリップ
フロップ、85・・・エントリ読出し選択器(ERX)
、86・・・レジスタ選択器(RX)。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a block diagram showing the configuration of a register change detection circuit according to an embodiment of the present invention. FIG. 3 is a block diagram showing the overall configuration according to an embodiment of the present invention. FIG. 4 is a flowchart showing the operation flow of the embodiment of the present invention. FIG. 5 is a block diagram showing a conventional configuration. 1...Write flag (WF), 2...Instruction address register (IAR), 3...Branch destination address write register (DAWR), 4...Register number register (RNR), 5...Register Change flag (R
UF) 6...Branch instruction address buffer (TAB)
,? ...Branch destination address buffer (DAB),
・Register change detection circuit (RUCC), 9... Branch instruction address comparator (TAC), 10... AND circuit, 11... Branch destination detection flag (DHF), 12.
...Predicted branch destination address register (PDAR), 3
1... Branch history table, 32... Instruction fetch control circuit (IFC), 33... Address generation circuit (A
DC), 34... Main storage device, 35... Execution unit,
81...Register number buffer (RNB) 82...
Write register decoder (WR'D), 83... Change register decoder (URD), 84... Flip-flop, 85... Entry read selector (ERX)
, 86...Register selector (RX).

Claims (1)

【特許請求の範囲】 1、分岐命令のアドレスと、この分岐命令の分岐先アド
レスとを対にして記憶する分岐ヒストリテーブルと、 アドレスの修飾に用いる複数の汎用レジスタとを備えた
データ処理装置において、 前記分岐ヒストリテーブルの各エントリに対応して分岐
先アドレス生成時に前記汎用レジスタを使用したかどう
かを示すアドレス生成情報を記憶する第一の記憶手段と
、 前記汎用レジスタの内容を変更する際にどの汎用レジス
タを変更したかを記憶する第二の記憶手段と、 前記分岐ヒストリテーブルに記憶された命令取出しアド
レスで比較する分岐命令のアドレスに対応して前記第一
の記憶手段からアドレス生成情報を読出す読出し手段と を含むレジスタ可変検出回路を設け、 命令取出し時に、命令取出しアドレスと前記分岐ヒスト
リテーブルに記憶された分岐命令のアドレスとを比較す
る分岐命令アドレス比較器と、前記読出し手段によって
読出されたアドレス生成情報により示された前記汎用レ
ジスタが前記第二の記憶手段によってその内容が変更さ
れていることが示されているときに、前記分岐命令アド
レス比較器によって示された比較結果を無効にする回路
と を備えたことを特徴とするデータ処理装置。 2、前記第一の記憶手段は、前記分岐ヒストリテーブル
と対応して分岐命令の分岐先アドレス生成時に使用した
前記汎用レジスタの番号を記憶するレジスタ番号バッフ
ァであり、前記第二の記憶手段はレジスタの書換えを管
理する書込みレジスタデコーダおよび変更レジスタデコ
ーダと、各エントリと前記汎用レジスタ対応にその内容
の変更を管理する複数のフリップフロップとを含む 請求項1記載のデータ処理装置。 3、前記読出し手段は、 前記分岐ヒストリテーブルの索引時に対応エントリの前
記各汎用レジスタの内容の変更状況を出力する複数のエ
ントリ読出し選択器と、 前記分岐ヒストリテーブルの索引時に分岐先アドレス生
成に使用する前記汎用レジスタに変更があったか否かを
示すレジスタ選択器と を含む請求項1記載のデータ処理装置。
[Claims] 1. In a data processing device comprising a branch history table that stores the address of a branch instruction and the branch destination address of this branch instruction in pairs, and a plurality of general-purpose registers used for modifying addresses. , a first storage means for storing address generation information indicating whether or not the general-purpose register was used when generating a branch destination address corresponding to each entry of the branch history table; a second storage means for storing which general-purpose register has been changed; and address generation information from the first storage means corresponding to the address of the branch instruction to be compared with the instruction fetch address stored in the branch history table. a register variable detection circuit including a readout means for reading, a branch instruction address comparator for comparing an instruction fetch address with an address of a branch instruction stored in the branch history table when fetching an instruction; invalidating the comparison result indicated by the branch instruction address comparator when the second storage means indicates that the content of the general-purpose register indicated by the address generation information has been changed; A data processing device characterized by comprising a circuit for: 2. The first storage means is a register number buffer that stores the number of the general-purpose register used when generating the branch destination address of the branch instruction in correspondence with the branch history table, and the second storage means is a register number buffer that stores the number of the general-purpose register used when generating the branch destination address of the branch instruction. 2. The data processing device according to claim 1, further comprising a write register decoder and a change register decoder for managing rewriting of the general-purpose register, and a plurality of flip-flops for managing changes in contents corresponding to each entry and the general-purpose register. 3. The reading means includes a plurality of entry read selectors that output the change status of the contents of each general-purpose register of the corresponding entry when indexing the branch history table, and a plurality of entry read selectors used to generate a branch destination address when indexing the branch history table. 2. The data processing apparatus according to claim 1, further comprising a register selector that indicates whether or not there has been a change in the general-purpose register.
JP19571390A 1990-07-23 1990-07-23 Data processor Pending JPH0480824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19571390A JPH0480824A (en) 1990-07-23 1990-07-23 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19571390A JPH0480824A (en) 1990-07-23 1990-07-23 Data processor

Publications (1)

Publication Number Publication Date
JPH0480824A true JPH0480824A (en) 1992-03-13

Family

ID=16345739

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19571390A Pending JPH0480824A (en) 1990-07-23 1990-07-23 Data processor

Country Status (1)

Country Link
JP (1) JPH0480824A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06214784A (en) * 1992-10-30 1994-08-05 Internatl Business Mach Corp <Ibm> Computer system for execution of random- sequence command and its operating method
US6782521B2 (en) 1992-03-31 2004-08-24 Seiko Epson Corporation Integrated structure layout and layout of interconnections for an instruction execution unit of an integrated circuit chip

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6782521B2 (en) 1992-03-31 2004-08-24 Seiko Epson Corporation Integrated structure layout and layout of interconnections for an instruction execution unit of an integrated circuit chip
US7174525B2 (en) 1992-03-31 2007-02-06 Seiko Epson Corporation Integrated structure layout and layout of interconnections for an instruction execution unit of an integrated circuit chip
US7555738B2 (en) 1992-03-31 2009-06-30 Seiko Epson Corporation Integrated structure layout and layout of interconnections for an instruction execution unit of an integrated circuit chip
JPH06214784A (en) * 1992-10-30 1994-08-05 Internatl Business Mach Corp <Ibm> Computer system for execution of random- sequence command and its operating method

Similar Documents

Publication Publication Date Title
US7237172B2 (en) Error detection and correction in a CAM
US5123101A (en) Multiple address space mapping technique for shared memory wherein a processor operates a fault handling routine upon a translator miss
JPH0814801B2 (en) Programmable access memory
JPH0644135A (en) Information processor
US7107392B2 (en) Content addressable memory (CAM) device employing a recirculating shift register for data storage
US4395763A (en) Buffer memory control system of the swap system
JPH05210593A (en) Memory partitioning device for microprocessor and method of loading segment descriptor to segment-register
US20050162879A1 (en) Automatic learning in a CAM
US11899985B1 (en) Virtual modules in TCAM
JPH0480824A (en) Data processor
JP3190700B2 (en) Address translator
US7257670B2 (en) Multipurpose CAM circuit
JPH04225429A (en) Data processor
JPH05120133A (en) Cache device
JPH04324194A (en) Rom circuit
JPH04355833A (en) Branch history table control circuit
JPH02133841A (en) Data store control system
JPH0696112A (en) Vector data processing circuit
JPH02176839A (en) Information processor
JPH04357542A (en) Address converter
JPH0335336A (en) Address translation buffer mechanism
JPH04239917A (en) Information processor with branch history table
JPS62154040A (en) Address converting device
JPS6244838A (en) Instruction fetching device
JPS62259158A (en) Interruption request circuit