JPS60101643A - Data processor - Google Patents

Data processor

Info

Publication number
JPS60101643A
JPS60101643A JP20899983A JP20899983A JPS60101643A JP S60101643 A JPS60101643 A JP S60101643A JP 20899983 A JP20899983 A JP 20899983A JP 20899983 A JP20899983 A JP 20899983A JP S60101643 A JPS60101643 A JP S60101643A
Authority
JP
Japan
Prior art keywords
register
output
saved
recovery
save
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
JP20899983A
Other languages
Japanese (ja)
Inventor
Hideyuki Hara
秀幸 原
Takeshi Kato
猛 加藤
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 JP20899983A priority Critical patent/JPS60101643A/en
Publication of JPS60101643A publication Critical patent/JPS60101643A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To attain the high-speed processing for save recovery by using a priority encoder which delivers the register number to be saved next within a period of a cycle and a circuit which decides that the register number to be saved and delivered last is equal to the final number. CONSTITUTION:The given save recovery pattern signal is set to a save recovery pattern register 51 by a timing pulse 57 and via a signal line 58. At the same time, a GR number register 52 is initialized. Plural output signals of the register 51 undergo an AND 69 with the signals produced rom a register 52 and a mask pattern producing circuit 53. Then a set-up bit number is delivered by a priority encoder 54. The output of the encoder 54 is used as an input of the register 52, a mask pattern generating circuit 50 and a save recovery GR number register 56 respectively. Each output of the circuit 50 undergoes an AND 68 with each output of the register 51 and then an OR 72 with the output of the encoder 54 after detection of all-''0'' to be stored to an end flag 55. In such a way, the high-speed processing is possible for save recovery.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は複数の汎用レジスタを備えたデータ処理装置に
係り、特に、サブルーチンとのリンクにおける汎用レジ
スタの退避回復回路付きのデータ処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a data processing device equipped with a plurality of general-purpose registers, and more particularly to a data processing device equipped with a general-purpose register save and recovery circuit in a link with a subroutine.

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

サブルーチンとのリンク時における退避、あるいは、回
復すべきデータについて第1図を用いて説明する。退避
回復すべきデータは、まず、プログラムの状態を示すプ
ログラム状態語(以下、PSWと略す)l、複数本の汎
用レジスタ(以下、GRと略す)2が少なくとも必要で
ある。第1図ではGR(0)〜GR(14)の15本の
汎用レジスタ2をもつ。汎用レジスタ2は常に全数退避
するとは限らず、通常はどの汎用レジスタを退避するか
を選択的に指定できるようになっている。このときの様
子を示したものが第2図である。退避すべき汎用レジス
タ番号に対応するピッ1ル位置にのみ、■を立てた退避
回復パターン21が与えられ、第2図における過冷回復
パターンの場合には、ビット番号0,3,4.14に1
が立っていることにより、メモリ上の与えられた退避エ
リア先頭アドレス(以下、アドレスAと唾す)から順に
、退避回復パターン22そのもの、PSWI、以下順に
GR(0)24、GR(3)25、GR(4)26、G
R(14)27が退避される。
Data to be saved or restored when linking with a subroutine will be explained using FIG. The data to be saved and restored requires at least a program status word (hereinafter abbreviated as PSW) 1 indicating the state of the program and a plurality of general purpose registers (hereinafter abbreviated as GR) 2. In FIG. 1, there are 15 general-purpose registers 2, GR(0) to GR(14). Not all general-purpose registers 2 are always saved, and usually it is possible to selectively specify which general-purpose registers are saved. FIG. 2 shows the situation at this time. An evacuation recovery pattern 21 with a symbol ■ is given only to the pill position corresponding to the general-purpose register number to be saved, and in the case of the overcooling recovery pattern in FIG. 2, bit numbers 0, 3, 4.14 are given. to 1
is set, the save area start address on the memory (hereinafter referred to as address A) is saved, the save recovery pattern 22 itself, PSWI, and then GR(0) 24, GR(3) 25, etc. ,GR(4)26,G
R(14)27 is saved.

従来のサブルーチンリンク時の退避回復の手順は、与え
られた退避回復パターン21より退避回復すべきGRの
番号をめるには、シフターを用いて、第3図、第4図に
示す手順で行なっている。
The conventional evacuation and recovery procedure when linking a subroutine is to use the shifter to calculate the number of the GR to be saved and recovered from the given evacuation and recovery pattern 21, following the steps shown in FIGS. 3 and 4. ing.

この手順を簡単に第3図、第4図に従って説明する。ま
ず、退避の手順について第3図を用いて説明する。31
で与えられる退避エリア先頭アドレスであるアドレスA
をメモリアドレスレジスタ(以下、MADRと越す)に
セットし、32で退避回復パターンをM A D Rの
示すメモリに退避し。
This procedure will be briefly explained with reference to FIGS. 3 and 4. First, the evacuation procedure will be explained using FIG. 3. 31
Address A is the start address of the evacuation area given by
is set in the memory address register (hereinafter referred to as MADR), and at 32 the save/restore pattern is saved to the memory indicated by MADR.

その後、M A D Rを+2する(本説明では、退避
回復パターン、PSWは共に二語で、GRのデータは四
語として説明する)。
After that, M A D R is increased by +2 (in this description, the evacuation recovery pattern and PSW are both two words, and the GR data is explained as four words).

次に33で、)) S W ]のデータをMADRの示
すメモリへ退避し、その後、MADRを+2し、さらに
、GR番号工に0をセットして初期化しておく。34で
は、与えられた退避回復パターンを1ビツト左シフトし
、新しい退避回復パターンとし、35で、34における
シフト結果キャリーに1が立ったかどうか判定し、1が
立った場合には対応する退避回復パターンのビットが1
であったことになるため、36で、そのときの対応する
ピッl一番号を保持しているIで示されるGR(i)を
MADRの示すメモリに退避し、M A D Rを+4
する。この後、37で■を+1する。また、35でキャ
リーが0であった場合は、単に、37に進み■を+1す
るのみである。次に、38で■が15になったかどうか
、すなわち、退避回復パターンの全15ビツトを調べ終
ったかどうかを判定し、そうであれば終了し、そうでな
ければ34に戻り、34以下の処理を繰り返す。
Next, in step 33, the data of )) S W ] is saved to the memory indicated by MADR, and then MADR is incremented by 2, and the GR number is set to 0 for initialization. In 34, the given evacuation and recovery pattern is shifted to the left by 1 bit to make it a new evacuation and recovery pattern.In 35, it is determined whether or not 1 is set in the shift result carry in 34. If 1 is set, the corresponding evacuation and recovery pattern is set. pattern bit is 1
Therefore, in step 36, GR(i), indicated by I, which holds the corresponding pick number at that time, is saved to the memory indicated by MADR, and M ADR is +4.
do. After this, add 1 to ■ at 37. Further, if the carry is 0 at 35, simply proceed to 37 and add +1 to ■. Next, in step 38, it is determined whether ■ has become 15, that is, whether all 15 bits of the save and recovery pattern have been examined. repeat.

次に、回復時の手順を第4図に従って説明する。Next, the procedure at the time of recovery will be explained according to FIG.

まず、41で退避回復アドレスであるアドレスエをMA
DRにセットし、42で、MADRで示されるメモリデ
ータを四語読出し、上二語を退避回復パターンにセット
、下二語をpswiにセットし、MADRを+4し、■
に0をセットする。次に43で、退避回復パターンを1
ビツト左シフトし、新しい退避回復パターンとし、44
でキャリーに1が立ったかどうか判定し、1ならば45
でMADRの示すアドレスより四語読み出し、GR(I
)に回復し、MADRを+4し、46で■を+1する。
First, in step 41, MA
Set to DR, at 42, read four words of memory data indicated by MADR, set the upper two words to the save/recovery pattern, set the lower two words to pswi, add +4 to MADR, and
Set 0 to . Next, at 43, set the evacuation recovery pattern to 1.
Shift the bit to the left and set it as a new evacuation recovery pattern, 44
Determine whether or not the carry is 1, and if it is 1, it is 45
reads four words from the address indicated by MADR, and reads GR(I
), increases MADR by +4, and increases ■ by +1 at 46.

44でキャリーが0の場合には単に46に進み工を+1
するのみである。次に、47で工が15になったかどう
か判定し、15であれば終了し、そうでなければ43に
戻り、43以下の処理を繰り返す。
If the carry is 0 on 44, simply go to 46 and add +1
Just do it. Next, in step 47, it is determined whether or not the number of steps has reached 15. If it is 15, the process ends, and if not, the process returns to step 43, and the process from step 43 is repeated.

このように、退避回復パターンのパターン如何にかかわ
らず常に同一処理時間、すなわち、全ビットを1ビツト
ずつ調べていく時間を要する。
In this way, regardless of the save/recovery pattern, it always takes the same processing time, that is, the time to examine all bits one by one.

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

本発明の目的は、与えられた退避回復パターンより1の
立っているビット番号のみを1サイクル毎に生成する回
路をもつデータ処理装置を提供するにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a data processing device having a circuit that generates only bit numbers that are set to 1 in each cycle based on a given save/recovery pattern.

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

次に1本発明の実施例を図を用いて説明する。 Next, an embodiment of the present invention will be described using the drawings.

第5図は、本発明の中心となる回路を説明した図である
。与えられた退避回復パターンは信号線58により退避
回復パターンレジスタ51にタイミングクロック57に
よりセットされ、同時に、57の信号により、現在出力
中のGR番号信号62を保持するレジスタであるG R
番号レジスタ52をオール1にセットし、初期化する。
FIG. 5 is a diagram illustrating a circuit that is the core of the present invention. The given save-recovery pattern is set in the save-recovery pattern register 51 by the timing clock 57 through the signal line 58, and at the same time, the signal 57 sets the GR number signal 62 which is currently being outputted.
The number register 52 is set to all 1s and initialized.

パターンレジスタ51の複数の出力信号65はG RN
 。
The plurality of output signals 65 of the pattern register 51 are GRN
.

レジスタ52の出力信号64からマスクパターン生成回
路53によって生成される複数の信号67と各々AND
回路69でANDされ、その出力はプライオリティ−エ
ンコーダ54に入力され、1の立っているビット番号を
出力する。エンコーダ54の出力62はGR番号レジス
タ52の入力データとなり、さらにマスクパターン生成
回路50の入力、及び退避回復レジスタ56の入力とな
っている。マスクパターン生成回路50の複数の出力信
号66の各々はレジスタ51の出力の各々とAND回路
68でANDされ、この出力は73でオール0の検出が
なされ、出カフ0とプライオリティエンコーダ体の出力
である71とORがとられ、その出カフ2は終了フラグ
55に、タイミングパルス63をクロックとして記憶さ
れる。ここで、出カフ0が1となるのは、62で出力さ
れているGRの番号が最後のGR番号のときである。
Each output signal 64 of the register 52 is ANDed with a plurality of signals 67 generated by the mask pattern generation circuit 53.
A circuit 69 performs an AND operation, and its output is input to a priority encoder 54, which outputs a bit number containing 1. The output 62 of the encoder 54 becomes input data to the GR number register 52, and further serves as an input to the mask pattern generation circuit 50 and an input to the save/recovery register 56. Each of the plurality of output signals 66 of the mask pattern generation circuit 50 is ANDed with each of the outputs of the register 51 in an AND circuit 68, and this output is detected as all 0 at 73, and is combined with the output cuff 0 and the output of the priority encoder body. The output cuff 2 is ORed with a certain 71, and the output cuff 2 is stored in the end flag 55 using the timing pulse 63 as a clock. Here, output cuff 0 becomes 1 when the GR number output at 62 is the last GR number.

信号62がレジスタ52にセットされるタイミングはク
ロック信号59で制御できるようになっており、信号5
9を入力しない限り、信号62は不変である。終了フラ
グ55の出力信号61は終了判定回路に接続され、レジ
スタ56の出力60が最後のGR番号を示していること
になる。なお、タイミングパルス63は毎サイクル入力
するものとする。
The timing at which the signal 62 is set in the register 52 can be controlled by the clock signal 59.
Signal 62 remains unchanged unless 9 is input. The output signal 61 of the end flag 55 is connected to the end determination circuit, and the output 60 of the register 56 indicates the last GR number. Note that the timing pulse 63 is assumed to be input every cycle.

第6図はマスクパターン生成回路50.53の真理値表
であり、第7図はプライオリティ−エンコーダ54の真
理値表である。
6 is a truth table of the mask pattern generation circuit 50, 53, and FIG. 7 is a truth table of the priority encoder 54.

マスクパターン生成回路50.53は入力口ビットが示
す値をa (〜15)としたとき、出力はビット番号0
〜aまでがオール0で、ビット番号a + 1以降がオ
ール1のパターンとなる。但し、入力口ビットがオール
1のときは出力はオール1となる。
When the value indicated by the input bit is a (~15), the mask pattern generation circuit 50.53 outputs bit number 0.
The pattern is that the bit numbers from to a are all 0's, and the bit numbers after bit number a + 1 are all 1's. However, when the input bits are all 1, the output is all 1.

プライオリティ−エンコーダ54は第7図に示す様に、
一般のプライオリティ−エンコーダと同−論理である。
The priority encoder 54, as shown in FIG.
It has the same logic as a general priority encoder.

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

標準的なデータ処理装置で、本発明を採用することによ
り、Whet 5toneベンチユーリテス]・プログ
ラムで、1.4倍以上の高速化が達成できる。
By employing the present invention on a standard data processing device, it is possible to achieve a speedup of 1.4 times or more in the ``What 5tone Bench Urites'' program.

本発明によれば最速1サイクルの時間で、次々と退避回
復すべき汎用レジスタ番号が出力されるため退避回復処
理が高速化される。
According to the present invention, the general-purpose register numbers to be saved and restored are outputted one after another in the time of one cycle at the fastest, so that the saving and recovery processing can be speeded up.

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

第1図はプロセジャリンク時に退避回復すべきデータの
説明図、第2図は退避回復の内容の説明図、第3図、第
4図は従来技術の説明図、第5図は本発明の中心となる
回路図、第6図、第7図は内部回路の真理値説明図であ
る。 50.53・・・マスクパターン生成回路、51・・・
退避回復パターンレジスタ、52・・・G RN oレ
ジスタ、68.69・・・AND回路。 代理人 弁理士 高橋明夫 佑2図 CCL) 皐3図 系4図 も5図
Fig. 1 is an explanatory diagram of data to be saved and restored at the time of procedure linking, Fig. 2 is an explanatory diagram of the contents of saving and recovery, Figs. 3 and 4 are explanatory diagrams of the prior art, and Fig. 5 is an explanatory diagram of the present invention. The main circuit diagrams, FIGS. 6 and 7, are explanatory diagrams of truth values of internal circuits. 50.53...Mask pattern generation circuit, 51...
Save recovery pattern register, 52...GRN o register, 68.69...AND circuit. Agent Patent Attorney Akio Takahashi 2 figures CCL) Ko 3 figures 4 figures and 5 figures

Claims (1)

【特許請求の範囲】 1、複数本の汎用レジスタを備え、プロセジャ−リンク
時に退避すべき汎用レジスタ番号と一対一に対応づけら
れたビット番号の位置にのみ予め定められたビット値を
保持するビットパターンで、退避レジスタを指定する方
式をとるデータ処理装置において、 前記ビットパターンを保持する第1の手段、最も最近に
出力した退避すべき前記汎用レジスタの番号を保持する
第2の手段、前記第1の手段、前記第2の手段の出力よ
り次に退避すべき前記汎用レジスタ番号を前記データ処
理装置の1サイクルの時間で出力する第3の手段、前記
第2の手段の保持している汎用レジスタ番号が退避すべ
き最後の番号か否かを判定する第4の手段からなること
を特徴とするデータ処理装置。
[Claims] 1. A bit that includes a plurality of general-purpose registers and holds a predetermined bit value only at the position of a bit number that has a one-to-one correspondence with the general-purpose register number to be saved at the time of procedure linking. In a data processing device that uses a pattern to specify a save register, a first means for holding the bit pattern, a second means for holding the number of the general-purpose register to be saved that has been output most recently, and a second means for holding the number of the general-purpose register to be saved that is most recently output. a third means for outputting the general-purpose register number to be saved next from the output of the second means in one cycle of the data processing device; a general-purpose register held by the second means; A data processing device comprising fourth means for determining whether a register number is the last number to be saved.
JP20899983A 1983-11-09 1983-11-09 Data processor Pending JPS60101643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20899983A JPS60101643A (en) 1983-11-09 1983-11-09 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20899983A JPS60101643A (en) 1983-11-09 1983-11-09 Data processor

Publications (1)

Publication Number Publication Date
JPS60101643A true JPS60101643A (en) 1985-06-05

Family

ID=16565628

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20899983A Pending JPS60101643A (en) 1983-11-09 1983-11-09 Data processor

Country Status (1)

Country Link
JP (1) JPS60101643A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6491253A (en) * 1987-09-30 1989-04-10 Takeshi Sakamura Data processor
JPH04260926A (en) * 1991-01-22 1992-09-16 Mitsubishi Electric Corp Bit retrieving circuit and data processor provided with the same
JPH064305A (en) * 1992-06-22 1994-01-14 Nec Corp Register switching discrimination circuit for processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6491253A (en) * 1987-09-30 1989-04-10 Takeshi Sakamura Data processor
JPH04260926A (en) * 1991-01-22 1992-09-16 Mitsubishi Electric Corp Bit retrieving circuit and data processor provided with the same
JPH064305A (en) * 1992-06-22 1994-01-14 Nec Corp Register switching discrimination circuit for processor

Similar Documents

Publication Publication Date Title
JPS62503188A (en) Configurable on-chip test system for gate arrays
JPH0743429A (en) Physical address conversion circuit
US5629946A (en) High speed test pattern generator
JPS60101643A (en) Data processor
US7386650B2 (en) Memory test circuit with data expander
JPS6120897B2 (en)
KR940004464A (en) Pseudo-random Number Generator and Method
JPH07182863A (en) Internal address generation circuit
JPS62232062A (en) Bus width controller
JPH0644051A (en) Microcomputer
JP3825709B2 (en) Pipeline processing method and processor device
JP2806459B2 (en) A logic simulation device that can evaluate flip-flops
JP2716167B2 (en) Drawing control device for printer
JP3381284B2 (en) Parameter writing device
JPS6115273A (en) Vector arithmetic processor
JP2584654B2 (en) Data processing device
JPH05157815A (en) Address generator
JP2004206425A (en) Tracing device
JPS60221826A (en) Shifting circuit
JPS6378238A (en) Object code generating device
JPH04271437A (en) Test pattern generating system
JPS6236318B2 (en)
JPS6045827B2 (en) test pattern generator
JPS63129430A (en) Microprogram controller
JPH02220172A (en) Address generating circuit for butterfly arithmetic of fast fourier transform