JP3469753B2 - Return address read control method of processor and processor - Google Patents

Return address read control method of processor and processor

Info

Publication number
JP3469753B2
JP3469753B2 JP25895697A JP25895697A JP3469753B2 JP 3469753 B2 JP3469753 B2 JP 3469753B2 JP 25895697 A JP25895697 A JP 25895697A JP 25895697 A JP25895697 A JP 25895697A JP 3469753 B2 JP3469753 B2 JP 3469753B2
Authority
JP
Japan
Prior art keywords
register
program module
return
return address
processor
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 - Fee Related
Application number
JP25895697A
Other languages
Japanese (ja)
Other versions
JPH1196007A (en
Inventor
俊哉 坂本
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP25895697A priority Critical patent/JP3469753B2/en
Publication of JPH1196007A publication Critical patent/JPH1196007A/en
Application granted granted Critical
Publication of JP3469753B2 publication Critical patent/JP3469753B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、割り込み信号また
はサブルーチンコールによるプログラムモジュールの多
重呼び出しをサポートし、しかも呼び出されたプログラ
ムモジュールからそれを呼び出したプログラムモジュー
ルへの戻り番地を記憶するために、スタック構造の記憶
装置を使用するプロセッサ及びその戻り番地読み出し制
御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention supports multiple calls of a program module by an interrupt signal or a subroutine call, and moreover, stores a return address from a called program module to a calling program module. The present invention relates to a processor using a storage device having a structure and a return address read control method thereof.

【0002】[0002]

【従来の技術】割り込み信号又はサブルーチンコールに
よるプログラムモジュールの多重呼び出しをサポート
し、呼び出されたプログラムモジュールからそれを呼び
出したプログラムモジュールへの戻り番地をスタック構
造の記憶装置に記憶するプロセッサがある。スタックと
は、最後に入力したデータを最初に出力するデータ構造
であって、LIFO (Last In - First Out)とも呼ばれる。
スタック構造の記憶装置は、主にデータの一時退避の目
的で使用される。
2. Description of the Related Art There is a processor that supports multiple calls of a program module by an interrupt signal or a subroutine call and stores a return address from the called program module to the calling program module in a storage device having a stack structure. The stack is a data structure that outputs the last input data first, and is also called LIFO (Last In-First Out).
The storage device having a stack structure is mainly used for the purpose of temporarily saving data.

【0003】前記記憶装置には、レジスタ又はメモリが
用いられ、両者は、以下に説明するような特徴を夫々有
している。レジスタは、メモリより高速に読み出し/書
き込みを行うことが可能であるが、記憶容量当たりの単
価がメモリより高価であるため、同一の記憶容量を実装
する場合、メモリより割高になる。一方、メモリは、記
憶容量当たりの単価がレジスタより安価であるが、その
読み出し/書き込み速度はレジスタに劣る。従って、前
記記憶装置にレジスタ又はメモリのいずれを採用するか
は、必要とする処理速度とそのプロセッサに設定する価
格との兼ね合いにより決定される。一般的には、少量の
レジスタとメモリ(データメモリ上に設けたスタック専
用の領域)とが併用されている。
A register or a memory is used as the storage device, and both have the characteristics described below. The register can read / write faster than the memory, but since the unit price per storage capacity is higher than the memory, it becomes more expensive than the memory when the same storage capacity is implemented. On the other hand, a memory has a lower unit price per storage capacity than a register, but its reading / writing speed is inferior to that of a register. Therefore, whether to use a register or a memory for the storage device is determined by a trade-off between the required processing speed and the price set for the processor. Generally, a small amount of registers and a memory (area dedicated to the stack provided on the data memory) are used together.

【0004】1レベル分のレジスタとスタック専用のス
タックメモリとを併用するプロセッサは、プログラムモ
ジュールの多重呼び出しを受け付ける都度、呼び出しが
発生したプログラムモジュールへの戻り番地を前記レジ
スタに上書きし、また前記スタックメモリにプッシュす
る。即ち、レジスタには、その時点において実行中のプ
ログラムモジュールを呼び出した、上位レベルのプログ
ラムモジュールの戻り番地が書き込まれてある。
Each time a processor that uses a register for one level and a stack memory dedicated for stacking receives a multiple call of a program module, the return address to the program module in which the call occurs is overwritten in the register and the stack is also stacked. Push to memory. That is, the return address of the higher-level program module that called the program module currently being executed is written in the register.

【0005】図3は、前述のプロセッサの実行時におけ
るレジスタの記憶内容を説明する説明図である。図中、
メインルーチンにおいて、割り込み信号またはサブルー
チンコールによりサブルーチンAの呼び出しが発生した
とき、プッシュ命令が実行される。そうすると、メイン
ルーチンへの戻り番地RMがレジスタ及びスタックメモリ
の両方に書き込まれる。そして、サブルーチンAの実行
に移る。
FIG. 3 is an explanatory diagram for explaining the stored contents of the registers when the above-mentioned processor is executed. In the figure,
In the main routine, the push instruction is executed when the call of the subroutine A occurs due to the interrupt signal or the subroutine call. Then, the return address RM to the main routine is written in both the register and the stack memory. Then, the execution of the subroutine A is started.

【0006】サブルーチンAにおいて、サブルーチンB
の呼び出しが発生したとき、プッシュ命令が実行され
て、その戻り番地RAが前記レジスタに上書きされる。ま
た戻り番地RAは前記スタックメモリにプッシュされる。
そして、サブルーチンBの実行に移る。サブルーチンB
において、サブルーチンCの呼び出しが発生したとき、
プッシュ命令が実行されて、その戻り番地RBが前記レジ
スタに上書きされる。また戻り番地RBは前記スタックメ
モリにプッシュされる。そして、サブルーチンCの実行
に移る。
In Subroutine A, Subroutine B
When a call is issued, a push instruction is executed and its return address RA is overwritten in the register. The return address RA is pushed to the stack memory.
Then, the execution of the subroutine B is performed. Subroutine B
When a call to subroutine C occurs,
The push instruction is executed, and the return address RB is overwritten in the register. The return address RB is pushed to the stack memory. Then, the execution of the subroutine C is performed.

【0007】そして、復帰命令を受け付けたとき、前記
レジスタから読み出した戻り番地RBに基づいて、サブル
ーチンCからその上位レベルのサブルーチンBへ復帰
(リターン)する。一旦、上位レベルのプログラムモジ
ュール(サブルーチンB)へ復帰した後、そこから更に
上位レベルのプログラムモジュール(サブルーチンA)
へ復帰する場合は、レジスタに記憶されている戻り番地
が無効であるため、戻り番地をスタックメモリからポッ
プして使用する。サブルーチンAからメインルーチンへ
の復帰においても同様である。
When the return instruction is accepted, the subroutine C is returned to the higher-level subroutine B based on the return address RB read from the register. Once returning to the higher-level program module (subroutine B), from there, the higher-level program module (subroutine A)
When returning to, since the return address stored in the register is invalid, the return address is popped from the stack memory and used. The same applies to the return from the subroutine A to the main routine.

【0008】[0008]

【発明が解決しようとする課題】ところで、戻り番地を
レジスタから読み出して復帰する場合と、スタックメモ
リからポップして復帰する場合とでは、使用すべき復帰
命令が異なる。例えば、テキサス・インスツルメンツ社
製のDSP (Digital Signal Processor)であるTMS320C54x
においては、前者の指令をRETF命令、後者の指令をRET
命令により受け付ける。RETF命令の方が、RET 命令より
少ない動作クロック数で上位レベルのプログラムモジュ
ールへ復帰することができる。
The return instruction to be used differs depending on whether the return address is read from the register to return and the return address is popped from the stack memory to return. For example, TMS320C54x, a DSP (Digital Signal Processor) manufactured by Texas Instruments
, The former command is the RETF command and the latter command is RET
Accepted by command. The RETF instruction can return to the higher-level program module with a smaller number of operation clocks than the RET instruction.

【0009】つまり、割り込み信号またはサブルーチン
コールによる多重呼び出しが発生しないプログラムモジ
ュール(前述のサブルーチンC)においては、レジスタ
に記憶されている戻り番地が有効であるため、レジスタ
から戻り番地を読み出すRETF命令を使用することによ
り、処理の高速化を図ることができる。また、それ以外
のプログラムモジュール(サブルーチンA,B)におい
ては、レジスタに記憶されている戻り番地が無効である
ため、スタックメモリに記憶されている戻り番地を読み
出すRET 命令を使用する。
In other words, in the program module (subroutine C described above) in which multiple calls due to interrupt signals or subroutine calls do not occur, the return address stored in the register is valid, so the RETF instruction for reading the return address from the register is issued. By using it, the processing speed can be increased. In the other program modules (subroutines A and B), since the return address stored in the register is invalid, the RET instruction for reading the return address stored in the stack memory is used.

【0010】即ち、復帰命令の使い分けのために、前記
プロセッサのプログラムモジュールを作成するプログラ
マは、その作成時に、プログラムモジュールの実行時に
おける多重呼び出しの状況を把握しておく必要がある。
しかし、プログラムモジュールの作成段階において、そ
れにサブルーチンコールが存在するか否かは、プログラ
マに取って明らかであるものの、その実行時の割り込み
信号の状況まで把握することは不可能である。
That is, in order to properly use the return instruction, the programmer who creates the program module of the processor needs to know the status of multiple calls at the time of execution of the program module when creating the program module.
However, although it is clear to the programmer whether or not there is a subroutine call in the program module creation stage, it is impossible to grasp the state of the interrupt signal at the time of execution.

【0011】従って、割り込みが発生しうるプログラム
モジュールにおいては、その実行時にレジスタに記憶さ
れている戻り番地が有効か否かを判別できない。そこ
で、このようなプログラムモジュールの復帰命令には、
RET 命令を使用していた。つまり、割り込みが発生しう
るプログラムモジュールにおいて、その実行時に割り込
みが発生せず、復帰命令にRETF命令を使用することが可
能な状況が生じたとしても、予め指定されているRET 命
令に従って上位レベルのプログラムモジュールへ復帰す
るので、処理の高速化の余地を残していた。
Therefore, in the program module in which an interrupt may occur, it is impossible to determine whether the return address stored in the register is valid at the time of execution. So, in such a program module return instruction,
I was using the RET instruction. In other words, in a program module that can generate an interrupt, even if the RETF instruction can be used for the return instruction without the interrupt occurring during its execution, the higher level Since it returns to the program module, there was room for speeding up the processing.

【0012】本発明は、斯かる事情に鑑みてなされたも
のであって、多重呼び出しが発生する都度、その戻り番
地を所定のレジスタに上書きすべくなしたプロセッサに
おいて、レジスタに記憶されている戻り番地が有効であ
るか否かを判別し、有効であると判別した場合、レジス
タから戻り番地を読み出して復帰することが可能な戻り
番地読み出し制御方法及びその実施に使用するプロセッ
サの提供を目的とする。
The present invention has been made in view of the above circumstances, and in a processor configured to overwrite a return address in a predetermined register each time a multiple call occurs, the return stored in the register is returned. An object of the present invention is to provide a return address read control method capable of reading the return address from the register and returning when it is determined that the address is valid, and if it is determined to be valid, and a processor used for the execution. To do.

【0013】[0013]

【課題を解決するための手段】第1発明に係るプロセッ
サの戻り番地読み出し制御方法は、プログラムモジュー
ルの実行時にプログラムモジュールを呼び出す多重呼び
出しが発生したとき、プッシュ命令を実行することによ
って上位レベルのプログラムモジュールへの戻り番地を
スタックメモリ及びレジスタに書き込み、また呼び出さ
れたプログラムモジュールからの復帰が発生したとき、
ポップ命令を実行することによって前記スタックメモリ
又はレジスタから戻り番地を読み出し、上位レベルのプ
ログラムモジュールへ復帰すべくなしたプロセッサの戻
り番地読み出し制御方法において、プッシュ命令を実行
する都度、前記レジスタのステータスを表すステータス
レジスタに所定値をセットし、またポップ命令を実行す
る都度、前記ステータスレジスタをリセットし、上位レ
ベルのプログラムモジュールへの復帰に際して、前記ス
テータスレジスタに所定値がセットされているか否かを
判別し、セットされていると判別した場合、前記レジス
タから戻り番地を読み出して、上位レベルのプログラム
モジュールへ復帰することを特徴とする。
A return address read control method for a processor according to a first aspect of the present invention, a program of a higher level is executed by executing a push instruction when multiple calls for calling a program module occur during execution of the program module. When the return address to the module is written to the stack memory and the register, and the return from the called program module occurs,
In the return address read control method of the processor which reads the return address from the stack memory or the register by executing the pop instruction and returns to the higher-level program module, the status of the register is changed each time the push instruction is executed. A predetermined value is set in the status register that indicates that the status register is reset each time a pop instruction is executed, and when returning to the higher-level program module, it is determined whether or not the predetermined value is set in the status register. However, when it is determined that it is set, the return address is read from the register and the process is returned to the higher-level program module.

【0014】第2発明に係るプロセッサは、プログラム
モジュールの実行時にプログラムモジュールを呼び出す
多重呼び出しが発生したとき、プッシュ命令を実行する
ことによって上位レベルのプログラムモジュールへの戻
り番地をスタックメモリ及びレジスタに書き込み、また
呼び出されたプログラムモジュールからの復帰が発生し
たとき、ポップ命令を実行することによって前記スタッ
クメモリ又はレジスタから戻り番地を読み出し、上位レ
ベルのプログラムモジュールへ復帰すべくなしたプロセ
ッサにおいて、プッシュ命令を実行する都度、所定値を
セットし、またポップ命令を実行する都度、リセットす
べくなしたステータスレジスタと、該ステータスレジス
タに所定値がセットされているか否かを判別する手段と
を備え、該手段により所定値がセットされていると判別
したとき、前記レジスタから戻り番地を読み出して、上
位レベルのプログラムモジュールへ復帰すべくなしたこ
とを特徴とする。
The processor according to the second invention writes the return address to the higher-level program module in the stack memory and the register by executing the push instruction when a multiple call for calling the program module occurs during the execution of the program module. In addition, when a return from the called program module occurs, a pop instruction is executed to read the return address from the stack memory or register, and a push instruction is issued to the processor for returning to the higher level program module. The status register is set to set a predetermined value each time it is executed and reset each time the pop instruction is executed, and means for determining whether the predetermined value is set in the status register. To Ri when a predetermined value is determined to have been set, reads the return address from the register, characterized in that no order to return to the higher-level program modules.

【0015】前記プロセッサの戻り番地読み出し制御方
法の実施に使用するプロセッサにおいては、多重呼び出
しによりレジスタに書き込まれた戻り番地が読み出され
たか否かを表すステータスレジスタを設けておき、戻り
番地のプッシュ又はポップが行われる都度、前記ステー
タスレジスタをセット/リセットする。そして、ステー
タスレジスタのステータスがセットであるか否かを判別
し、セットであるときは、レジスタに記憶された戻り番
地が有効であると判断して、レジスタに記憶された戻り
番地を読み出して復帰することにより、処理の高速化を
図る。
In the processor used for implementing the return address read control method of the processor, a status register indicating whether or not the return address written in the register by multiple call is read is provided, and the return address is pushed. Alternatively, each time a pop is performed, the status register is set / reset. Then, it is determined whether or not the status of the status register is set, and if it is set, it is determined that the return address stored in the register is valid, and the return address stored in the register is read out to restore. By doing so, the processing speed is increased.

【0016】[0016]

【発明の実施の形態】図1は、本発明のプロセッサの構
成を示す要部ブロック図である。図において、1はアド
レス信号を伝送するアドレスバスである。アドレスバス
1は、スタックレジスタ2と接続しており、アドレスバ
ス1において伝送されるアドレス信号をスタックレジス
タ2へ与えるべくなしてある。スタックレジスタ2のリ
ード/ライト制御端子には、ポップ命令/プッシュ命令
と対応するリード/ライト信号が与えられ、ライト信号
が与えられたとき、アドレスバス1において伝送される
アドレス信号を、多重呼び出しにおける1レベル分の戻
り番地として記憶する。またスタックレジスタ2は与え
られたアドレス信号をスタックメモリ3及びマルチプレ
クサ4の一方の入力端子へ与えるべくなしてある。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a principal block diagram showing the configuration of a processor of the present invention. In the figure, 1 is an address bus for transmitting an address signal. The address bus 1 is connected to the stack register 2 so as to provide the address signal transmitted on the address bus 1 to the stack register 2. A read / write control terminal of the stack register 2 is supplied with a read / write signal corresponding to a pop command / push command, and when the write signal is supplied, the address signal transmitted on the address bus 1 is multiplexed. It is stored as a return address for one level. Further, the stack register 2 is adapted to provide the applied address signal to one input terminal of the stack memory 3 and the multiplexer 4.

【0017】スタックメモリ3には、スタックポインタ
5を設けてあって、スタックレジスタ2を介して与えら
れたアドレス信号をスタックポインタ5が指し示すアド
レスに記憶する。スタックポインタ5は、それが記憶す
るアドレスを演算器6の演算データ入力端子の一方へ与
える。また、演算器6の他方の演算データ入力端子へ1
が与えられており、更に、加算/減算を選択するための
制御入力端子へ、リード/ライト信号を与えるべくなし
てある。
The stack memory 3 is provided with a stack pointer 5 and stores the address signal given through the stack register 2 at the address indicated by the stack pointer 5. The stack pointer 5 gives the address stored therein to one of the operation data input terminals of the operation unit 6. In addition, 1 is input to the other operation data input terminal of the operation unit 6.
And a read / write signal is applied to the control input terminal for selecting addition / subtraction.

【0018】演算器6は、アドレス信号のプッシュ命令
を受け付けたとき、スタックポインタ5に記憶してある
アドレス値に1を加える。また、アドレス信号のポップ
命令を受け付けたとき、スタックポインタ5に記憶して
あるアドレス値から1を減算する。ステータスレジスタ
7は前記リード/ライト信号を受け付け、リード信号が
与えられた場合、即ちポップ命令を受け付けたときリセ
ットし、またライト信号が与えられた場合、即ちプッシ
ュ命令を受け付けたとき所定値(例えば1)をセットす
べくなしてある。ステータスレジスタ7にセットされた
値はマルチプレクサ4のコントロール端子へ与えられ
る。
When the arithmetic unit 6 receives the push command of the address signal, the arithmetic unit 6 adds 1 to the address value stored in the stack pointer 5. When the pop instruction of the address signal is accepted, 1 is subtracted from the address value stored in the stack pointer 5. The status register 7 receives the read / write signal, resets when a read signal is given, that is, when a pop command is received, and when a write signal is given, that is, when a push command is received, a predetermined value (for example, I'm trying to set 1). The value set in the status register 7 is given to the control terminal of the multiplexer 4.

【0019】マルチプレクサ4の他方の入力端子へは、
スタックメモリ3から読み出したアドレス値を与えるべ
くなしてあって、そのコントロール端子へ所定値が与え
られたとき、スタックレジスタ2から与えられたアドレ
ス値をアドレスバス1へ与える。また、コントロール端
子へ所定値以外の値が与えられたときは、スタックメモ
リ3から与えられたアドレス値をアドレスバス1へ与え
る。
To the other input terminal of the multiplexer 4,
The address value read from the stack memory 3 is given, and when a predetermined value is given to the control terminal, the address value given from the stack register 2 is given to the address bus 1. When a value other than the predetermined value is given to the control terminal, the address value given from the stack memory 3 is given to the address bus 1.

【0020】図2は、本発明のプロセッサの処理手順を
示すフローチャートである。ポップ命令を受け付けたと
き、ステータスレジスタ1の値が所定値1であるか否か
を判別し(S1)、1でないと判別したとき、スタックメモ
リ3からアドレス値を読み出す(S2)。1であると判別し
たとき、スタックレジスタ2からアドレス値を読み出す
(S3)。そして、ステータスレジスタ1をリセットして(S
4)、プログラムカウンタ(PC) へ読み出したアドレス値
を書き込む(S5)。
FIG. 2 is a flow chart showing the processing procedure of the processor of the present invention. When the pop instruction is accepted, it is determined whether or not the value of the status register 1 is the predetermined value 1 (S1), and when it is determined that it is not 1, the address value is read from the stack memory 3 (S2). When it is determined to be 1, the address value is read from the stack register 2
(S3). Then reset status register 1 (S
4) Write the read address value to the program counter (PC) (S5).

【0021】[0021]

【発明の効果】以上の如き第1発明のプロセッサの戻り
番地読み出し制御方法及び第2発明のプロセッサによっ
ては、ステータスレジスタを設け、戻り番地のプッシュ
又はポップが行われる都度、前記ステータスレジスタを
セット/リセットすることにより、レジスタに記憶され
た戻り番地が有効であるか否かを判別するため、割り込
みが発生しうるプログラムモジュールにおいて、レジス
タに記憶された戻り番地が有効である場合は、戻り番地
を前記レジスタから読み出すことにより、処理の高速化
を図ることができる。また、プログラムの作成時に指定
すべき復帰命令は一つで済むことから、プログラマを状
況に応じた復帰命令の使い分けから解放することができ
る。
According to the return address read control method of the processor of the first aspect of the invention and the processor of the second aspect of the invention as described above, a status register is provided, and each time the return address is pushed or popped, the status register is set / set. In order to determine whether the return address stored in the register is valid by resetting, if the return address stored in the register is valid in the program module that may generate an interrupt, return the return address. By reading from the register, the processing speed can be increased. Moreover, since only one return instruction needs to be specified when creating a program, the programmer can be freed from the proper use of the return instruction depending on the situation.

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

【図1】本発明のプロセッサの構成を示す要部ブロック
図である。
FIG. 1 is a principal block diagram showing a configuration of a processor of the present invention.

【図2】本発明のプロセッサの処理手順を示すフローチ
ャートである。
FIG. 2 is a flowchart showing a processing procedure of a processor of the present invention.

【図3】プロセッサの実行時におけるレジスタの記憶内
容を説明する説明図である。
FIG. 3 is an explanatory diagram illustrating stored contents of a register when the processor is executed.

【符号の説明】[Explanation of symbols]

1 アドレスバス 2 スタックレジスタ 3 スタックメモリ 4 マルチプレクサ 6 演算器 5 スタックポインタ 7 ステータスレジスタ 1 address bus 2 stack registers 3 stack memory 4 multiplexer 6 calculator 5 Stack pointer 7 Status register

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 プログラムモジュールの実行時にプログ
ラムモジュールを呼び出す多重呼び出しが発生したと
き、プッシュ命令を実行することによって上位レベルの
プログラムモジュールへの戻り番地をスタックメモリ及
びレジスタに書き込み、また呼び出されたプログラムモ
ジュールからの復帰が発生したとき、ポップ命令を実行
することによって前記スタックメモリ又はレジスタから
戻り番地を読み出し、上位レベルのプログラムモジュー
ルへ復帰すべくなしたプロセッサの戻り番地読み出し制
御方法において、 プッシュ命令を実行する都度、前記レジスタのステータ
スを表すステータスレジスタに所定値をセットし、また
ポップ命令を実行する都度、前記ステータスレジスタを
リセットし、上位レベルのプログラムモジュールへの復
帰に際して、前記ステータスレジスタに所定値がセット
されているか否かを判別し、セットされていると判別し
た場合、前記レジスタから戻り番地を読み出して、上位
レベルのプログラムモジュールへ復帰することを特徴と
するプロセッサの戻り番地読み出し制御方法。
1. When a multiple call for calling a program module occurs during execution of the program module, a push instruction is executed to write a return address to a higher level program module into a stack memory and a register, and the called program. When a return from the module occurs, a pop instruction is executed to read the return address from the stack memory or register, and in the return address read control method of the processor for returning to the higher-level program module, a push instruction is issued. Each time it is executed, a predetermined value is set in the status register indicating the status of the register, and each time the pop instruction is executed, the status register is reset, and a return to the higher level program module At this time, it is determined whether or not a predetermined value is set in the status register, and when it is determined that the predetermined value is set, the return address is read from the register and the upper level program module is restored. And return address read control method of the processor.
【請求項2】 プログラムモジュールの実行時にプログ
ラムモジュールを呼び出す多重呼び出しが発生したと
き、プッシュ命令を実行することによって上位レベルの
プログラムモジュールへの戻り番地をスタックメモリ及
びレジスタに書き込み、また呼び出されたプログラムモ
ジュールからの復帰が発生したとき、ポップ命令を実行
することによって前記スタックメモリ又はレジスタから
戻り番地を読み出し、上位レベルのプログラムモジュー
ルへ復帰すべくなしたプロセッサにおいて、 プッシュ命令を実行する都度、所定値をセットし、また
ポップ命令を実行する都度、リセットすべくなしたステ
ータスレジスタと、 該ステータスレジスタに所定値がセットされているか否
かを判別する手段とを備え、該手段により所定値がセッ
トされていると判別したとき、前記レジスタから戻り番
地を読み出して、上位レベルのプログラムモジュールへ
復帰すべくなしたことを特徴とするプロセッサ。
2. When a multiple call for calling a program module occurs during execution of the program module, a push instruction is executed to write a return address to a higher level program module in a stack memory and a register, and the called program. When a return from the module occurs, the return address is read from the stack memory or register by executing the pop instruction, and the processor which is designed to return to the higher-level program module returns a predetermined value each time the push instruction is executed. And a means for determining whether or not a predetermined value is set in the status register, and the predetermined value is set by the means. The When it is determined that reads return address from the register, the processor being characterized in that no order to return to the higher-level program modules.
JP25895697A 1997-09-24 1997-09-24 Return address read control method of processor and processor Expired - Fee Related JP3469753B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25895697A JP3469753B2 (en) 1997-09-24 1997-09-24 Return address read control method of processor and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25895697A JP3469753B2 (en) 1997-09-24 1997-09-24 Return address read control method of processor and processor

Publications (2)

Publication Number Publication Date
JPH1196007A JPH1196007A (en) 1999-04-09
JP3469753B2 true JP3469753B2 (en) 2003-11-25

Family

ID=17327369

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25895697A Expired - Fee Related JP3469753B2 (en) 1997-09-24 1997-09-24 Return address read control method of processor and processor

Country Status (1)

Country Link
JP (1) JP3469753B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2005020069A1 (en) * 2003-08-25 2006-10-19 有限会社 電机本舗 CPU of computer system (central processing unit)
JP2007219938A (en) * 2006-02-17 2007-08-30 Seiko Epson Corp Processor

Also Published As

Publication number Publication date
JPH1196007A (en) 1999-04-09

Similar Documents

Publication Publication Date Title
JP2790034B2 (en) Non-operational memory update method
GB2399899A (en) Active memory with three control units
JP3469753B2 (en) Return address read control method of processor and processor
JPH0969064A (en) External memory system
JP2751822B2 (en) Memory control method for FIFO memory device
JPH07219766A (en) Arithmetic processor
KR0184454B1 (en) Real time interfacing method between emulator and host
US5557772A (en) Data processing apparatus including a register storing a parameter and a microinstruction execution arrangement including a correction arrangement for causing a first value of the parameter to be change to a second, correct value
US5675776A (en) Data processor using FIFO memories for routing operations to parallel operational units
EP4193250B1 (en) Processing apparatus
JPS60262243A (en) High-speed arithmetic unit
JPH06202715A (en) State change detecting and recording circuit
JP3366235B2 (en) Data read control device
JPH0333934A (en) Register saving/recovering system
JPH0250495B2 (en)
JP2584528Y2 (en) Information processing device
JPS62108333A (en) Semiconductor device
JP2000029508A (en) Programmable controller
JP2528394B2 (en) Arithmetic control device
JP2635169B2 (en) Micro program controller
JP3005987B2 (en) Digital signal processor
JPS60193046A (en) Detecting system for instruction exception
JPH07295836A (en) Semiconductor integrated circuit device
JP2510317B2 (en) TLB access device
JPH0454531A (en) Program reading circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080905

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090905

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees