JPS61216031A - Detection system for operand overlap - Google Patents

Detection system for operand overlap

Info

Publication number
JPS61216031A
JPS61216031A JP60055849A JP5584985A JPS61216031A JP S61216031 A JPS61216031 A JP S61216031A JP 60055849 A JP60055849 A JP 60055849A JP 5584985 A JP5584985 A JP 5584985A JP S61216031 A JPS61216031 A JP S61216031A
Authority
JP
Japan
Prior art keywords
operand
address
comparator
bytes
overlap
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
JP60055849A
Other languages
Japanese (ja)
Inventor
Koichi Shinohara
篠原 公一
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60055849A priority Critical patent/JPS61216031A/en
Publication of JPS61216031A publication Critical patent/JPS61216031A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To detect an operand overlap by providing an address arithmetic unit with a two-input subtracting function and calculating the difference between the 1st and the 2nd operand addresses, and using a 0 detector for the high-order three bytes and a large/small comparator for the least significant byte. CONSTITUTION:When an SS type variable-length instruction is executed, the address computing element AA4 performs subtraction between the 1st and the 2nd operand addresses. The high-order three bytes of the result are inputted to the 0 decision device 23 and the least significant byte is inputted to the comparator. When the output of the 0 decision device 23 is 1, the high-order three bytes are all 0 and the 1st and the 2nd operand addresses are at a distance of <=256 bytes, so that three is the possibility of overlapping. When the output of the 0 decision device 23 is 0, both operand addresses are at a sufficiently long distance, so they never overlap each other. Further, the comparator 24 decides whether the difference between the 1st and the 2nd operand addresses is smaller than the length of the 2nd operand or not, and when the output of the 0 decision device 23 is 1 and the output of the comparator 24 is also 1, decision device 10 decides that the operands overlap each other.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、オペランド・オーバーラツプの検出に関する
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to the detection of operand overlap.

〔発明の背景〕[Background of the invention]

第3図に示す様に、パイプライン処理を行っている場合
のオペランド・オーバーラツプのチェックについて、以
下SS型式10進命令のMYσ命令を例に説明する。、
MVσ命令の場合オペランドを右から左へ処理する。従
って、オペランド・・オニバーラップ(以下σMLと略
す)のチ゛ニックが必要なのは、第4図に示すよう圧填
2オペランドの未処理バイトが破壊されるような重−を
□し′ている場合である。第4図において。
As shown in FIG. 3, the operand overlap check when pipeline processing is performed will be explained below using the MYσ instruction, which is an SS type decimal instruction, as an example. ,
In the case of the MVσ instruction, the operands are processed from right to left. Therefore, the operand overlap (hereinafter abbreviated as σML) check is necessary when the unprocessed bytes of the compressed 2 operands are subjected to such heavy load that they are destroyed, as shown in Figure 4. . In Fig. 4.

aは1lE1オペランドの先頭アドレス、bは第1オペ
ランドの最終アドレス、Xは第2オペランドの先頭アド
レス、Yは@2オペランドの最終アドレスを示し、OV
LとなるのはX≦b≦Yの場合である。
a is the start address of the 1lE1 operand, b is the end address of the first operand, X is the start address of the second operand, Y is the end address of the @2 operand, and OV
L is obtained when X≦b≦Y.

従来、σVLのチェック回路は第2図に示す構成となっ
ている。図中1はインデックス値が保持されるインデッ
クス値レジスタ(以下MARと略す)、2はベース値が
保持されるペース値レジスタ(以下BARと略す)、3
はデイスプレイスメント値が保持されるディスプレース
メント値レジスタ(以下DRと略す)であり、デコード
・ステージ(D1ステージ)で命令がデコードされ、上
記DIステージの最後に上記BAR。
Conventionally, a σVL check circuit has a configuration shown in FIG. In the figure, 1 is an index value register (hereinafter abbreviated as MAR) where an index value is held, 2 is a pace value register (hereinafter abbreviated as BAR) where a base value is held, and 3 is a pace value register (hereinafter abbreviated as BAR) where a base value is held.
is a displacement value register (hereinafter abbreviated as DR) in which a displacement value is held; the instruction is decoded in the decode stage (D1 stage), and the above BAR is stored at the end of the DI stage.

XAR、DRにデータが置数される。M1ステージでは
、上記BAR、XAR、DRがアドレス演算器4(以下
FAAと略す)によって加算され、求まった第1オペラ
ンド最終アドレスがデステイネーシ薦ン・アドレス・レ
ジスタ6(以下DARと略す)に置数される。上記M1
ステージと同時にD2ステージで、上記XAR,BAR
Data is placed in XAR and DR. In the M1 stage, the above BAR, XAR, and DR are added by the address arithmetic unit 4 (hereinafter abbreviated as FAA), and the obtained first operand final address is placed in the destination address register 6 (hereinafter abbreviated as DAR). be done. M1 above
At the same time as the stage, on the D2 stage, the above XAR, BAR
.

DRK第2オペランドのデータが置数される。The data of the DRK second operand is set.

更にM2ステージにおいて、上記XAR,BAR。Furthermore, in the M2 stage, the above-mentioned XAR and BAR.

DRがAAによって加算され、第2オペランドの最終ア
ドレスとしてリース・アドレス・レジスタ5(以下SA
Rと略す)に置数される5次のA2ステージにおいて、
上記SARとDARが比較器7によって比較され、1回
目の比較結果がレジスタ9に置数される。同時にXAR
&COが置数され、 D2ステージで置数したBAR,
DRがAAによって加算され、第2オペランドの先頭ア
ドレスが求まる。そして、 L2ステージにおいて上記
第2オペランドの先頭アドレスト、上記DARにある第
1オペランドの最終アドレスが比較器8によって比較さ
れ、比較器8による比較結果と上記レジスタ9に保持さ
れている1回目の比較結果から判定回路10によってO
VLの判定が行われ7−15 この方式は、オペランド・アドレスの比較が2回に分け
て行われるため、1回目の比較データを保持するレジス
タが必要な上、比較器のハード量が大きくなる問題があ
る。
DR is added by AA, and lease address register 5 (hereinafter SA) is added as the final address of the second operand.
In the fifth-order A2 stage, which is placed in
The SAR and DAR are compared by the comparator 7, and the first comparison result is placed in the register 9. At the same time
&CO is set, BAR set at D2 stage,
DR is added by AA to find the start address of the second operand. Then, in the L2 stage, the first address of the second operand and the last address of the first operand in the DAR are compared by the comparator 8, and the comparison result by the comparator 8 and the first address held in the register 9 are compared. Based on the comparison result, the determination circuit 10 determines
VL is determined and 7-15 In this method, the operand address is compared twice, so a register is required to hold the first comparison data, and the comparator requires a large amount of hardware. There's a problem.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、オペランド・オーバーランプの検出に
おいて、性能を低下させることなくしかも検出のための
ハードウェアを大幅に減少サセタオペランド・オーバー
ラツプの検出方式を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a method for detecting success-operand overlaps that significantly reduces the hardware required for detecting operand overlaps without degrading performance.

〔発明の概要〕[Summary of the invention]

本発明は、アドレス演算器に2人力の減算機能を持たせ
、SS命令処理で第1オペランド・アドレスと、第2オ
ペランド・アドレスカ求まった次のステージで第2オペ
ランドと第1オペランドの差を求めることで、減算結果
の上位3バイトがすべて0であることと、最下位バイト
のオペランド長との大小比較を1回行うだけでオペラン
ド・オーバーラツプの検出を可能とした本のである。
The present invention provides an address arithmetic unit with a two-man subtraction function, and calculates the difference between the second operand and the first operand in the next stage after the first and second operand addresses are determined by SS instruction processing. This book makes it possible to detect operand overlap by simply comparing once the upper three bytes of the subtraction result with the operand length of the least significant byte.

〔発明の実施例〕[Embodiments of the invention]

以下1本発明の一実施例を第1図を参照して説明する。 An embodiment of the present invention will be described below with reference to FIG.

なお、第2図と同一部分には同一符号を付1.て詳細な
説明を省略し、第2図と異なる部分についてのみ説明す
る。本実施例では。
The same parts as in FIG. 2 are designated by the same reference numerals. A detailed explanation will be omitted, and only the parts that are different from FIG. 2 will be explained. In this example.

AAの入力にセレクタ20.21が置かれMステージ(
モディファイ・ステージ)においては、それぞれXAR
,BARを選択するように制御されているo A2ステ
ージでは、第2オペランドと第1オペランドの減算を行
うためにSAR,DARが選択される。減算の方向は命
令によって異なるため、減算の方向の制御も上記セレク
タ20゜21で行う。また、OVLの場合減算結果の上
位3バイトはOなので、比較器は上位3バイトがすべて
Oであることを判定する0判定器23と。
Selectors 20 and 21 are placed at the input of AA, and the M stage (
(modification stage), each XAR
, BAR. o In the A2 stage, SAR, DAR are selected to perform the subtraction of the second operand and the first operand. Since the direction of subtraction differs depending on the instruction, the direction of subtraction is also controlled by the selectors 20 and 21. Further, in the case of OVL, since the upper three bytes of the subtraction result are O, the comparator is a 0 determiner 23 that determines that the upper three bytes are all O.

減算結果の下位1バイトとLENを比較する比較器24
から成るユオペランド長保持レジスタ22はOVL検出
の範囲を決定するもので、命令や処理方法によって異な
る。
Comparator 24 that compares the lower 1 byte of the subtraction result with LEN
The operand length holding register 22, which consists of OVL, determines the range of OVL detection, which differs depending on the instruction and processing method.

次に1本発明の一実施例の動作をMvσ命令を例だ説明
するsD1ステージ(デコード・ステージ)で命令コー
ドがデコードされ、 X A R、BAR。
Next, the operation of one embodiment of the present invention will be explained using the Mvσ instruction as an example.In the sD1 stage (decode stage), the instruction code is decoded, and the instruction code is X A R, BAR.

DRの各レジスタにデータがセクトされる。Mlステー
ジでは、セレクタ20 、21はXAR,BAR。
Data is sectored into each register of the DR. In the Ml stage, selectors 20 and 21 are XAR and BAR.

を選択するように制御されており、上位MAR。It is controlled to select the upper MAR.

BAR、DRの値がAAによって加算され第1オペラン
ド・アドレスが求まる。加算結果は。
The values of BAR and DR are added by AA to find the first operand address. The addition result is.

DARにセットされる。同時に、XAR,BAR。Set in DAR. At the same time, XAR, BAR.

DRK第2オペランドのデータがセットされ。The data of the DRK second operand is set.

次のM2ステージでAAにより第2オペランド・アドレ
スが計算される。上記加算結果はSARてセットされる
。第1オペランド、第2オペランド・アドレスが求まっ
た次のステージ(A2ステージ)でセレクタ20 、2
1はそれぞれSAR。
The second operand address is calculated by AA in the next M2 stage. The above addition result is set as SAR. At the next stage (A2 stage) where the first and second operand addresses are determined, the selectors 20, 2
1 is each SAR.

DARを選択するように制御され、AAKSAR・DA
Rの値が入力される。この時DRのデータは無視され、
SARとDARO間で減算が行われる。上記減算結果の
上位3バイトは0判定器23へ最下位1バイトは比較器
24へ行く。0判定器の出力が1の場合、つまり上位3
バイトがすべでOの場合は第1オペランド・アドレスと
第2オペランド・アドレスは256バイト以内の距離!
であり、オーバーラツプの可能性がある事を示している
。上記0判定器の出力がOの場合。
Controlled to select DAR, AAKSAR・DA
The value of R is input. At this time, DR data is ignored,
A subtraction is performed between SAR and DARO. The upper 3 bytes of the above subtraction result go to the 0 determiner 23, and the least significant 1 byte goes to the comparator 24. If the output of the 0 determiner is 1, that is, the top 3
If all bytes are O, the distance between the first and second operand addresses is within 256 bytes!
This indicates that there is a possibility of overlap. When the output of the above 0 determiner is O.

つまり上位3バイトがOでない場合は、2つのオペラン
ド・アドレスはオーバーラツプしないくらい充分に離れ
ている事を示している。また。
In other words, if the upper three bytes are not O, this indicates that the two operand addresses are far enough apart that they do not overlap. Also.

比較器24では、第1オペランド・アドレスと第2オペ
ランド・アドレスの差が第2オペランド長より小さいか
どうかを判定するもので、上記0判定器23の出力が1
で、かつ−上記比較器24の出力が1の場合1判定器1
0によりオペランド・オーバーラツプしていると判定さ
れる。
The comparator 24 determines whether the difference between the first operand address and the second operand address is smaller than the second operand length, and the output of the 0 determiner 23 is 1.
and - if the output of the comparator 24 is 1, then the 1 determiner 1
0, it is determined that the operands overlap.

本方式は、アドレス空間がラップアラウンドしている場
合にも有効である。アドレス空間がラップアラウンドし
ていbe合1MVσ命令の処理で問題となるのは、第1
オペランド・アドレスがアドレス空間の最大値に近い値
であり。
This method is also effective when the address space wraps around. The problem with processing the 1MVσ instruction when the address space wraps around is the first
The operand address is close to the maximum value of the address space.

第2オペランド・アドレスがアドレス空間の最小値に近
い値をとつt場合である。この場合。
This is the case when the second operand address takes a value close to the minimum value of the address space. in this case.

単にアドレスの大小を比較すると第1オペランド・アド
レスと第2オペランド・アドレスは大きく違っているの
でオーバーラツプしていないと判定されてしまう。しか
し1本式式では第2オペランド・アドレスから第1オペ
ランド・アドレスを引くので、2つのオペランドの相対
的なずれが求まることになり、アドレス空間がラップア
ラウンドしていない場合と同様の方式でオペランド・オ
ーバーラツプを検出することができるり 本方式の一実施例を1マシンサイクル・ピッチのパイプ
ライン処理を行っているデータ処理装置を例に説明した
が、2マシンサイクル以上のずれで先行制御をしている
データ処理装置にも適用できる。
If the addresses are simply compared in size, the first operand address and the second operand address are significantly different, so it is determined that they do not overlap. However, in the one-line formula, the first operand address is subtracted from the second operand address, so the relative shift between the two operands is determined, and the operand address is calculated using the same method as when the address space does not wrap around.・Can detect overlaps. An example of this method has been explained using a data processing device that performs pipeline processing with a pitch of 1 machine cycle, but it is also possible to detect overlaps using a data processing device that performs pipeline processing with a pitch of 2 machine cycles or more. It can also be applied to data processing equipment.

〔発明の効果〕〔Effect of the invention〕

以上詳述したように2本発明のオペ・ランド・。 As detailed above, there are two operations according to the present invention.

オーバーラツプ検出方式は、従来と性能的に何ら劣るこ
となく検出回路を簡略化できるのでコストを低減するこ
とがで鎗る。
The overlap detection method can simplify the detection circuit without any performance deterioration compared to the conventional method, and is therefore advantageous in reducing costs.

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

第1図は本発明の一実施例を示すブロック図。 第2図は従来例を示すブロック図、第3図はパイプライ
ン処理におけるσV L @出り処理の流れを示す説明
図、@4図はM Vσ命令でのσVLの場合を示す説明
図である。 1・・・インデックス値レジスタ。 2・・・ペース値レジスタ。 4・・・アドレス演算器、 7.8・・・比較器。 9・・・ワーク1/ジスタ、10・・・判定回路。 20 、21・・・セレクタ。 22・・・オペランド長レジスタ。 23・・・0判定器、24・・・比較器。 第1図 第2図
FIG. 1 is a block diagram showing one embodiment of the present invention. Fig. 2 is a block diagram showing a conventional example, Fig. 3 is an explanatory diagram showing the flow of σV L @ output processing in pipeline processing, and Fig. 4 is an explanatory diagram showing the case of σVL in M Vσ instruction. . 1... Index value register. 2...Pace value register. 4... Address calculator, 7.8... Comparator. 9... Work 1/Jister, 10... Judgment circuit. 20, 21...Selector. 22... Operand length register. 23...0 judger, 24...comparator. Figure 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] 1、4バイトの演算器と、演算器出力の上位3バイトが
0であることを検出する検出回路と、上記演算器出力の
下位1バイトと第1オペランド長または、第2オペラン
ド長との大小比較をするための比較器を具備する計算機
において、SS型式の可変長命令を実行する場合に、上
記演算器を用い第1オペランド・アドレスと第2オペラ
ンド・アドレスの差を求め、上記上位3バイトの0検出
器と上記最下位1バイトの大小比較器を用いることによ
り、オペランド・オーバーラップを検出することを特徴
とする、オペランド・オーバーラップ検出方式。
A 1- or 4-byte arithmetic unit, a detection circuit that detects that the upper 3 bytes of the arithmetic unit output are 0, and a difference between the lower 1 byte of the arithmetic unit output and the first operand length or second operand length. In a computer equipped with a comparator for comparison, when executing an SS type variable length instruction, the above arithmetic unit is used to calculate the difference between the first operand address and the second operand address, and the upper 3 bytes are 1. An operand overlap detection method, characterized in that operand overlap is detected by using a 0 detector and a magnitude comparator for the least significant 1 byte.
JP60055849A 1985-03-22 1985-03-22 Detection system for operand overlap Pending JPS61216031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60055849A JPS61216031A (en) 1985-03-22 1985-03-22 Detection system for operand overlap

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60055849A JPS61216031A (en) 1985-03-22 1985-03-22 Detection system for operand overlap

Publications (1)

Publication Number Publication Date
JPS61216031A true JPS61216031A (en) 1986-09-25

Family

ID=13010481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60055849A Pending JPS61216031A (en) 1985-03-22 1985-03-22 Detection system for operand overlap

Country Status (1)

Country Link
JP (1) JPS61216031A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0374725A (en) * 1989-08-16 1991-03-29 Nec Corp Information processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0374725A (en) * 1989-08-16 1991-03-29 Nec Corp Information processor

Similar Documents

Publication Publication Date Title
JP5586128B2 (en) Method, recording medium, processor, and system for executing data processing
EP1058185A1 (en) A multiply and accumulate apparatus and a method thereof
US4768160A (en) Arithmetic unit with simple overflow detection system
US20060129787A1 (en) Providing extended precision in SIMD vector arithmetic operations
JPH04172533A (en) Electronic computer
US20060059221A1 (en) Multiply instructions for modular exponentiation
US7171543B1 (en) Method and apparatus for executing a 32-bit application by confining the application to a 32-bit address space subset in a 64-bit processor
JP2005535966A (en) Multimedia coprocessor control mechanism including alignment or broadcast instructions
JPH0228830A (en) Integer number dividing circuit
JPS61216031A (en) Detection system for operand overlap
KR19980041758A (en) 2-Bit Booth Multiplier with Reduced Data Path Width
US5787492A (en) Address limit check apparatus with conditional carry logic
EP0992917B1 (en) Linear vector computation
US8001358B2 (en) Microprocessor and method of processing data including peak value candidate selecting part and peak value calculating part
JPH07262010A (en) Device and method for arithmetic processing
JPH04316127A (en) Information processor
JP2000250895A (en) Data processor
JPH0352092B2 (en)
JP3137636B2 (en) Data processing device
Shahbahrami et al. Performance improvement of multimedia kernels by alleviating overhead instructions on SIMD devices
JPS59188900A (en) Data processor
JPS63156233A (en) System for generating load instruction of integer type data
JPH06110784A (en) Microprocessor device
JPS63150748A (en) Data processor
JPH02178833A (en) Adder for adding data different in bit length