JPS6232556B2 - - Google Patents

Info

Publication number
JPS6232556B2
JPS6232556B2 JP56160539A JP16053981A JPS6232556B2 JP S6232556 B2 JPS6232556 B2 JP S6232556B2 JP 56160539 A JP56160539 A JP 56160539A JP 16053981 A JP16053981 A JP 16053981A JP S6232556 B2 JPS6232556 B2 JP S6232556B2
Authority
JP
Japan
Prior art keywords
data
register
data structure
address
stack
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.)
Expired
Application number
JP56160539A
Other languages
Japanese (ja)
Other versions
JPS5862884A (en
Inventor
Hiroshi Sato
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
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP56160539A priority Critical patent/JPS5862884A/en
Publication of JPS5862884A publication Critical patent/JPS5862884A/en
Publication of JPS6232556B2 publication Critical patent/JPS6232556B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store

Description

【発明の詳細な説明】 本発明はスタツク構造を有するデータ処理シス
テムに関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a data processing system having a stack structure.

従来技術におけるスタツクの構造はソフトウエ
アにより規定されるのが通常である。ハードウエ
ア制御でスタツク内のデータがアクセスされる場
合には、スタツクに最後に格納されたデータのア
ドレスを保持するスタツクポインタに従いアクセ
スされる。
In the prior art, the stack structure is typically defined by software. When data in the stack is accessed under hardware control, it is accessed according to the stack pointer that holds the address of the last data stored on the stack.

データがスタツクに格納される場合には、最初
にスタツクポインタがデータのサイズだけ減少さ
れ、この減少されたアドレスに対して格納動作が
行なわれる。また、データをスタツクから取り出
す場合にはスタツクポインタで示されるアドレス
からデータが取り出され、このあと取り出された
データのサイズだけスタツクポインタの値が増加
される。
When data is to be stored on the stack, the stack pointer is first decremented by the size of the data, and the store operation is performed to this decremented address. Further, when data is taken out from the stack, the data is taken out from the address indicated by the stack pointer, and then the value of the stack pointer is increased by the size of the data taken out.

このような構成においては、常にスタツクポイ
ンタの値を、ソフトウエア命令でチエツクするこ
とによりスタツクにデータを格納しすぎて、スタ
ツク領域以外の記憶領域に該データがあふれ、そ
の結果生ずる該記憶領域の内容の破壊を防止しな
ければならない。
In such a configuration, by constantly checking the value of the stack pointer using a software command, too much data is stored on the stack, and the data overflows into storage areas other than the stack area, resulting in overflow of the storage area. Destruction of the contents shall be prevented.

また、プログラム論理のミスにより、既に空に
なつているスタツクよりデータを取り出そうとし
たときにも警告を発するために、ソフトウエアで
チエツクを行う必要がある。
In addition, it is necessary to perform a check in software to issue a warning when attempting to retrieve data from a stack that is already empty due to a mistake in program logic.

本発明の目的はスタツク領域をオーバフローし
たデータが他の主記憶領域を破壊するのを末然に
防ぎ、ソフトウエア論理のミスの検出を追加のソ
フトウエア命令を使用することなくハードウエア
により高速に実行できるようにしたデータ処理シ
ステムを提供することにある。
The purpose of the present invention is to prevent data overflowing the stack area from destroying other main memory areas, and to speed up the detection of errors in software logic by using hardware without using additional software instructions. The object of the present invention is to provide a data processing system that can be executed.

本発明のシステムは、後入れ先出しのデータ構
造の主記憶内における記憶位置を保持するための
アドレス保持手段と、 前記データ構造の現在までに使用された語数を
保持するための少なくとも1つの記憶場所、前記
データ構造の最大容量を保持するための少なくと
も1つの記憶場所および前記データ構造を1つ以
上のデータフレームに分割し各データフレームの
大きさを保持するよう各データフレームごとに少
なくとも1つの記憶場所を有する記憶手段と、 前記アドレス保持手段の内容と前記データ構造
内の使用語数を保持する記憶場所の内容とにもと
づいて一番新らしく獲得されたデータフレームの
先頭アドレスを計算するための計算手段と、 前記データ構造を操作するマシン命令に応答し
て起動され該マシン命令の操作コードの内容にも
とずいて前記データ構造内の使用された語数およ
び一番新しいデータフレームの語数を更新する更
新手段と、 前記データ構造に対してデータを格納していく
ときに該データ構造内の現在までに使用された語
数とスタツクの最大容量とを比較し前者が格納動
作により後者を越えたときにソフトウエアに現在
実行中の命令の実行を中断するよう割り出しを発
生するための手段と、 前記データ構造によりデータを取り出す際に一
番新しいデータフレームの語数と取り出そうとす
るデータの語数とを比較し後者が大きいときに前
記ソフトウエアに前記割り出しを発生するための
手段とを含むことを特徴とする。
The system of the present invention comprises: address holding means for holding a storage location in main memory of a last-in-first-out data structure; and at least one storage location for holding the number of words used to date of said data structure. , at least one storage location for holding the maximum capacity of said data structure and at least one storage location for each data frame for dividing said data structure into one or more data frames and holding the size of each data frame. storage means having a location, and calculation for calculating the starting address of the most recently acquired data frame based on the contents of the address holding means and the contents of a storage location holding the number of words used in the data structure. means for updating the number of used words in the data structure and the number of words of the most recent data frame, activated in response to a machine instruction manipulating the data structure, based on the contents of the operation code of the machine instruction; an updating means, when storing data in the data structure, compares the number of words used so far in the data structure with the maximum capacity of the stack, and when the former exceeds the latter due to the storage operation; A means for instructing software to interrupt the execution of an instruction currently being executed, and a method for comparing the number of words of the newest data frame with the number of words of the data to be retrieved when retrieving data using the data structure. and means for generating the determination in the software when the latter is large.

次に本発明について図面を参照して詳細に説明
する。
Next, the present invention will be explained in detail with reference to the drawings.

第1図を参照すると、本発明に用いられるスタ
ツク構造は中央処理装置内に含まれスタツクデー
タ構造のアドレスを保持するアドレスレジスタ
1、該アドレスレジスタ1により指定され、現在
までに使用されたスタツク内に記憶されたデータ
の語数すなわち5で示される語数を記憶する主記
憶のエリア2、該エリア2より1つだけアドレス
の大きいロケーシヨンにスタツク領域の最大容量
すなわち、6で示される語数に相当する語数を保
持するエリア3、前記アドレスレジスタ1の内容
から前記エリア2の内容を減じられたアドレスに
最後に獲得されたデータフレーム7に含まれる語
数、すなわち第1図の8に相当する語数を保持す
るエリア4を有する。
Referring to FIG. 1, the stack structure used in the present invention includes an address register 1 that is included in the central processing unit and holds the address of the stack data structure, and a stack that is specified by the address register Area 2 of the main memory stores the number of words of data stored in the area, that is, the number of words indicated by 5, and a location corresponding to the maximum capacity of the stack area, that is, the number of words indicated by 6, is stored in a location that is one address larger than area 2. An area 3 for holding the number of words holds the number of words contained in the last acquired data frame 7 at the address obtained by subtracting the contents of the area 2 from the contents of the address register 1, that is, the number of words corresponding to 8 in FIG. It has Area 4.

このスタツクはフアースト・イン・ラースト・
アウトのデータ取り出し動作を行なう。
This stack is first-in-last.
Execute out data retrieval operation.

スタツクを操作する命令には、スタツクの枠組
みを変更する命令と、通常の命令でスタツク内の
データを操作する命令とに分けられる。
Instructions for manipulating the stack are divided into those for changing the framework of the stack and those for manipulating data in the stack as normal instructions.

前者の命令には、ロード・T・レジスタ
LDT、ストア・T・レジスタSTT、アクワイ
ヤ・スタツク・フレームACQ、レリンクイツシ
ユ・スタツク・フレームRLQ、モデイフアイ・
フレーム・レンジMFLの5命令が含まれる。こ
こでT・レジスタとはスタツクに格納された一番
古いデータの場所を示すアドレスを格納するレジ
スタである。
The former instruction requires a load T register
LDT, store T register STT, acquire stack frame ACQ, link stock stack frame RLQ, modify
Contains 5 frame range MFL instructions. Here, the T register is a register that stores an address indicating the location of the oldest data stored on the stack.

ロード・T・レジスタLDT命令は、ソフトウ
エアで操作できるアドレスレジスタの一つを選択
し、そのレジスタの内容を第1図に示す中央処理
装置内のアドレスレジスタ1にロードする命令で
ある。
The Load T Register LDT instruction is an instruction that selects one of the address registers that can be operated by software and loads the contents of that register into the address register 1 in the central processing unit shown in FIG.

この命令により、主記憶中のスタツク構造を、
中央処理装置内のレジスタに結びつける働きをす
る。
This instruction changes the stack structure in main memory to
It acts as a link to the registers in the central processing unit.

ストア・T・レジスタSTT命令は、逆に第1
図に示すアドレスレジスタ1の内容を決められた
アドレスレジスタに格納する。
The store T register STT instruction, on the other hand,
The contents of address register 1 shown in the figure are stored in a predetermined address register.

アクワイヤ・スタツク・フレームACQ命令
は、スタツク内に新しいデータフレームを作り出
す命令である。このデータフレームの大きさは命
令により与えられる。アクワイヤ・スタツク・フ
レームACQ命令実行によりスタツクの現在まで
の使用語数を示すエリア2の内容は作られたデー
タフレームの大きさ+1だけ増加される。リリン
クイツシユRLQ命令の動作は、アクワイヤACQ
命令の動作とは逆の働きをする。この命令により
スタツク内の一番最後に作られたデータフレーム
の領域を解放する。
The Acquire Stack Frame ACQ instruction is an instruction that creates a new data frame in the stack. The size of this data frame is given by the instruction. By executing the ACQUIRE STACK FRAME ACQ command, the contents of area 2 indicating the number of words used so far in the stack are increased by the size of the created data frame +1. The behavior of the relink issue RLQ command is Acquire ACQ.
It works in the opposite direction to that of the command. This command releases the area of the last created data frame in the stack.

モデイフアイ・フレーム・レジンMFL命令
は、スタツク内の一番最後に作られたデータフレ
ームの大きさを命令で指定した大きさだけ増減す
る命令である。
The Modify Frame Resin MFL instruction is an instruction that increases or decreases the size of the last data frame created in the stack by the amount specified by the instruction.

次に、通常の命令でスタツク内のデータを操作
する場合について説明する。
Next, a case will be described in which data in the stack is manipulated using normal instructions.

通常の命令とは、主記憶中のオペランドを、中
央処理装置のレジスタにとり込んだり(ロード命
令)、レジスタの内容を主記憶中に格納(ストア
命令)したりする命令である。
A normal instruction is an instruction that takes an operand in main memory into a register of a central processing unit (load instruction) or stores the contents of a register in main memory (store instruction).

命令中でオペランドのアドレスを指定するフイ
ールドが、スタツクに対する動作を示した場合、
以下のような動作となる。なお、本実施例では、
主記憶中に設けられるスタツクへのデータ格納は
該主記憶のアドレスが減少する方向に行なわれて
いき、一方、該スタツクからのデータ取出しは該
主記憶のアドレスが増大する方向に行なわれる場
合について説明するが、スタツクへのデータ格納
を主記憶のアドレスが増大する方向に行ない、ス
タツクからのデータ取出しを主記憶のアドレスが
減少する方向に行なうよう変更することは容易で
ある。
If the field specifying the address of an operand in an instruction indicates an operation on the stack,
The operation is as follows. In addition, in this example,
Regarding the case where data is stored in a stack provided in the main memory in the direction in which the addresses of the main memory decrease, while data is retrieved from the stack in the direction in which the addresses in the main memory increase. As will be explained, it is easy to change so that data is stored in the stack in the direction of increasing main memory addresses, and data is retrieved from the stack in the direction of decreasing main memory addresses.

命令がスタツクにデータを格納する場合、中央
処理装置は、第1図に示すアドレスレジスタ1の
内容から、エリア2に格納されているスタツクで
現在使用されている語数を引きエリア4を示すア
ドレスを得る。このエリア4を示すアドレスを1
だけ増加することにより、スタツク中の最新のデ
ータのアドレス9を作ることができる。
When an instruction stores data in the stack, the central processing unit subtracts the number of words currently used in the stack stored in area 2 from the contents of address register 1 shown in FIG. obtain. The address indicating this area 4 is 1
By incrementing by 0, the address 9 of the latest data in the stack can be created.

レジスタの内容をスタツクに押し込む
(PUSH)するのには、まずアドレス9を押し込
もうとするデータのサイズだけ減少する。これに
よりデータを格納するためのエリアを確保する。
次にエリア4に書き込まれている最新のデータフ
レームのサイズを格納するオペランドのサイズだ
け増加し、オペランドを書き込むアドレスを−1
したアドレスに格納する。さらに、エリア2に書
き込まれているスタツクの現在までに使用された
語数をオペランドのサイズだけ増加し、エリア2
の位置に書き戻す。次に、エリア2に書き戻す内
容とエリア3に書き込まれているスタツクの最大
容量とを比較し、前者が後者よりも大きいとき、
割出しを発生する。この割出しとは、あるプログ
ラムのある命令が同じプログラムの他の命令の実
行を中断させ、該ある命令の実行をさせることを
いう。
To push the contents of a register onto the stack, address 9 is first reduced by the size of the data being pushed. This secures an area for storing data.
Next, increase the size of the operand that stores the size of the latest data frame written in area 4, and set the address where the operand is written by -1.
stored at the specified address. Furthermore, the number of words used so far in the stack written in area 2 is increased by the size of the operand, and
Write back to the location. Next, compare the content written back to area 2 with the maximum capacity of the stack written to area 3, and if the former is larger than the latter,
Generate indexing. This indexing means that a certain instruction in a certain program interrupts the execution of another instruction in the same program and causes the certain instruction to be executed.

命令が、スタツクからデータを取り出す場合に
は、格納する場合と同様にして最新のデータのア
ドレス9を得る。アドレス9からオペランドのサ
イズだけのデータを取り出す。このときエリア4
に書き込まれている最新のデータフレームのサイ
ズと、オペランドのサイズとを比較し、後者が前
者よりも大きければ、ソフトウエア論理のミスな
ので割り出しを発生する。
When an instruction retrieves data from the stack, the address 9 of the latest data is obtained in the same way as when storing data. Extract data equal to the size of the operand from address 9. At this time area 4
The size of the latest data frame written in is compared with the size of the operand, and if the latter is larger than the former, an error occurs in the software logic and an index is generated.

つぎにエリア4の内容から、取り出したオペラ
ンドのサイズを減少し、この値をエリア4のアド
レスにオペランドのサイズを加えたロケーシヨン
に書き込む。
Next, the size of the retrieved operand is reduced from the contents of area 4, and this value is written to the address of area 4 plus the size of the operand.

さらにエリア2の内容をオペランドのサイズだ
け減少する。
Furthermore, the contents of area 2 are reduced by the size of the operand.

第2図を参照すると、本発明の一実施例は主記
憶装置10,中応処理装置12,およびこれらの
装置を接続するバス11から構成されている。前
記中央処理装置12はバツフア13、レジスタ1
4,命令レジスタ15、アドレスレジスタ16、
前記命令レジスタ15の命令を解読するデコーダ
17、スタツクデータ構造のアドレスを保持する
Tレジスタ19を有するレジスタフアイル18、
レジスタ14またはレジスタフアイル18からの
データを演算する数値論理演算ユニツト20、前
記デコーダ17からの先頭アドレスに基づいてマ
イクロ命令を読み出すコントロールストア21、
およびこのコントロールストア21からのマイク
ロ命令を解読するデコーダ22から構成されてい
る。
Referring to FIG. 2, one embodiment of the present invention is comprised of a main storage device 10, an intermediate processing device 12, and a bus 11 connecting these devices. The central processing unit 12 includes a buffer 13 and a register 1.
4, instruction register 15, address register 16,
a decoder 17 for decoding the instructions in the instruction register 15; a register file 18 having a T register 19 for holding the address of the stack data structure;
a numerical logic operation unit 20 that operates on data from the register 14 or register file 18; a control store 21 that reads out microinstructions based on the start address from the decoder 17;
and a decoder 22 that decodes microinstructions from the control store 21.

次に本実施例の動作を第2図および第3図を参
照しながら詳細に説明する。まず主記憶装置10
から命令を取り出す。このためアドレスレジスタ
16に主記憶装置10に記憶されている命令のア
ドレスをセツトする。
Next, the operation of this embodiment will be explained in detail with reference to FIGS. 2 and 3. First, the main memory 10
Retrieve the command from. For this purpose, the address of the instruction stored in the main memory 10 is set in the address register 16.

次にマイクロ命令の指示により読出し開始信号
が与えられる。主記憶装置10から読み出された
命令は命令レジスタ15に格納される。レジスタ
15に格納された命令のアドレスが主記憶装置1
0のスタツクエリアを示していないときにはその
命令が実行される。もし前記命令が主記憶装置1
0のスタツクエリアを示していないときにはTレ
ジスタ19のアドレスがユニツト20および線2
5を介してアドレスレジスタ16に格納される。
次にレジスタ16のアドレスがバス11を介して
主記憶装置10に与えられ、アドレスによつて指
定された主記憶装置10の第1図のエリア2に相
当する場所からカウントワードが読み出されバス
11を介してレジスタ14に格納される。レジス
タ14に格納されたカウントワードはバス23、
ユニツト20、および線25を介してレジスタフ
アイル18のワーキングレジスタWRIに格納さ
れる。次にアドレスレジスタ16に格納されたア
ドレスが+1され、+1されたアドレスがバス1
1を介して主記憶装置10に供給される。このア
ドレスに応答して主記憶装置1の第1図で示した
エリア3からワードMWが読み出され、バス11
を介してレジスタ14に格納される。レジスタ1
4に格納されたワードMWはバス23、ユニツト
20、および線25を介してレジスタフアイル1
8のワーキングレジスタWR2に格納される。次
にTレジスタ19に格納されたアドレスからレシ
スタフアル18のワーキングレジスタWR1に格
納されたカウントワードがユニツト20で減算さ
れ減算結果は線25を介してアドレスレジスタ1
6にセツトされるとともにレジスタフアイル18
のワーキングレジスタWR4に格納される。
Next, a read start signal is given according to the instruction of the microinstruction. Instructions read from main memory 10 are stored in instruction register 15. The address of the instruction stored in the register 15 is stored in the main memory 1.
If a stack area of 0 is not indicated, the instruction is executed. If the instruction is
When a stack area of 0 is not indicated, the address of T register 19 is set to unit 20 and line 2.
5 and stored in the address register 16.
Next, the address of the register 16 is given to the main memory 10 via the bus 11, and the count word is read from the location corresponding to area 2 in FIG. 1 of the main memory 10 specified by the address. 11 and stored in the register 14. The count word stored in register 14 is transferred to bus 23,
unit 20 and is stored in working register WRI of register file 18 via line 25. Next, the address stored in the address register 16 is incremented by 1, and the incremented address is bus 1.
1 to the main storage device 10. In response to this address, word MW is read from area 3 of main memory 1 shown in FIG.
The data is stored in the register 14 via the . register 1
The word MW stored in register file 1 is transferred via bus 23, unit 20, and line 25 to register file 1.
8 working register WR2. Next, the count word stored in working register WR1 of register file 18 is subtracted from the address stored in T register 19 by unit 20, and the result of the subtraction is sent to address register 1 via line 25.
6 and register file 18.
is stored in working register WR4.

次にアドレスレジスタ16にセツトされたアド
レスがバス11を介して主記憶装置10に与えら
れ装置10のエリア4を指示する。この指示に応
答してデータFLがバス11を介してレジスタ1
4にセツトされたあとバス23、ユニツト20、
線25を介してレジスタフアイル18のワーキン
グレジスタWR3にセツトされる。
Next, the address set in address register 16 is applied to main memory 10 via bus 11 to designate area 4 of device 10. In response to this instruction, data FL is sent to register 1 via bus 11.
After being set to 4, bus 23, unit 20,
It is set in working register WR3 of register file 18 via line 25.

命令レジスタ15に格納された命令がレジスタ
の内容を主記憶装置10のスタツクに押し込む動
作(PUSH)を指示しているときには、レジスタ
フアイル18のワーキングレジスタWR4の内容
から、デコーダ17から与えられる定数がユニツ
ト20で減算され、減算結果が線25を介してレ
ジスタフアイル18のワーキングレジスタWR0
に書き込まれる。
When the instruction stored in the instruction register 15 instructs an operation (PUSH) to push the contents of the register onto the stack of the main memory 10, the constant given from the decoder 17 is determined from the contents of the working register WR4 of the register file 18. unit 20, and the subtraction result is sent to working register WR0 of register file 18 via line 25.
will be written to.

次に書き込まれたレジスタWR0の内容から、
前記デコーダ17から与えられる定数1がユニツ
ト20で減算され減算結果が線25を介してアド
レスレジスタ16に格納される。次にレジスタフ
アイル18のワーキングレジスタWR3に前記デ
コーダ17から与えられるオペランドサイズがユ
ニツト20で加算され、加算結果が線25を介し
てバツフア13に格納される。
From the next written contents of register WR0,
The constant 1 given from the decoder 17 is subtracted by the unit 20 and the result of the subtraction is stored in the address register 16 via the line 25. Next, the operand size given from the decoder 17 is added to the working register WR3 of the register file 18 in the unit 20, and the addition result is stored in the buffer 13 via the line 25.

次に前記ワーキングレジスタWR1のカウント
ワードCWに前記デコーダ17からのオペランド
サイズがユニツト20で加算され、この加算結果
から前記ワーキングレジスタWR2の内容がユニ
ツト20で減算されキヤリー信号がユニツト20
から出力するか否かが確かめられる。もしキヤリ
ー信号が出力されていれば現在実行中のソフトウ
エア命令が中断され新たな命令が実行される。も
しキヤリー信号が出力されていなければTレジス
タ19の内容をユニツト20、および線25を介
してレジスタ16に格納する。次にワーキングレ
ジスタWR1の内容に前記デコーダ17からのオ
ペランドサイズがユニツト20で加算され加算結
果がバツフア13およびバス11を介して主記憶
装置10に記憶される。
Next, the operand size from the decoder 17 is added to the count word CW of the working register WR1 in the unit 20, the contents of the working register WR2 are subtracted from the addition result in the unit 20, and the carry signal is sent to the unit 20.
You can check whether or not to output from. If the carry signal is output, the currently executing software instruction is interrupted and a new instruction is executed. If the carry signal is not output, the contents of T register 19 are stored in register 16 via unit 20 and line 25. Next, the operand size from the decoder 17 is added to the contents of the working register WR1 in the unit 20, and the addition result is stored in the main memory 10 via the buffer 13 and the bus 11.

命令レジスタ15に格納された命令がレジスタ
の内容を主記憶装置10のスタツクに押し込む動
作(PUSH)を指示していないときには、アドレ
スレジスタ16のアドレスが+1される。この+
1されたアドレスにより指示された主記憶装置2
の第1図で示されるエリア7からオペランドが読
み出され、バス11を介してレジスタ14にセツ
トされる。このレジスタ14にセツトされたオペ
ランドはバス23、ユニツト20、および線25
を介してレジスタフアイル18のワーキングレジ
スタW0に格納される。次にレジスタフアイル1
8のワーキングレジスタWR3の内容から、前記
デコーダ17からのオペランドサイズがユニツト
20で減算され、減算結果が線25、バツフア1
3、およびバス11を介して主記憶装置10の第
1図で示されるエリア4に格納される。
When the instruction stored in the instruction register 15 does not instruct an operation (PUSH) to push the contents of the register onto the stack of the main memory 10, the address of the address register 16 is incremented by one. This +
Main memory device 2 indicated by the address specified by 1
Operands are read from area 7 shown in FIG. 1 and set in register 14 via bus 11. The operands set in this register 14 are connected to bus 23, unit 20, and line 25.
The data is stored in the working register W0 of the register file 18 via the register file 18. Next, register file 1
The operand size from the decoder 17 is subtracted from the contents of working register WR3 of No. 8 in unit 20, and the result of the subtraction is shown on line 25 and buffer 1.
3 and the bus 11, the data is stored in the area 4 shown in FIG. 1 of the main storage device 10.

次にワーキングレジスタWR3の内容から、前
記デコーダ17からのオペランドサイズがユニツ
ト20で減算され、ユニツト20からキヤリー信
号が出力されるか否かが確認される。もしキヤリ
ー信号が出力されていなければソフトウエア命令
が中断され新たな命令が実行される。もしキヤリ
ー信号が出力されていればTレジスタ19の内容
がユニツト20、および線25を介してレジスタ
16に設定される。次にワーキングレジスタ19
から、前記デコーダ17からのオペランドサイズ
がユニツト20で減算され、減算結果が線25、
バツフア13、およびバス11を介して主記憶装
置10の第1図で示されるエリア2に書き込まれ
る。
Next, the operand size from the decoder 17 is subtracted from the contents of the working register WR3 in the unit 20, and it is checked whether or not a carry signal is output from the unit 20. If the carry signal is not output, the software command is interrupted and a new command is executed. If a carry signal is output, the contents of T register 19 are set in register 16 via unit 20 and line 25. Next, working register 19
, the operand size from the decoder 17 is subtracted in unit 20, and the result of the subtraction is shown on line 25,
The data is written via buffer 13 and bus 11 to area 2 shown in FIG. 1 of main memory 10.

本発明にはスタツク中のデータにアクセスする
際に主記憶のデータを容易に保護できるという効
果がある。
The present invention has the advantage that data in main memory can be easily protected when accessing data in the stack.

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

第1図は本発明のスタツク構造を示す図、第2
図は本発明の一実施例を示す図および第3図は第
2図に示す一実施例の動作を説明するための図で
ある。 第1図から第3図において、1……スタツク構
造に対するポインタレジスタ、2……スタツクの
現在までの使用語数、3……スタツク領域の最大
容量、4……フレームの語数、5……2の大きさ
を示したもの、6……3の大きさを示したもの、
7……データフレーム、8……4の大きさを示し
たもの、9……スタツク中の最新のデータを指す
ポインタ、10……主記憶、11……共通バス、
12……中央処理装置、13……データバフア、
14……メモリデータレジスタ、15……命令レ
ジスタ、16……メモリアドレスレジスタ、17
……命令デコーダ、18……レジスタフアイル、
19……スタツクポインタ、20……数値論理演
算ユニツト、21……コントロールストア、22
……マイクロ命令デコーダ、23……ALU入力
バスA,24……ALU入力バスB、25……
ALU出力バス。
Figure 1 is a diagram showing the stack structure of the present invention, Figure 2 is a diagram showing the stack structure of the present invention.
The figure shows an embodiment of the present invention, and FIG. 3 is a diagram for explaining the operation of the embodiment shown in FIG. In Figures 1 to 3, 1... pointer register for the stack structure, 2... the number of words used in the stack up to now, 3... the maximum capacity of the stack area, 4... the number of words in the frame, 5... the number of words in the stack. Showing the size, 6... Showing the size of 3,
7...data frame, 8...indicating the size of 4, 9...pointer pointing to the latest data in the stack, 10...main memory, 11...common bus,
12...Central processing unit, 13...Data buffer,
14...Memory data register, 15...Instruction register, 16...Memory address register, 17
...Instruction decoder, 18...Register file,
19... Stack pointer, 20... Numerical logic operation unit, 21... Control store, 22
...Microinstruction decoder, 23...ALU input bus A, 24...ALU input bus B, 25...
ALU output bus.

Claims (1)

【特許請求の範囲】 1 後入れ先出しのデータ構造の主記憶内におけ
る記憶位置を保持するためのアドレス保持手段
と、 前記データ構造の現在までに使用された語数を
保持するための少なくとも1つの記憶場所、前記
データ構造の最大容量を保持するための少なくと
も1つの記憶場所および前記データ構造を1つ以
上のデータフレームに分割し各データフレームの
大きさを保持するよう各データフレームごとに少
なくとも1つの記憶場所を有する記憶手段と、 前記アドレス保持手段の内容と前記データ構造
内の使用語数を保持する記憶場所の内容とにもと
ずいて一番新らしく獲得されたデータフレームの
先頭アドレスを計算するための計算手段と、 前記データ構造を操作するマシン命令に応答し
て起動され該マシン命令の操作コードの内容にも
とずいて前記データ構造内の使用された語数およ
び一番新らしいデータフレームの語数を更新する
更新手段と、 前記データ構造に対してデータを格納していく
ときに前記データ構造内の現在までに使用された
語数と格納すべきデータフレームの語数との加算
値が前記データ構造の最大容量を超えるときには
ソフトウエアに現在実行中の命令の実行を中断す
るよう割り出しを発生し前記格納すべきデータの
格納を抑止するための手段と、 前記データ構造よりデータを取り出す際に一番
新らしいデータフレームの語数と取り出そうとす
るデータの語数とを比較し後者が大きいときに前
記ソフトウエアに前記割り出しを発生するための
手段とを含むことを特徴とするデータ処理システ
ム。
[Scope of Claims] 1. Address holding means for holding a memory location in main memory of a last-in, first-out data structure; and at least one memory for holding the number of words used to date of the data structure. at least one storage location for holding the maximum capacity of said data structure; and at least one storage location for each data frame for dividing said data structure into one or more data frames and holding the size of each data frame. a storage means having a storage location; and calculating a starting address of the most recently acquired data frame based on the contents of the address holding means and the contents of the storage place holding the number of words used in the data structure. computing means activated in response to a machine instruction manipulating the data structure and calculating the number of used words in the data structure and the most recent data frame based on the contents of the operation code of the machine instruction; an updating means for updating the number of words; and when storing data in the data structure, the sum of the number of words used up to now in the data structure and the number of words of the data frame to be stored is added to the data structure. When the maximum capacity of the data structure is exceeded, the software is configured to issue an instruction to interrupt the execution of the currently executing instruction to prevent the storage of the data to be stored; A data processing system comprising means for comparing the number of words of a new data frame with the number of words of data to be retrieved and causing the software to make the determination when the latter is larger.
JP56160539A 1981-10-08 1981-10-08 Data processing system Granted JPS5862884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56160539A JPS5862884A (en) 1981-10-08 1981-10-08 Data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56160539A JPS5862884A (en) 1981-10-08 1981-10-08 Data processing system

Publications (2)

Publication Number Publication Date
JPS5862884A JPS5862884A (en) 1983-04-14
JPS6232556B2 true JPS6232556B2 (en) 1987-07-15

Family

ID=15717161

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56160539A Granted JPS5862884A (en) 1981-10-08 1981-10-08 Data processing system

Country Status (1)

Country Link
JP (1) JPS5862884A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5068438A (en) * 1973-10-18 1975-06-07
JPS5443630A (en) * 1977-09-14 1979-04-06 Hitachi Ltd Memory access control system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5068438A (en) * 1973-10-18 1975-06-07
JPS5443630A (en) * 1977-09-14 1979-04-06 Hitachi Ltd Memory access control system

Also Published As

Publication number Publication date
JPS5862884A (en) 1983-04-14

Similar Documents

Publication Publication Date Title
US5557766A (en) High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank
KR101782313B1 (en) Apparatus and method for handling exception events
US5701493A (en) Exception handling method and apparatus in data processing systems
US4777588A (en) General-purpose register file optimized for intraprocedural register allocation, procedure calls, and multitasking performance
US6038631A (en) Data processing system and method using virtual storage system
JP3707581B2 (en) Data processing system having self-aligned stack pointer and method thereof
JPH1196002A (en) Data processor
JPH09128267A (en) Data processor and data processing method
JPS6232556B2 (en)
JPH09198257A (en) Program executing method and program executing device using this method
JP2562838B2 (en) Processor and store buffer control method
JPS58178464A (en) Parallel arithmetic processing unit
JPS6051947A (en) Instruction prefetching system in virtual storage computer
WO1990005951A1 (en) Method of handling unintended software interrupt exceptions
JPS6148741B2 (en)
JPS59218569A (en) Microcomputer
JPH02304624A (en) Information processor
JPS60193046A (en) Detecting system for instruction exception
JPS6149695B2 (en)
JPS59172044A (en) Instruction control system
JPS6020769B2 (en) Microprogram control method
JPH0720769Y2 (en) Small electronic calculator with programming function
JPH03282625A (en) Data processor
JP2504151B2 (en) Data processing device
JPS62151936A (en) Cache circuit built in microprocessor