JPS61276029A - Stack control method - Google Patents
Stack control methodInfo
- Publication number
- JPS61276029A JPS61276029A JP60118036A JP11803685A JPS61276029A JP S61276029 A JPS61276029 A JP S61276029A JP 60118036 A JP60118036 A JP 60118036A JP 11803685 A JP11803685 A JP 11803685A JP S61276029 A JPS61276029 A JP S61276029A
- Authority
- JP
- Japan
- Prior art keywords
- value
- stack
- variable area
- outputted
- valid
- 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
Links
Landscapes
- Executing Machine-Instructions (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
〔概要〕
値スタックの値によって指定される変数域の有効又は無
効を示すインデックススタックの値によって値スタック
の値を修飾して出力し、もってスタック変数域の値を値
スタックの初期化なしに出力し得るようにした。これに
より、スタック制御処理の高速化を図り得る。[Detailed Description of the Invention] [Summary] The value of the value stack is modified and outputted by the value of the index stack indicating the validity or invalidity of the variable area specified by the value of the value stack, thereby converting the value of the stack variable area into a value. It is now possible to output without initializing the stack. Thereby, it is possible to speed up the stack control processing.
本発明はスタック制御方式に関し、更に詳しく云えばス
タック上に設けられる変数域の初期化の必要性を除いた
スタック制御方式に関する。The present invention relates to a stack control method, and more particularly to a stack control method that eliminates the need to initialize variable areas provided on the stack.
計算機等で用いられる高級言語プログラム、例えばLI
PS、PROLOGでは、そのプログラム中で用いられ
る変数値を計算機等メモリ空間内のスタック上に変数域
を確保してそこに保持するようにしている。、その変数
域は繰り返し割付けを行ないながら使用されるものであ
り、しかもその初期値が所望の値にあることが必要であ
るから、その処理の高速性が失われる傾向を有する。こ
れはプログラムを高速に進めたいという欲求とは相反す
るものであり、この不都合を解決し得る技術手段が求め
られるところとなっている。High-level language programs used in computers, etc., such as LI
In PS and PROLOG, variable values used in the program are secured in a variable area on a stack in the memory space of a computer, etc., and held there. , the variable area is used while being repeatedly allocated, and its initial value must be a desired value, so the high-speed processing tends to be lost. This is contrary to the desire to run programs at high speed, and there is a need for technical means that can solve this inconvenience.
従来における変数域のスタック上への割付けを行なう場
合、その変数域の初期値は不定のものであるため、その
初期化を必要としていた。これはスタックの性質上繰り
返し書き改められ参照されるものであることに起因する
。Conventionally, when allocating a variable area on a stack, the initial value of the variable area is undefined, so it is necessary to initialize it. This is because the nature of the stack is that it is repeatedly rewritten and referenced.
上述のような変数域の割付けには明示的な初期化を必要
不可欠とするものであるが、その処理に時間がとられ、
プログラムを高速に処理できず、システム性能の向上が
阻害されている。Explicit initialization is indispensable for allocating variable areas as described above, but this process takes time.
Programs cannot be processed at high speed, hindering improvements in system performance.
本発明は上述のような問題点に鑑みて創作されたもので
、スタック変数域の初期化の必要性を除いてスタック制
御処理を高速化し得るスタック制御方式を提供すること
をその目的とする。The present invention was created in view of the above-mentioned problems, and an object of the present invention is to provide a stack control method that can speed up stack control processing by eliminating the need to initialize the stack variable area.
第1図は本発明の原理ブロック図を示す。 FIG. 1 shows a block diagram of the principle of the present invention.
この図において、■は変数域をスタック上に割り当てて
変数値の代入及び参照を必要とする電子計算機等のシス
テムに設けられた値スタックで、これは変数域の値を格
納するものである。2は値スタック1の値によって指定
される変数域が有効であるか否かを示すインデックスス
タックである。In this figure, ■ is a value stack provided in a system such as a computer that requires assignment and reference of variable values by allocating a variable area on the stack, and this is a value stack that stores the values of the variable area. 2 is an index stack that indicates whether the variable area specified by the value of value stack 1 is valid or not.
3は値スタックlの値をインデックススタ・ツク2の内
容によって修飾する修飾手段である。3 is a modification means for modifying the value of value stack 1 by the contents of index stack 2;
スタックのアドレスが指定されると、値スタックlから
変数域の値が出力され、インデックススタック2から変
数域有効/無効の信号が発生される。インデックススタ
ック2から有効信号が発生される場合には、値スタック
lからの値を変数域の値として修飾手段3がら出力する
が、無効信号が発生される場合には、修飾処理された値
を変数域の初期値として修飾手段3から出力する。When a stack address is specified, the value of the variable area is output from the value stack l, and a variable area valid/invalid signal is generated from the index stack 2. When a valid signal is generated from the index stack 2, the value from the value stack l is output from the modification means 3 as a value in the variable area, but when an invalid signal is generated, the modified value is output. It is output from the modification means 3 as the initial value of the variable area.
従って、値スタック1の明示的な初期化を行なう必要性
がなくなる。Therefore, there is no need to explicitly initialize value stack 1.
第2図は本発明の一実施例を示す。 FIG. 2 shows an embodiment of the invention.
この図において、10は変数域をスタック上に割り当て
その変数域をプログラム処理に供する電子計算機等のシ
ステムに設けられた値スタックで、変数域の値を格納す
るものである。その格納される値は入力信号線11を介
して送られて来てスタックポインタ12に設定されるポ
インタが指す値スタック10の格納域に格納され、又、
そこから読み出されて線13を介してマルチプレクサ1
4へ供給される。このマルチプレクサ14へは定数発生
回路15の出力が接続されており、これら両入力のいず
れか一方を選択して出力信号線16上に出力せしめる選
択信号が線17から供給される。In this figure, numeral 10 is a value stack provided in a system such as a computer that allocates a variable area on a stack and uses the variable area for program processing, and stores the values of the variable area. The value to be stored is sent via the input signal line 11 and stored in the storage area of the value stack 10 pointed to by the pointer set in the stack pointer 12, and
from which it is read out via line 13 to multiplexer 1.
4. The output of a constant generation circuit 15 is connected to the multiplexer 14, and a selection signal for selecting one of these two inputs and outputting it on an output signal line 16 is supplied from a line 17.
線17はバリッドスタック(インデックススタック)1
8の出力に接続されている。Line 17 is valid stack (index stack) 1
It is connected to the output of 8.
バリッドスタック18は値スタック10に格納される値
毎に対応した有効/無効(“1”/“O”)を示すビッ
トを格納するものである。そのピントの格納手段は“1
”及び“0”を供給する手段19,20、マルチプレク
サ21及びリセット回路22から成る。The valid stack 18 stores bits indicating validity/invalidity (“1”/“O”) corresponding to each value stored in the value stack 10. The focus storage means is “1”
” and “0”, a multiplexer 21 and a reset circuit 22.
上述構成の下におけるスタック制御態様を以下に説明す
る。The stack control mode under the above configuration will be explained below.
値スタック10に変数域の値を設定する場合には、その
値例えば32ビツトが入力信号線11を介して値スタッ
ク10へ送られると共に、その値を値スタック10に格
納する格納域を指示するポインタがスタックポインタ1
2を介して値スタック10のアクセス部10Aへ送られ
て上記ポインタがt旨す格納域に変数域の値が格納され
る。これと同時にバリッドスタック18ヘスタ・ツクポ
インタ12のポインタが送られて来てそのポインタが指
定する格納域に供給手段19からの定数“1”がマルチ
プレクサ21により選択されて書き込まれる。これによ
り、変数域の値は有効となる。逆に、変数域の値の無効
性を示す場合には供給手段20からの定数“O”がマル
チプレクサ21により選択されて書き込まれる。マルチ
プレクサ21の選択制御はリセット回路22によって行
なわれる。When setting the value of a variable area in the value stack 10, the value, for example, 32 bits, is sent to the value stack 10 via the input signal line 11, and the storage area in which the value is stored in the value stack 10 is specified. Pointer is stack pointer 1
2 to the access unit 10A of the value stack 10, and the value of the variable area is stored in the storage area indicated by the pointer t. At the same time, the pointer of the hester pointer 12 of the valid stack 18 is sent, and the constant "1" from the supply means 19 is selected by the multiplexer 21 and written into the storage area specified by the pointer. This makes the value in the variable area valid. Conversely, when indicating invalidity of the value in the variable area, the constant "O" from the supply means 20 is selected by the multiplexer 21 and written. Selection control of multiplexer 21 is performed by reset circuit 22.
上述のようにして値スタック10に書き込まれた変数域
の値を読み出す場合には、読み出したい格納域を指定す
るポインタをスタックポインタ12に設定する。これに
より、値スタック10から変数域の値例えば32ビ・ノ
ドのデータが出力され、バリッドスタック18から1ビ
ツトのデータ(変数域の値の有効/無効を示す値)が出
力される。When reading the value of the variable area written to the value stack 10 as described above, a pointer designating the storage area to be read is set in the stack pointer 12. As a result, the value of the variable area, for example, 32-bit data, is output from the value stack 10, and the valid stack 18 outputs 1-bit data (a value indicating validity/invalidity of the value of the variable area).
このバリッドスタック18からの1ビツトデータがマル
チプレクサ14へ供給されてその選択制御を生ぜしめる
。これにより、1ビツトデータが有効性を示す場合には
値スタック10からの値が出力信号線16上に出力され
、無効性を示す場合には、定数発生回路15からの予め
決められる変数域の値を初期値として出力信号線16上
に出力される。One bit data from this valid stack 18 is provided to multiplexer 14 to effect its selection control. As a result, when the 1-bit data indicates validity, the value from the value stack 10 is output onto the output signal line 16, and when it indicates invalidity, the value from the predetermined variable range from the constant generation circuit 15 is output. The value is outputted onto the output signal line 16 as an initial value.
かくして、値スタックの明示的な初期化を行なう必要性
はなくなる。Thus, there is no need for explicit initialization of the value stack.
なお、値スタック10及び定数発生回路15から出力信
号線16へ至る系に対するパリ、7ドスタソク18の内
容の役割は上述のような選択制御だけでなく、値スタッ
クIOに有効な初期値を有し得なくなった場合にその初
期値を線16上に出力し得る修飾系に構成されてもよい
。The role of the content of the output signal line 18 from the value stack 10 and the constant generation circuit 15 to the output signal line 16 is not only to control the selection described above, but also to provide a valid initial value to the value stack IO. The modification system may be configured to output the initial value on the line 16 when the initial value is no longer available.
〔発明の効果]
以上説明したように本発明によれば、値スタックの明示
的な初期化を行なう必要性はないから、変数域の割付け
を高速に為し得てシステム性能の向上に役立つ。[Effects of the Invention] As explained above, according to the present invention, there is no need to explicitly initialize the value stack, so variable areas can be allocated at high speed, which is useful for improving system performance.
第1図は本発明の原理ブロック図、 第2図は本発明の一実施例を示す図である。 第1図において 1は値スタック、 2はインデックススタック、 3は修飾手段である。 本発明の原王里フ゛ロック図 第1図 Figure 1 is a block diagram of the principle of the present invention. FIG. 2 is a diagram showing an embodiment of the present invention. In Figure 1 1 is a value stack, 2 is the index stack, 3 is a modification means. Haraori block diagram of the present invention Figure 1
Claims (1)
ム処理に供するシステムにおいて、前記変数域の値を格
納する値スタック(1)と、該変数域の値によって指定
される変数域が有効であるか否かを示すインデックスス
タック(2)と、前記値スタックに格納されている値を
前記インデックススタックの値によって修飾する修飾手
段(3)とを設けて前記値スタックの初期化なしに変数
域の割付けを行ない得ることを特徴とするスタック制御
方式。In a system that allocates a variable area on a stack and uses that variable area for program processing, is the value stack (1) that stores the value of the variable area and the variable area specified by the value of the variable area valid? Allocating a variable area without initializing the value stack by providing an index stack (2) that indicates whether or not to use the index stack, and a modification means (3) that modifies the value stored in the value stack by the value of the index stack. A stack control method characterized by being able to perform the following.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60118036A JPS61276029A (en) | 1985-05-31 | 1985-05-31 | Stack control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP60118036A JPS61276029A (en) | 1985-05-31 | 1985-05-31 | Stack control method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS61276029A true JPS61276029A (en) | 1986-12-06 |
Family
ID=14726458
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP60118036A Pending JPS61276029A (en) | 1985-05-31 | 1985-05-31 | Stack control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS61276029A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021043918A (en) * | 2019-09-13 | 2021-03-18 | 富士通株式会社 | Information processing equipment, information processing programs, and information processing methods |
-
1985
- 1985-05-31 JP JP60118036A patent/JPS61276029A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021043918A (en) * | 2019-09-13 | 2021-03-18 | 富士通株式会社 | Information processing equipment, information processing programs, and information processing methods |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4777588A (en) | General-purpose register file optimized for intraprocedural register allocation, procedure calls, and multitasking performance | |
GB2269247A (en) | Interfacing an IC memory card to a central processing unit of a computer | |
US5842012A (en) | Efficient soft reset in a personal computer | |
JPS61276029A (en) | Stack control method | |
JPS583040A (en) | Information processor | |
US5761737A (en) | Data driven type information processing apparatus having improved generation number translation | |
JP2535086B2 (en) | Ring reduction logic device | |
JPS6125168B2 (en) | ||
JPH03283188A (en) | Memory system | |
JP2510317B2 (en) | TLB access device | |
JPS60241135A (en) | Address producing system | |
JPH07175661A (en) | User program load system | |
JPS59121455A (en) | Prefixing system | |
JPS6134628A (en) | tagged calculator | |
JPH01261761A (en) | Computer system | |
JPH03142543A (en) | Memory control circuit | |
JPH05151020A (en) | Digital signal processor | |
JPS6320631A (en) | Register selecting system | |
JPS6159560A (en) | I/o expansion device | |
JPS63226734A (en) | Memory control method | |
JPH0319570B2 (en) | ||
JPS5942699A (en) | One-chip microcomputer | |
JPS6125248A (en) | Base register dedicated architecture | |
JPH0427575B2 (en) | ||
JPH02114344A (en) | Garbage collection processor |