JPH0744398A - Information processor - Google Patents

Information processor

Info

Publication number
JPH0744398A
JPH0744398A JP19012793A JP19012793A JPH0744398A JP H0744398 A JPH0744398 A JP H0744398A JP 19012793 A JP19012793 A JP 19012793A JP 19012793 A JP19012793 A JP 19012793A JP H0744398 A JPH0744398 A JP H0744398A
Authority
JP
Japan
Prior art keywords
exception
handler
processing
program
function
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.)
Granted
Application number
JP19012793A
Other languages
Japanese (ja)
Other versions
JP3603314B2 (en
Inventor
Yasuyuki Kinoshita
康幸 木下
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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP19012793A priority Critical patent/JP3603314B2/en
Publication of JPH0744398A publication Critical patent/JPH0744398A/en
Application granted granted Critical
Publication of JP3603314B2 publication Critical patent/JP3603314B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To compretely prevent the processing amount of a normal processing program from being affected by the presence/absence of exception processing by previously coding both the executing state of the normal processing program and exception condition, preparing them at every exception processing handler, coupling them with each exception processing handler and adding it as information in a program code. CONSTITUTION:A CD-ROM drive 106 reads data from a medium (CD-ROM disk 111) of a mounted software package. In this case, the executing state of the normal processing program, for which it is necessary to select and execute each exception handler, and the exception condition are previously coded, prepared at every exception processing handler, coupled with each exception processing handler and added to data stored in this disk 111 as the information in the program code together with the normal processing program and the program of the plural exception processing handlers. Thus, processing overhead for exception processing addition in normal processing can be turned to zero.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例外処理機構を実現す
るプログラム言語のコンパイラやインタプリタ、及びC
PU(中央処理ユニット)を有する情報処理装置に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programming language compiler or interpreter for realizing an exception handling mechanism, and a C program.
The present invention relates to an information processing device having a PU (Central Processing Unit).

【0002】[0002]

【従来の技術】従来より、コンピュータのプログラムに
おいて例外的状況が検出された場合の処理プログラム
を、通常の処理プログラムとは別のプログラム、すなわ
ち例外ハンドラとして分離しておき、このハンドラを制
御する手段を言語やCPUが提供することで、プログラ
ムの頑強性や一般性、及び正しさを高め、複雑さを低減
させることに役立つことがよく知られている。
2. Description of the Related Art Conventionally, a processing program when an exceptional situation is detected in a computer program is separated as a program different from a normal processing program, that is, an exception handler, and means for controlling this handler. It is well known that the language and the CPU provide the program with robustness, generality, correctness, and complexity.

【0003】そのなかで、例外ハンドラを通常処理プロ
グラムの実行に伴って動的に定義し、プログラムが例外
状況に遭遇した場合に例外ハンドラが動的に選択されて
実行される制御形態がいくつかの言語のために提案さ
れ、実装も行われている。
Among them, there are some control modes in which an exception handler is dynamically defined along with the execution of a normal processing program and the exception handler is dynamically selected and executed when the program encounters an exceptional situation. Has been proposed and implemented for the language.

【0004】その例としては、ANSI X3J16 C++言語標準
化委員会では try、catch とthrowが提案され、また同
じくANSI X3J13 Common Lisp言語標準化委員会ではコン
ディションシステムが仕様として提案されている。
As an example, the ANSI X3J16 C ++ language standardization committee has proposed try, catch and throw, and the ANSI X3J13 Common Lisp language standardization committee has also proposed a condition system as a specification.

【0005】実装としては、Microsoft 社のC/C++ Vers
ion 7.0 が ANSI C++ での仕様を従来のC言語ライブラ
リにあるsetjmp/longjmp関数を使ってマクロとして実装
し、またC++ やLisp言語とは異なるが、ParcPlace Syst
ems 社のSmalltalk Release4 ではハンドラ定義メソッ
ドでブロッククロージャをコンテクストにリンクしてお
くことで同様な例外処理機構を実装している例が挙げら
れる。
As the implementation, C / C ++ Vers of Microsoft
ion 7.0 implements the ANSI C ++ specification as a macro using the setjmp / longjmp functions in the conventional C language library, and unlike the C ++ and Lisp languages, ParcPlace Syst
In Smalltalk Release 4 of ems, there is an example of implementing a similar exception handling mechanism by linking a block closure to the context with a handler definition method.

【0006】[0006]

【発明が解決しようとする課題】ところで、前述したよ
うな従来の実装方法においては次のような欠点がある。
すなわち、setjmpや例外ハンドラを定義する関数等を呼
び出して例外時に制御を移す場所を保存し、例外が検出
されて例外ハンドラを実行する時に保存された制御移行
場所を復元する方法では、通常処理において実行状態と
例外ハンドラの結合と分離の処理とを行わなければなら
ず、実行されない可能性がある例外処理の準備のために
余分な処理を通常処理が行う必要がある。この余分な処
理は、例外処理が行われる確率は通常処理に比べて非常
に低いという性質を考慮すれば通常処理に負わせるオー
バヘッドとして好ましくない。
However, the conventional mounting method as described above has the following drawbacks.
In other words, the method to call setjmp or a function that defines an exception handler to save the location where control is transferred at the time of exception, and to restore the control transfer location saved when the exception is detected and the exception handler is executed The execution state and the exception handler must be combined and separated, and the normal process needs to perform extra processing in preparation for exception processing that may not be executed. This extra process is not preferable as an overhead incurred in the normal process in consideration of the property that the probability that the exception process is performed is much lower than that in the normal process.

【0007】そこで、本発明は、上記のオーバヘッドの
問題を解決するためのものであり、例外処理プログラム
を付加するための通常処理プログラムに必要なオーバヘ
ッドをゼロにすることを可能にすること、すなわち例外
処理の有無が通常処理プログラムの処理量に全く影響を
与えない例外処理機構を有する情報処理装置を提供する
ことを目的とするものである。
Therefore, the present invention is to solve the above-mentioned problem of overhead, and makes it possible to reduce the overhead required for a normal processing program for adding an exception processing program to zero, that is, An object of the present invention is to provide an information processing apparatus having an exception handling mechanism in which the presence or absence of exception handling does not affect the throughput of a normal processing program at all.

【0008】[0008]

【発明を解決するための手段】上記目的を達成するため
に、本発明の情報処理装置は、コンピュータプログラム
を通常処理プログラムと複数の例外処理ハンドラに分離
してコード化し、上記例外処理ハンドラの定義を上記通
常処理プログラムの実行により動的に行い、例外検出時
において上記通常処理プログラムの実行状態に基づいて
上記例外処理ハンドラを動的に選択して実行する制御を
行うものであり、所定の規則に則った第1の例外処理ハ
ンドラから第2の例外処理ハンドラへの制御の移動(す
なわち、第1の例外処理ハンドラから当該第1の例外処
理ハンドラよりも一般的な第2の例外処理ハンドラへの
制御の移動)の行程と、例外処理ハンドラの実行制御状
態の消去及び当該例外処理ハンドラを定義した実行環境
の回復の行程と、例外処理ハンドラから例外起動点への
制御の復帰の行程と、例外処理ハンドラと例外起動点の
パラメータ交換の行程と、例外処理ハンドラが定義され
た実行環境での当該例外処理ハンドラの実行の行程と、
例外処理を多重化する多重例外の行程とを行う制御手段
を有してなり、例外処理ハンドラの有無が通常処理プロ
グラムの処理量に影響を与えないことを特徴とするもの
である。
In order to achieve the above object, the information processing apparatus of the present invention separates a computer program into a normal processing program and a plurality of exception handling handlers, codes them, and defines the exception handling handlers. Is performed dynamically by the execution of the normal processing program, and when the exception is detected, the exception processing handler is dynamically selected and executed based on the execution state of the normal processing program. Transfer of control from the first exception handling handler to the second exception handling handler (that is, from the first exception handling handler to the second exception handling handler more general than the first exception handling handler) Control transfer), and the process of deleting the execution control state of the exception handling handler and recovering the execution environment in which the exception handling handler is defined, The process of returning control from the external processing handler to the exception starting point, the process of exchanging parameters between the exception processing handler and the exception starting point, and the process of executing the exception processing handler in the execution environment in which the exception processing handler is defined. ,
The present invention is characterized in that it has control means for performing a process of multiple exceptions for multiplexing exception processing, and the presence or absence of an exception processing handler does not affect the processing amount of the normal processing program.

【0009】ここで、本発明の情報処理装置では、上記
例外処理ハンドラを選択するために、各例外処理ハンド
ラに選択されるべき通常処理プログラムの実行状態情報
を付加し、コード化されたプログラムに予め情報として
含めておくようにしている。また、上記例外検出時に
は、例外検出時の通常プログラムの実行状態と各例外処
理ハンドラに付加された上記通常処理プログラムの実行
状態情報とを比較することにより例外処理ハンドラを選
択し、実行制御を行うようにする。さらに、上記制御手
段は、1本のスタックで制御するようにしている。
Here, in the information processing apparatus of the present invention, in order to select the exception handling handler, execution state information of the normal processing program to be selected for each exception handling handler is added to the coded program. The information is included in advance. When the exception is detected, the exception processing handler is selected and execution control is performed by comparing the execution state of the normal program when the exception is detected with the execution state information of the normal processing program added to each exception handler. To do so. Further, the control means is controlled by one stack.

【0010】言い換えれば、本発明の情報処理装置で
は、例外処理機構を実現するために、通常処理プログラ
ム及び複数の例外処理ハンドラのプログラムと共に、各
例外ハンドラが選択されて実行する必要のある通常処理
プログラムの実行状態と例外状況を予めコード化して各
例外ハンドラ毎に用意し、各例外ハンドラと結合してプ
ログラムコード中の情報として付加しておくようにして
いる。
In other words, in the information processing apparatus of the present invention, in order to realize the exception handling mechanism, the normal handling program and the programs of the plurality of exception handling handlers as well as the normal handling that each exception handler needs to be selected and executed. The program execution state and exception status are coded in advance and prepared for each exception handler, and combined with each exception handler to be added as information in the program code.

【0011】より具体的に言うと、本発明による例外処
理機構は、処理プログラムや例外ハンドラの実行状態を
保持して実行し制御する実行制御手段と、例外状況を検
出する検出手段と、例外検出時の通常処理プログラムの
実行状態及び例外状況と例外ハンドラにコード化されて
付加された実行状態及び例外状況を比較し複数の例外ハ
ンドラの中から実行すべき例外ハンドラを検索し選択す
る検索手段により実現されるものである。
More specifically, the exception handling mechanism according to the present invention comprises an execution control means for holding and executing the execution state of a processing program or an exception handler, a detection means for detecting an exceptional situation, and an exception detection. By the search means that compares the execution status and exception status of the normal processing program at that time with the execution status and exception status coded and added to the exception handler and searches for and selects the exception handler to be executed from among multiple exception handlers. It will be realized.

【0012】すなわち、本発明による例外処理機構は、
複数準備されて動的に定義された例外処理ハンドラが通
常処理プログラムの実行状態に基づいて動的に選択され
るような動的スコープを持つ前述した例外処理形態のた
めのものであって、検出された例外状況は例外コードと
してコード化され、その例外コードに対応した例外ハン
ドラが例外検出時の通常処理プログラムの実行状態に応
じて選択され実行される形態のためのものである。
That is, the exception handling mechanism according to the present invention is
For the exception handling form described above, which has a dynamic scope in which multiple prepared and dynamically defined exception handling handlers are dynamically selected based on the execution state of the normal processing program, The exception condition is coded as an exception code, and the exception handler corresponding to the exception code is selected and executed according to the execution state of the normal processing program when the exception is detected.

【0013】なお、前記プログラムの実行状態とは、例
えば、C言語では、どの関数のどの式や文から呼び出さ
れた関数がその時点でどの式や文を実行しているかを表
し、CPUのレベルから見た場合はその時点のスタック
の内容やプログラムカウンタ(PC)の内容である。
上記の形態によりプログラムされた例外ハンドラは、通
常の処理プログラムの実行に伴って有効になったり無効
になったりする。
The execution state of the program represents, for example, in C language, which expression or statement of which function is being executed by which function or statement at that time, and the CPU level. From the viewpoint of the above, the contents of the stack and the contents of the program counter (PC) at that time are shown.
The exception handler programmed according to the above-described form becomes valid or invalid as the normal processing program is executed.

【0014】[0014]

【作用】本発明によれば、通常処理プログラム及び複数
の例外処理ハンドラのプログラムと共に、各例外処理ハ
ンドラが選択されて実行する必要のある通常処理プログ
ラムの実行状態と例外状況を予めコード化して各例外処
理ハンドラ毎に用意し、各例外処理ハンドラと結合して
プログラムコード中の情報として付加しておくようにし
ており、例外検出時に、例外検出時の通常プログラムの
実行状態と各例外処理ハンドラに付加された通常処理プ
ログラムの実行状態情報とを比較することにより例外処
理ハンドラを選択し、実行制御を行うことで、例外処理
ハンドラの有無が通常処理プログラムの処理量に影響を
与えない。
According to the present invention, along with the normal processing program and the programs of a plurality of exception processing handlers, the execution states and exception statuses of the normal processing programs that need to be selected and executed by each exception processing handler are coded in advance. It is prepared for each exception handling handler and is combined with each exception handling handler and added as information in the program code. When an exception is detected, the normal program execution state at the time of exception detection and each exception handling handler are added. By selecting the exception processing handler by comparing it with the added execution state information of the normal processing program and controlling the execution, the presence or absence of the exception processing handler does not affect the processing amount of the normal processing program.

【0015】[0015]

【実施例】以下、本発明の一実施例を図面を参照しなが
ら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0016】図1には本発明の情報処理装置の概略的な
構成を示す。
FIG. 1 shows a schematic configuration of the information processing apparatus of the present invention.

【0017】本発明実施例の情報処理装置は、コンピュ
ータプログラムを通常処理プログラムと複数の例外処理
ハンドラに分離してコード化し、上記例外処理ハンドラ
の定義を上記通常処理プログラムの実行により動的に行
い、例外検出時において上記通常処理プログラムの実行
状態に基づいて上記例外処理ハンドラを動的に選択して
実行する制御を行うものであり、図1に示す制御手段で
あるCPU100は、所定の規則に則った第1の例外処
理ハンドラから第2の例外処理ハンドラへの制御の移動
(すなわち例えば、第1の例外処理ハンドラから当該第
1の例外処理ハンドラよりも一般的な第2の例外処理ハ
ンドラへの制御の移動)の行程と、例外処理ハンドラの
実行制御状態の消去及び当該例外処理ハンドラを定義し
た実行環境の回復の行程と、例外処理ハンドラから例外
起動点への制御の復帰の行程と、例外処理ハンドラと例
外起動点のパラメータ交換の行程と、例外処理ハンドラ
が定義された実行環境での当該例外処理ハンドラの実行
の行程と、例外処理を多重化する多重例外の行程とを行
い、例外処理ハンドラの有無が通常処理プログラムの処
理量に影響を与えないことを特徴とするものである。
The information processing apparatus according to the embodiment of the present invention separates a computer program into a normal processing program and a plurality of exception processing handlers, codes them, and dynamically defines the exception processing handler by executing the normal processing program. When an exception is detected, the CPU 100, which is control means shown in FIG. 1, performs a control to dynamically select and execute the exception handler based on the execution state of the normal processing program. Transfer of control from the first exception handling handler to the second exception handling handler according to the rule (ie, for example, from the first exception handling handler to the second exception handling handler more general than the first exception handling handler) Process), deletion of the execution control state of the exception handler and restoration of the execution environment that defines the exception handler. Process, process of returning control from exception handler to exception start point, process of exchanging parameters between exception handler and exception start point, execution of the exception handler in the execution environment in which the exception handler is defined And the process of multiple exceptions for multiplexing exception processing, and the presence or absence of an exception processing handler does not affect the processing amount of the normal processing program.

【0018】先ず、図1の構成の具体的な説明に先立
ち、本実施例の情報処理装置における例外処理機構の実
現方法について説明する。本発明実施例装置における例
外処理機構は、仮想CPUのアーキテクチャにおける例
外処理用の仮想CPU命令及び例外シーケンスとして実
現しており、その詳細について説明する。なお、以下の
説明では、本発明の理解のみを目的とし、無用な複雑さ
を避けるため、通常の汎用CPUなら必ず持っていると
考えられるようなCPUの機能及び、関数呼び出し等の
実現方法などについては詳細に説明していない。
First, prior to a detailed description of the configuration of FIG. 1, a method of implementing an exception handling mechanism in the information processing apparatus of this embodiment will be described. The exception handling mechanism in the apparatus of the embodiment of the present invention is realized as a virtual CPU instruction and an exception sequence for exception handling in the architecture of the virtual CPU, and its details will be described. In the following description, for the purpose of understanding only the present invention, in order to avoid unnecessary complexity, the functions of the CPU that are considered to be necessarily possessed by an ordinary general-purpose CPU and the method of implementing function calls, etc. Is not described in detail.

【0019】図2及び図3には、仮想CPUにおけるレ
ジスタ(図1のRAM130の仮想CPUメモリ格納領
域103に対応する)を示し、プログラミングモデルを
示している。
2 and 3 show registers in the virtual CPU (corresponding to the virtual CPU memory storage area 103 of the RAM 130 in FIG. 1) and show a programming model.

【0020】この仮想CPUのワードサイズは、32ビ
ットである。図2及び図3のように、仮想CPUは、1
個のスタック7とスタックポインタ(SP)1を持ち、
実行しているプログラムの命令をポイントするプログラ
ムカウンタ(PC)2を持つ。また、この仮想CPU
は、関数定義と呼び出しをサポートし、スタック上に関
数の呼び出し状態とローカル変数の保存場所を示すため
のフレームポインタ(FP)4を持っている。また、現
在実行が行われている関数のアドレスをポイントする関
数ワードフレームポインタ(WP)3をも持つ。例外状
態フレームポインタ(ES)5と例外引数フレームポイ
ンタ(EP)6は、例外処理のためのスタックフレーム
がスタックに置かれた場合に、その例外状態と例外引数
の保存場所をそれぞれポイントする。
The word size of this virtual CPU is 32 bits. As shown in FIGS. 2 and 3, the virtual CPU is 1
Has a stack 7 and a stack pointer (SP) 1,
It has a program counter (PC) 2 that points to the instructions of the program being executed. Also, this virtual CPU
Supports function definition and call, and has a frame pointer (FP) 4 on the stack to indicate the call state of the function and the storage location of the local variable. It also has a function word frame pointer (WP) 3 that points to the address of the function currently being executed. The exception state frame pointer (ES) 5 and the exception argument frame pointer (EP) 6 respectively point to the storage location of the exception state and the exception argument when a stack frame for exception processing is placed on the stack.

【0021】次に、図4〜図6を用いて、関数のデータ
構造について説明する。図4には関数ワードフレーム8
を、図5には関数命令フレーム9(例えばN個のハンド
ラ付き実行ブロックを持つ)を、図6には例外ハンドラ
テーブル12を示している。なお図4の関数ワードフレ
ーム8のextbleフィールド19のextblは例外ハンドラ
テーブルアドレスが格納されているフィールドのワード
オフセット値[I]であり、localsは関数の引数とロー
カル変数の個数の合計、lvars は関数のローカル変数の
数である。
Next, the data structure of the function will be described with reference to FIGS. The function word frame 8 is shown in FIG.
5, a function instruction frame 9 (for example, having N execution blocks with handlers) is shown, and FIG. 6 shows an exception handler table 12. Extbl of the extble field 19 of the function word frame 8 of FIG. 4 is the word offset value [I] of the field where the exception handler table address is stored, locals is the total number of function arguments and local variables, and lvars is The number of local variables in the function.

【0022】定義された関数は、この図4〜図6で示す
ような構造でメモリに置かれ、関数が参照される場合
は、図4の関数ワードフレーム8のアドレスにより参照
される。図4の関数のワードフレーム8には関数が参照
するワード単位の定数が並んで配置され、図5の関数命
令フレーム9にはバイト単位でコード化された仮想CP
U命令による関数の命令列(instruction )が配置され
る。
The defined function is placed in the memory in the structure as shown in FIGS. 4 to 6, and when the function is referred to, it is referred to by the address of the function word frame 8 in FIG. In the word frame 8 of the function shown in FIG. 4, constants in units of words referred to by the function are arranged side by side, and in the function instruction frame 9 of FIG. 5, a virtual CP coded in byte units.
The instruction sequence (instruction) of the function by the U instruction is arranged.

【0023】実行中の関数の関数ワードフレーム8は、
常に図2のWPレジスタ(関数ワードフレームポイン
タ)3でポイントされ、実行中の命令は図2のPCレジ
スタ(プログラムカウンタ)2でポイントされている。
The function word frame 8 of the function being executed is
The WP register (function word frame pointer) 3 in FIG. 2 is always pointed to, and the instruction being executed is pointed to in the PC register (program counter) 2 in FIG.

【0024】例外処理を行う部分は、2個の命令ブロッ
クすなわち図5の実行ブロック10と例外ハンドラブロ
ック11で構成する。実行ブロックの命令は、連続した
アドレスに置く。実行ブロックの命令を実行している途
中に例外が検出された場合、対応する例外ハンドラブロ
ックが起動対象となる。例外ハンドラブロックと実行ブ
ロックとは必ず同一関数内にある。
The part that performs exception processing is composed of two instruction blocks, that is, an execution block 10 and an exception handler block 11 shown in FIG. Instructions in the execution block are placed at consecutive addresses. When an exception is detected while executing the instruction of the execution block, the corresponding exception handler block is activated. The exception handler block and execution block are always in the same function.

【0025】1個の実行ブロックには、必ず対応する1
個の例外ハンドラブロックを持つため、2個合わせて例
外ハンドラ付きブロックと呼ぶ。1つの関数は複数の例
外ハンドラ付きブロックを持つことができる。例外ハン
ドラ付きブロックを持つ関数は、必ず1個の図6に示す
例外ハンドラテーブル12を持つ。例外ハンドラテーブ
ルのエントリ13は、実行ブロックの命令が置かれてい
るアドレスの範囲14,15とそれに対応する例外ハン
ドラブロックの先頭アドレス17及び処理する例外の例
外コード(処理受付可能な例外コード)16で構成され
る。1つの関数は、複数の例外ハンドラ付きブロックを
持つ場合、このハンドラテーブルエントリ13が複数配
置される。
One execution block always corresponds to 1
Since it has one exception handler block, the two are collectively called a block with exception handler. A function can have multiple blocks with exception handlers. A function having a block with an exception handler always has one exception handler table 12 shown in FIG. The entry 13 of the exception handler table includes the address ranges 14 and 15 in which the instructions of the execution block are placed, the corresponding start address 17 of the exception handler block, and the exception code of the exception to be processed (exception code that can be processed) 16. Composed of. When one function has a plurality of blocks with exception handlers, a plurality of handler table entries 13 are arranged.

【0026】例外ハンドラテーブルのアドレスは関数ワ
ードフレーム8内の任意のオフセット[I]18にあるワ
ードにセットし、関数ワードフレーム8の0番目のワー
ドの下から16ビット目から23ビット目の8ビット
(extbl フィールド)19にテーブルアドレスをセット
したワードのオフセット値[I] をセットしておく。ま
た、例外ハンドラ付きブロックを持たない関数ではこの
extbleフィールド19にはゼロをセットする。
The address of the exception handler table is set to a word at an arbitrary offset [I] 18 in the function word frame 8, and the 16th to 23rd bits from the bottom of the 0th word of the function word frame 8 are set. The offset value [I] of the word in which the table address is set is set in the bit (extbl field) 19. Also, in a function that does not have a block with an exception handler,
The extble field 19 is set to zero.

【0027】例外ハンドラ付きブロックは、ネストする
ことも可能である。1個の関数内でネストすることもで
き、また例外ハンドラ付きブロックを実行中に他の関数
の呼び出しを行い、その呼び出された関数内で例外ハン
ドラ付きブロックを実行することでもネストされる。1
個の関数内でネストする場合も例外ハンドラテーブルに
複数のハンドラエントリを保持し、エントリの順番はネ
ストの内側のものから外側のものになるように並べる。
Blocks with exception handlers can be nested. It is possible to nest within a single function, or by executing a call to another function while executing a block with an exception handler and executing the block with an exception handler in the called function. 1
Even when nesting within one function, multiple handler entries are retained in the exception handler table, and the entries are arranged in order from the inner nest to the outer nest.

【0028】関数が呼び出された場合のスタックフレー
ム20の構造は、図7のように、各ローカル変数,Call
er WP , Caller PC , Caller FP 等からなっている。
The structure of the stack frame 20 when a function is called is as shown in FIG.
er WP, Caller PC, Caller FP, etc.

【0029】また、例外が検出され例外シーケンスが起
動された場合に作られるスタックフレーム21の構造
は、図8に示すように、例外引数フレームと、例外状態
フレームとからなり、上記例外引数フレームには例外引
数が、上記例外状態フレームには、Initiator ES, Init
iator EP, Initiator WP, Initiator PC, Initiator F
P, Catcher WP, Catcher PC, Catcher FP、予約(未使
用)、ハンドラエントリインデックス、例外コードから
なっている。
As shown in FIG. 8, the structure of the stack frame 21 created when an exception is detected and an exception sequence is activated is composed of an exception argument frame and an exception status frame. Is an exception argument.Initiator ES, Init
iator EP, Initiator WP, Initiator PC, Initiator F
It consists of P, Catcher WP, Catcher PC, Catcher FP, reserved (unused), handler entry index, and exception code.

【0030】また、仮想CPUでの例外処理のための命
令として、以下に示す4個の命令が用意されている。
Further, the following four instructions are prepared as instructions for exception processing in the virtual CPU.

【0031】1) Raise Exception 2) Continue Exception 3) Return Exception 4) Unwind Stack1) Raise Exception 2) Continue Exception 3) Return Exception 4) Unwind Stack

【0032】例外シーケンスは Raise Exception命令に
より起動されるか、あるいは、通常の命令実行時に仮想
CPUがCPU内部で例外検出を行って起動する場合も
あるが、両者とも例外処理のための部分の動作は同じで
あるため、ここでは、RaiseException での起動を例に
して説明する。
The exception sequence may be activated by the Raise Exception instruction, or may be activated by the virtual CPU detecting the exception inside the CPU during normal instruction execution. In both cases, the operation of the exception processing part is performed. Since they are the same, the startup with RaiseException is explained here as an example.

【0033】以上に示す4個の命令のなかで、1)を除く
2), 3), 4)の命令は例外ハンドラ内だけで実行できる命
令であり、1)は通常処理プログラムと例外ハンドラのど
ちらにおいてでも実行できる命令である。
Of the four instructions shown above, 1) is excluded
Instructions 2), 3), and 4) are instructions that can be executed only within the exception handler, and 1) are instructions that can be executed by both the normal processing program and the exception handler.

【0034】図9と図14は例外シーケンスでのいくつ
かの時点でのスタックスナップショットの例を示すもの
である。なお、図9については、図を見やすくするため
にこの図9を図中一点鎖線で4分割し、それぞれを拡大
して図10〜図13に示す。また、図14についても同
様に、図を見やすくするためにこの図14を図中一点鎖
線で4分割し、それぞれを拡大して図15〜図18に示
す。
9 and 14 show examples of stack snapshots at some points in the exception sequence. In addition, regarding FIG. 9, in order to make the figure easy to see, this FIG. 9 is divided into four by dashed lines in the figure, and each is enlarged and shown in FIGS. In addition, similarly, in FIG. 14 as well, in order to make the drawing easy to see, FIG. 14 is divided into four by dashed lines in the drawing, and each is enlarged and shown in FIGS.

【0035】以下、この図9と図14のスタックスナッ
プショットの例と、図19〜図24のフローチャートを
参照して各例外処理命令と例外シーケンスの詳細な動作
について説明する。
The detailed operation of each exception handling instruction and exception sequence will be described below with reference to the stack snapshot examples of FIGS. 9 and 14 and the flowcharts of FIGS.

【0036】図19に例外の起動を行うプログラムのシ
ーケンスフローを示す。先ず、ステップS17で例外ハ
ンドラへのパラメータとなる例外引数をスタックにプッ
シュし、ステップS18で例外の種類と理由を識別する
ための例外コードをスタックにプッシュする。そして、
ステップS19でRaise Exception 命令を実行する。こ
の時点でのスタックの状態とレジスタのポイント位置を
図9と図14の図中P1に示す。
FIG. 19 shows a sequence flow of a program for starting an exception. First, in step S17, an exception argument that is a parameter to the exception handler is pushed onto the stack, and in step S18, an exception code for identifying the type and reason of the exception is pushed onto the stack. And
In step S19, the Raise Exception instruction is executed. The state of the stack and the point position of the register at this point are shown by P1 in FIGS. 9 and 14.

【0037】図20は、Raise Exception 命令が実行さ
れた時の仮想CPUの動作のフローチャートを示してい
る。この図20において、Raise Exception 命令が実行
開始されると、先ずステップS1において仮想CPU
は、例外スタックフレームをスタックにプッシュし、E
Sレジスタ(例外状態フレームポインタ5)は例外状態
フレームをポイントするように設定され、EPレジスタ
(例外引数フレームポインタ6)は例外引数フレームを
ポイントするように設定される。この段階ではフレーム
内のInitiatorES,Initiator EP,Initiator FP, Initi
ator PC, Initiator WPのフィールドにはRaise Excepti
on が実行された時点でのレジスタの内容がセーブされ
て設定が行われるが、ハンドラエントリインデックスと
Catcher FP, Catcher PC, Catcher WPには内容が設定さ
れず、フレーム内にその領域だけが確保されている状態
である。また、この時点でのWP,PC,FPレジスタ
(関数ワードフレームポインタ3,プログラムカウンタ
2,フレームポインタ4)はRaise Exception 命令を実
行した時点での関数の実行状態を示している。
FIG. 20 shows a flowchart of the operation of the virtual CPU when the Raise Exception instruction is executed. In FIG. 20, when the execution of the Raise Exception instruction is started, first, in step S1, the virtual CPU
Pushes the exception stack frame onto the stack and returns E
The S register (exception state frame pointer 5) is set to point to the exception state frame and the EP register (exception argument frame pointer 6) is set to point to the exception argument frame. At this stage, Initiator ES, Initiator EP, Initiator FP, Initiator in the frame
Raise Excepti in the field of ator PC, Initiator WP
The contents of the register at the time of execution of on are saved and the settings are made.
The contents are not set in Catcher FP, Catcher PC, and Catcher WP, and only that area is secured in the frame. Further, the WP, PC, and FP registers (function word frame pointer 3, program counter 2, frame pointer 4) at this time point show the execution state of the function at the time point when the Raise Exception instruction is executed.

【0038】その後、仮想CPUはステップS2に進
む。このステップS2のステップS2Aにおいて、WP
(関数ワードフレームポインタ3)でポイントされてい
る関数が例外ハンドラテーブルを持っている場合(Ye
s)は、ステップS2Bに進む。このステップS2Bに
おいては、PCレジスタ(プログラムカウンタ2)の内
容が実行ブロックのアドレス範囲内にあって、かつ例外
コードを処理受付可能な例外コードして持っているか、
あるいはゼロの処理受付可能な例外コードを持つ例外ハ
ンドラのエントリがその例外ハンドラテーブルの先頭か
ら順番にサーチされる。その後、ステップS2Cに進
む。
After that, the virtual CPU proceeds to step S2. In step S2A of this step S2, WP
When the function pointed by (function word frame pointer 3) has an exception handler table (Ye
In step s), the process proceeds to step S2B. In this step S2B, whether the contents of the PC register (program counter 2) are within the address range of the execution block, and the exception code is an exception code that can be processed,
Alternatively, the entry of an exception handler having an exception code that can accept the processing of zero is searched in order from the top of the exception handler table. Then, it progresses to step S2C.

【0039】また、ステップS2Aにおいて、WP(関
数ワードフレームポインタ3)でポイントされている関
数が例外ハンドラテーブルを持たない(Noの場合)
か、或いはステップS2Bの次のステップS2Cにおい
てテーブル内をサーチしてもエントリが見つからなかっ
た場合(No)は、ステップS3にすすむ。仮想CPU
はこのステップS3において、現在実行中の関数を呼び
出した関数が関数からリターンするためにスタックに保
存している仮想CPUの実行状態を関数スタックフレー
ムからFPレジスタ(フレームポインタ4)をベースに
してアクセスし、WP,PC,FPレジスタ(関数ワー
ドフレームポインタ3,プログラムカウンタ2,フレー
ムポインタ4)に回復した後、ステップS2に戻ってハ
ンドラのサーチが繰り返される。関数の呼び出しチェイ
ンをたどってサーチを繰り返した結果、呼び出し元がな
くなった場合の動作についてはフローに示されていない
が、その場合の仮想CPUは致命的エラー状態となる。
In step S2A, the function pointed by WP (function word frame pointer 3) does not have an exception handler table (No).
Alternatively, if no entry is found even after searching the table in step S2C after step S2B (No), the process proceeds to step S3. Virtual CPU
In this step S3, the execution state of the virtual CPU stored in the stack for the function that called the currently executing function to return from the function is accessed from the function stack frame based on the FP register (frame pointer 4). Then, after the WP, PC, and FP registers (function word frame pointer 3, program counter 2, frame pointer 4) are restored, the process returns to step S2 to repeat the handler search. Although the flow does not show the operation when there is no caller as a result of repeating the search by tracing the call chain of the function, the virtual CPU in that case is in a fatal error state.

【0040】また、上記ステップS2Cにおいて、例外
ハンドラテーブルをサーチして条件を満たすハンドラエ
ントリが見つかった場合(Yes)は、ステップS4に
進む。仮想CPUは、このステップS4において、その
ハンドラを持つ関数が実行されていた時点のWP,P
C,FPレジスタ(関数ワードフレームポインタ3,プ
ログラムカウンタ2,フレームポインタ4)を、例外状
態フレームのCatcher WP,Catcher PC,Catcher FPの各フ
ィールドにセーブし、見つかったエントリのテーブル上
でのインデックスを同様に例外状態フレームのハンドラ
エントリインデックスに設定する。
If a handler entry satisfying the conditions is found by searching the exception handler table in step S2C (Yes), the process proceeds to step S4. The virtual CPU determines WP, P at the time when the function having the handler is executed in step S4.
Save the C and FP registers (function word frame pointer 3, program counter 2 and frame pointer 4) in the fields of Catcher WP, Catcher PC and Catcher FP of the exception status frame and set the index of the found entry on the table. Similarly, it is set to the handler entry index of the exception status frame.

【0041】その後、ステップS5に進み、このステッ
プS5において、ハンドラエントリのハンドラブロック
先頭アドレスを参照してそれをPCレジスタ(プログラ
ムカウンタ2)に設定し、Raise Exception 命令の実行
は終了する。この時点でのスタックの状態とレジスタの
ポイント位置を図9と図14の図中P2に示す。その後
は、PC(プログラムカウンタ2)でポイントされたハ
ンドラブロックの先頭の仮想CPU命令から逐次実行が
開始される。
Then, in step S5, the handler block start address of the handler entry is referenced and set in the PC register (program counter 2) in step S5, and the execution of the Raise Exception instruction ends. The state of the stack and the point position of the register at this point are shown by P2 in FIGS. 9 and 14. After that, sequential execution is started from the virtual CPU instruction at the head of the handler block pointed to by the PC (program counter 2).

【0042】なお、図20のフローチャート中の *XX
は、XXでポイントされているメモリの内容を表し、X
X.YYはメモリXXのYYというフィールドの内容を
表している。
Note that * XX in the flowchart of FIG.
Represents the contents of the memory pointed to by XX, X
X. YY represents the contents of the field YY of the memory XX.

【0043】図21には、例外ハンドラブロックでの処
理シーケンスフローを示している。この図21におい
て、ステップS21は例外ハンドラでの処理の本体で、
ここでは例外ハンドラのブロックがある関数と同じコン
テクストで実行されるので、その関数の引数とローカル
変数は例外起動時の内容を保持したままでアクセスで
き、その他EP, ESレジスタ(例外引数フレームポイ
ンタ6,例外状態フレームポインタ5)をベースにした
例外引数と例外状態フレームの参照も可能である。その
後、例外ハンドラブロックでの処理を終了するには、フ
ローチャートでは図示していないが例外ハンドラでの処
理結果や例外の種類による条件を判断をしたうえで、3
つの選択が可能である。
FIG. 21 shows a processing sequence flow in the exception handler block. In FIG. 21, step S21 is the main body of processing in the exception handler.
Here, the exception handler block is executed in the same context as the function, so the arguments and local variables of that function can be accessed while retaining the contents at the time of exception activation, and other EP and ES registers (exception argument frame pointer 6 It is also possible to refer to the exception argument and exception state frame based on the exception state frame pointer 5). After that, to finish the processing in the exception handler block, although not shown in the flowchart, after judging the processing result in the exception handler and the condition depending on the type of exception, 3
Two choices are possible.

【0044】この例外ハンドリングシーケンスにおい
て、ステップS22を選択した場合は、Continue Excep
tion命令を実行する。
If step S22 is selected in this exception handling sequence, Continue Excep
Execute the instruction command.

【0045】上記Continue Exception命令が実行された
場合の仮想CPUの動作フローチャートを図22に示
す。この図22のフローチャートにおいて、Continue E
xception命令が実行開始されると、先ず、ステップS6
において仮想CPUは、ESレジスタ(例外状態フレー
ムポインタ5)でポイントされている例外状態フレーム
より、Catcher FP,Catcher PC, Catcher WPフィールド
の内容をそれぞれFP,PC,WPレジスタ(関数ワー
ドフレームポインタ3,プログラムカウンタ2,フレー
ムポインタ4)に回復し、ハンドラエントリインデック
スフィールドから、ハンドラテーブルのサーチ続行のた
めのテーブルインデックスを取り出す。
FIG. 22 shows an operational flowchart of the virtual CPU when the Continue Exception instruction is executed. In the flowchart of FIG. 22, Continue E
When the xception command starts to be executed, first, step S6
In the virtual CPU, the virtual CPU sets the contents of the Catcher FP, Catcher PC, and Catcher WP fields from the exception state frame pointed to by the ES register (exception state frame pointer 5) to the FP, PC, and WP registers (function word frame pointer 3, The program index is returned to the program counter 2 and the frame pointer 4), and the table index for continuing the search of the handler table is extracted from the handler entry index field.

【0046】その後、上記仮想CPUはステップS7内
のステップS7Aにおいて、RaiseException 命令での
ハンドラ検索条件ステップS2Bと同じ条件に合致する
ハンドラエントリをWP(回数ワードフレームポインタ
3)でポイントされている関数の例外ハンドラテーブル
のテーブルインデックスで示される位置からからサーチ
する。
After that, in step S7A in step S7, the virtual CPU of the function pointed to by WP (number of times word frame pointer 3) of the handler entry that matches the same condition as the handler search condition step S2B in the RaiseException instruction. Search from the position indicated by the table index of the exception handler table.

【0047】次のステップS7Bにおいてサーチして見
つからなかった場合(No)は、ステップS8に進む。
このステップS8において、ハンドラテーブルサーチの
ためのテーブルインデックスはゼロに設定し、次回のサ
ーチに備える。
In the next step S7B, if the search is not found (No), the process proceeds to step S8.
In this step S8, the table index for the handler table search is set to zero to prepare for the next search.

【0048】その後、ステップS9に進む。このステッ
プS9のステップS9Aにおいては、現在実行中の関数
を呼び出した関数が関数からリターンするためにスタッ
クに保存している仮想CPUの実行状態をFPレジスタ
(フレームポインタ)をベースにして関数スタックフレ
ームからアクセスし、WP,PC,FPレジスタ(関数
ワードフレームポインタ3,プログラムカウンタ2,フ
レームポインタ4)に回復し、次のステップS9Bでは
WP(関数ワードフレームポインタ3)でポイントされ
ている関数が例外ハンドラテーブルを持つ関数であるま
で関数呼び出しチェイン上でのサーチが行われる。この
ステップS9Bで、例外ハンドラテーブルが見つかった
場合(Yes)は、ステップS7に戻ってハンドラエン
トリのサーチが繰り返される。
Then, the process proceeds to step S9. In step S9A of this step S9, the execution state of the virtual CPU stored in the stack in order for the function calling the currently executing function to return from the function is based on the FP register (frame pointer) as a function stack frame. Access to the WP, PC, FP registers (function word frame pointer 3, program counter 2, frame pointer 4), and in the next step S9B, the function pointed to by WP (function word frame pointer 3) is an exception. The search is performed on the function call chain until the function has the handler table. If the exception handler table is found in this step S9B (Yes), the process returns to step S7 and the search for the handler entry is repeated.

【0049】また、ステップS7において例外ハンドラ
テーブルをサーチして条件を満たすハンドラエントリが
見つかった場合(ステップS7BでYesとなる場
合)、仮想CPUはステップS10に進む。このステッ
プS10においては、そのハンドラを持つ関数が実行さ
れていた時点のWP,PC,FPレジスタ(関数ワード
フレームポインタ3,プログラムカウンタ2,フレーム
ポインタ4)を例外状態フレームのCatcher WP, Catche
r PC, Catcher FPの各フィールドにセーブし、見つかっ
たエントリのテーブル上でのインデックスを同様に例外
状態フレームのハンドラエントリインデックスに設定す
る。
If a handler entry satisfying the conditions is found by searching the exception handler table in step S7 (Yes in step S7B), the virtual CPU proceeds to step S10. In this step S10, the WP, PC, and FP registers (function word frame pointer 3, program counter 2, frame pointer 4) at the time when the function having the handler is being executed are set in the exception state frame Catcher WP, Catche.
r Save in each field of PC and Catcher FP, and set the index of the found entry in the table to the handler entry index of the exception status frame in the same way.

【0050】その後、ステップSS11において、ハン
ドラエントリのハンドラブロック先頭アドレスを参照し
てそれをPCレジスタ(プログラムカウンタ2)に設定
し、Continue Exception命令の実行は終了する。この時
点でのスタックの状態とレジスタのポイント位置を図9
と図14の図中P3に示す。その後は、PC8プログラ
ムカウンタ2)でポイントされた例外ハンドラブロック
の先頭の仮想CPU命令から新たな例外ハンドラシーケ
ンスとして逐次実行が開始される。
Thereafter, in step SS11, the handler block start address of the handler entry is referred to and set in the PC register (program counter 2), and the execution of the Continue Exception instruction is completed. Figure 9 shows the stack status and register point positions at this point.
And P3 in FIG. After that, sequential execution is started as a new exception handler sequence from the virtual CPU instruction at the head of the exception handler block pointed to by the PC8 program counter 2).

【0051】また、図21の例外ハンドリングシーケン
スにおいてステップS23を選択した場合、Unwind Sta
ck命令を実行する。
If Step S23 is selected in the exception handling sequence of FIG. 21, Unwind Sta
Execute ck instruction.

【0052】Unwind Stack命令が実行された場合の仮想
CPUの動作フローチャートを図23に示す。
FIG. 23 shows an operational flowchart of the virtual CPU when the Unwind Stack instruction is executed.

【0053】このフローチャートにおいて、Unwind Sta
ck命令が実行開始されると、ステップS12のステップ
S12AにおいてESとEPレジスタ(例外状態フレー
ムポインタ5と例外引数フレームポインタ6)をESレ
ジスタでポイントされている例外状態フレームのInitia
tor ES, Initiator EPフィールドから回復し、次のステ
ップS12Bで現在実行中の関数の実行の途中で生成さ
れた例外フレームをスタックからすべて取り除かれたか
否かの判断を行い、取り除かれていないときはすべてス
タックより取り除く。
In this flowchart, Unwind Sta
When the ck instruction starts to be executed, in step S12A of step S12, the ES and EP registers (exception state frame pointer 5 and exception argument frame pointer 6) are set to the Initia of the exception state frame pointed to by the ES register.
It recovers from the tor ES, Initiator EP field, and in the next step S12B, it judges whether or not all the exception frames generated during the execution of the function currently being executed have been removed from the stack, and if they have not been removed, Remove all from stack.

【0054】その後、ステップS13において、現在実
行中の関数の局所的なスタックの状態を空にする。すな
わちここでは、スタックはこの関数が最初に呼び出され
た状態と同じに戻り、Unwind Stack命令の実行は終了す
る。この時点でのスタックの状態とレジスタのポイント
位置を図9の図中P4に示す。
Then, in step S13, the local stack state of the function currently being executed is emptied. That is, here, the stack returns to the state in which this function was originally called, and the execution of the Unwind Stack instruction ends. The state of the stack and the point position of the register at this point are shown by P4 in the drawing of FIG.

【0055】その後は、図21において示した例外ハン
ドラブロックの処理シーケンスに戻り、Unwind Stack命
令の次の仮想CPU命令から逐次実行が行われるが、ス
テップS24のように関数内のどこかの通常処理プログ
ラムにブランチを行うのが一般的である。このように、
例外ハンドリングシーケンスにおいてステップS23が
選択された場合、図19の例外起動シーケンスのステッ
プS20へ戻るための情報をすべて消滅させるので、決
して例外起動シーケンスが回復されて終了することはな
い。
After that, returning to the processing sequence of the exception handler block shown in FIG. 21, the virtual CPU instruction next to the Unwind Stack instruction is sequentially executed. However, as in step S24, the normal processing is performed somewhere in the function. It is common to branch into a program. in this way,
When step S23 is selected in the exception handling sequence, all the information for returning to step S20 of the exception starting sequence in FIG. 19 is erased, so the exception starting sequence is never recovered and ended.

【0056】上述のUnwind Stack命令の機構例では、ス
タック内容をポップして削除するだけであったが、関数
スタックフレームをポップすることで制御の継続が消滅
してしまうと問題を生じる関数の後処理を行わせるた
め、Unwind Stackの実行時に起動されるUnwindプロテク
ションハンドラをその関数内に定義させておき、それを
Unwind Stack命令実行時に起動させることが、Raise Ex
ception命令でのハンドラのサーチと同様な機構をUnwin
d Stack命令においても同様に適用して付加することが
可能である。
In the mechanism example of the Unwind Stack instruction described above, only the stack contents are popped and deleted, but after the function continuation of control disappears by popping the function stack frame, a problem occurs after the function. In order to perform processing, the Unwind protection handler that is started when the Unwind Stack is executed is defined in that function, and it is
Raise Ex can be started when the Unwind Stack instruction is executed.
Unwin the same mechanism as the handler search in the ception command
It can be applied and added in the same way to the d Stack instruction.

【0057】図21の例外ハンドリングシーケンスにお
いてステップS25を選択した場合、ハンドラのリター
ン値をスタックにプッシュし、ステップS26において
Return Exception命令を実行する。
When step S25 is selected in the exception handling sequence of FIG. 21, the return value of the handler is pushed onto the stack, and in step S26.
Execute the Return Exception instruction.

【0058】Return Exception命令が実行された場合の
仮想CPUの動作フローチャートを図24に示す。ま
た、Return Exception命令の実行直前でのスタックの状
態とレジスタのポイント位置を図14のP5に示す。
FIG. 24 shows an operation flowchart of the virtual CPU when the Return Exception instruction is executed. The state of the stack and the point position of the register immediately before the execution of the Return Exception instruction are shown in P5 of FIG.

【0059】図24のフローチャートにおいて、Return
Exception命令が実行されると、仮想CPUはステップ
S14において、スタックのトップにある例外ハンドラ
のリターン値を取っておく。そして、ステップS15に
おいてES(例外状態フレームポインタ5)でポイント
されている例外状態フレームのInitiator WP, Initiato
r PC, Initiator FP, Initiator EP, Initiator ESフィ
ールドの内容をそれぞれWP,PC,FP,EP,ES
レジスタ(関数ワードフレームポインタ3,プログラム
カウンタ2,フレームポインタ4,例外引数フレームポ
インタ6,例外状態フレームポインタ5)に回復し、例
外状態フレームと例外引数フレームをスタックからポッ
プして取り除く。
In the flowchart of FIG. 24, Return
When the Exception instruction is executed, the virtual CPU saves the return value of the exception handler at the top of the stack in step S14. Then, in step S15, Initiator WP, Initiato of the exceptional state frame pointed to by ES (exceptional state frame pointer 5)
r PC, Initiator FP, Initiator EP, Initiator ES field contents WP, PC, FP, EP, ES respectively
The registers (function word frame pointer 3, program counter 2, frame pointer 4, exception argument frame pointer 6, exception state frame pointer 5) are restored, and the exception state frame and the exception argument frame are popped and removed from the stack.

【0060】次のステップS16において、ステップS
14で取っておいた例外ハンドラのリターン値をスタッ
クのトップに置き、Return Exception命令の実行は終了
する。この時点でのスタックの状態とレジスタのポイン
ト位置を図14の図中P6に示す。その後は、例外ハン
ドラを起動したRaise Exception命令を実行した関数の
実行状態での例外起動シーケンスに戻るので図19のス
テップS20において、Raise Exception命令の次の仮
想CPU命令からの逐次実行が再開され、例外ハンドラ
のリターン値をポップして受け取り、例外起動シーケン
スが終了する。
In the next step S16, step S
The return value of the exception handler saved in 14 is placed on the top of the stack, and the execution of the Return Exception instruction ends. The state of the stack and the point position of the register at this point are indicated by P6 in FIG. After that, since the process returns to the exception activation sequence in the execution state of the function that executed the Raise Exception instruction that started the exception handler, the sequential execution from the virtual CPU instruction next to the Raise Exception instruction is resumed in step S20 of FIG. The exception handler return value is popped and received, and the exception startup sequence ends.

【0061】上述した本実施例で多重例外が発生した場
合も、例外処理状態はスタックフレームとしてスタック
されるので、例外起動点に復帰も矛盾なく可能であり、
また、Unwind Stack命令では多重の例外スタックフレー
ムをまとめて消去することも可能となっている。
Even when multiple exceptions occur in the above-described embodiment, the exception processing state is stacked as a stack frame, so that it is possible to return to the exception starting point without contradiction.
The Unwind Stack instruction can also erase multiple exception stack frames at once.

【0062】図1に戻って、本実施例装置のCD−RO
Mドライブ106は、装荷されたソフトウェアパッケー
ジのメディア(上記CD−ROMディスク111)から
データを読み出す。ここで、このディスク111に記録
されているデータには、前述した通常処理プログラム及
び複数の例外処理ハンドラのプログラムと共に、各例外
ハンドラが選択されて実行する必要のある通常処理プロ
グラムの実行状態と例外状況を予めコード化して各例外
処理ハンドラ毎に用意し、各例外処理ハンドラと結合し
てプログラムコード中の情報として付加しておくように
している。上記通常処理プログラム及び例外処理ハンド
ラのプログラムと、当該例外処理ハンドラに付加された
情報が、仮想CPU命令(仮想CPUプログラム)とし
て、例えばディスク111の最内周の上記仮想CPUプ
ログラム領域112に記録されている。当該仮想CPU
プログラムが、RAM130の仮想CPUメモリ格納領
域103に格納される。
Returning to FIG. 1, the CD-RO of the apparatus of this embodiment.
The M drive 106 reads data from the loaded software package medium (the CD-ROM disc 111). Here, in the data recorded on the disk 111, the normal processing program and the programs of the plurality of exception processing handlers are included in the data, and the execution states and exceptions of the normal processing programs which are required to be executed by each exception handler are selected. The situation is coded in advance and prepared for each exception handling handler, combined with each exception handling handler and added as information in the program code. The normal processing program and the exception processing handler program, and the information added to the exception processing handler are recorded as virtual CPU instructions (virtual CPU programs), for example, in the virtual CPU program area 112 at the innermost circumference of the disk 111. ing. The virtual CPU
The program is stored in the virtual CPU memory storage area 103 of the RAM 130.

【0063】また、本実施例装置のCPU100は、バ
ス108に接続された各装置(例えばキーボード等のキ
ー入力装置7、CD−ROMドライブ106、後述する
MPEGデコーダ105、CRTディスプレイコントロ
ーラ109等)の制御や、各種データの送受を中心的に
行う。このCPU100は、仮想CPUインタプリタプ
ログラム格納領域102に格納されている仮想CPUイ
ンタプリタプログラムに基づいて、上記バス108に接
続された上記RAM130の仮想CPUメモリ格納領域
103に格納された上記仮想CPUプログラムを解釈し
て実行することで前述したように例外処理機構を実現す
る。
Further, the CPU 100 of the apparatus of this embodiment is connected to the bus 108 such as a key input device 7 such as a keyboard, a CD-ROM drive 106, an MPEG decoder 105 described later, a CRT display controller 109, etc. It mainly controls and sends and receives various data. The CPU 100 interprets the virtual CPU program stored in the virtual CPU memory storage area 103 of the RAM 130 connected to the bus 108 based on the virtual CPU interpreter program stored in the virtual CPU interpreter program storage area 102. By executing it, the exception handling mechanism is realized as described above.

【0064】また、仮想CPUプログラムは、上記バス
108に接続された各装置の制御を高レベルで行い、C
D−ROM製作者の意図した制御が最終的に行われる。
Further, the virtual CPU program controls each device connected to the bus 108 at a high level, and C
The control intended by the D-ROM manufacturer is finally performed.

【0065】なお、本実施例装置は、いわゆるMPEG
(Moving Picture Expert Group)デコーダ105をも有
しており、上記CD−ROMディスク111上に記録さ
れた圧縮画像データを当該MPEGデコーダ105によ
ってデコードし、この画像データが画像バッファメモリ
104を介してCRTディスプレイコントローラ109
により制御されるCRTディスプレイ110に表示され
るようになっている。また、上記ディスプレイ110
は、CRT(陰極線管)のみならず、他の表示装置(例
えば液晶表示装置)を用いることも可能である。この場
合、コントローラ109はその表示装置に応じた制御を
行う。
The apparatus of this embodiment is a so-called MPEG.
It also has a (Moving Picture Expert Group) decoder 105, and the compressed image data recorded on the CD-ROM disk 111 is decoded by the MPEG decoder 105, and this image data is transferred to the CRT via the image buffer memory 104. Display controller 109
It is displayed on the CRT display 110 controlled by. In addition, the display 110
It is possible to use not only a CRT (cathode ray tube) but also another display device (for example, a liquid crystal display device). In this case, the controller 109 performs control according to the display device.

【0066】以上説明してきた本発明の実施例では、例
外ハンドラが有効な処理プログラムのアドレス範囲とそ
れに対応する例外ハンドラのアドレスをテーブルにして
予め用意しておく。そして、例外が起動された時点にな
って初めてこのテーブルとスタックフレームのサーチが
行われる。従って、通常処理プログラムのCPU命令内
容は例外ハンドラの有無には全く無関係であり、例外ハ
ンドラの定義を有効にしたり無効にしたりする処理は、
通常処理プログラムでは行う必要がない。また、本実施
例で説明したような柔軟で多様な制御形態を持つ例外処
理機構を提供するような言語やCPUにおいて、通常処
理での例外処理付加のための処理オーバヘッドをゼロと
させることが本発明によって実現可能となる。
In the embodiment of the present invention described above, the address range of the processing program in which the exception handler is valid and the address of the exception handler corresponding to the range are prepared in advance as a table. Only when the exception is activated, the table and stack frame are searched. Therefore, the CPU instruction content of the normal processing program has nothing to do with the presence or absence of an exception handler, and the processing for validating or invalidating the definition of the exception handler is
It does not need to be performed by a normal processing program. Further, in a language or a CPU that provides an exception handling mechanism having flexible and various control forms as described in this embodiment, it is possible to reduce the processing overhead for adding exception handling in normal processing to zero. It can be realized by the invention.

【0067】さらに、以上の実施例は関数定義とその呼
び出し機構を持つような言語及びCPUでの一実施例に
すぎないが、言語やCPUによって必要とされる実行状
態やその概念が異なるものであっても、実行状態の概念
を持つ言語やCPUであれば、同様な例外処理機構を実
現するために本発明を適用することはいくらでも可能で
ある。
Further, the above embodiment is only one embodiment of a language and a CPU having a function definition and its calling mechanism, but the execution states and concepts required by the language and the CPU are different. However, if the language or CPU has the concept of the execution state, the present invention can be applied to realize the same exception handling mechanism.

【0068】[0068]

【発明の効果】本発明の情報処理装置においては、通常
処理プログラム及び複数の例外処理ハンドラのプログラ
ムと共に、各例外処理ハンドラが選択されて実行する必
要のある通常処理プログラムの実行状態と例外状況を予
めコード化して各例外処理ハンドラ毎に用意し、各例外
処理ハンドラと結合してプログラムコード中の情報とし
て付加しておくようにしているため、例外処理プログラ
ムを付加するための通常処理プログラムに必要なオーバ
ヘッドをゼロにすることが可能となっている。すなわち
例外処理の有無が通常処理プログラムの処理量に全く影
響を与えない例外処理機構が実現可能となっている。
According to the information processing apparatus of the present invention, the normal processing program and the programs of a plurality of exception processing handlers as well as the execution state and the exception status of the normal processing program which each exception handler needs to be selected and executed. Necessary for a normal processing program for adding an exception processing program, because it is coded in advance and prepared for each exception processing handler, and combined with each exception processing handler and added as information in the program code. It is possible to reduce the overhead to zero. That is, it is possible to realize an exception processing mechanism in which the presence or absence of exception processing does not affect the processing amount of the normal processing program at all.

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

【図1】本発明実施例の情報処理装置の概略構成を示す
ブロック回路図である。
FIG. 1 is a block circuit diagram showing a schematic configuration of an information processing apparatus according to an embodiment of the present invention.

【図2】仮想CPUが持っているレジスタについて説明
するための図である。
FIG. 2 is a diagram illustrating a register included in a virtual CPU.

【図3】仮想CPUのスタックについて説明するための
図である。
FIG. 3 is a diagram illustrating a stack of virtual CPUs.

【図4】関数ワードフレームの構造を示す図である。FIG. 4 is a diagram showing a structure of a function word frame.

【図5】関数命令フレームの構造を示す図である。FIG. 5 is a diagram showing a structure of a function instruction frame.

【図6】例外ハンドラテーブルの構造を示す図である。FIG. 6 is a diagram showing a structure of an exception handler table.

【図7】関数が呼び出された場合のスタックフレームの
構造を示す図である。
FIG. 7 is a diagram showing a structure of a stack frame when a function is called.

【図8】例外が検出され例外シーケンスが起動された場
合に作られるスタックフレームの構造を示す図である。
FIG. 8 is a diagram showing a structure of a stack frame created when an exception is detected and an exception sequence is activated.

【図9】例外シーケンスでのスタックスナップショット
の一例を示す図である。
FIG. 9 is a diagram showing an example of a stack snapshot in an exception sequence.

【図10】図9を4分割した場合の左上の部分を拡大し
て示す図である。
FIG. 10 is an enlarged view showing an upper left portion when FIG. 9 is divided into four.

【図11】図9を4分割した場合の左下の部分を拡大し
て示す図である。
FIG. 11 is an enlarged view showing a lower left portion in the case where FIG. 9 is divided into four.

【図12】図9を4分割した場合の右上の部分を拡大し
て示す図である。
FIG. 12 is an enlarged view showing an upper right portion when FIG. 9 is divided into four.

【図13】図9を4分割した場合の右下の部分を拡大し
て示す図である。
FIG. 13 is an enlarged view showing a lower right portion when FIG. 9 is divided into four.

【図14】例外シーケンスでのスタックスナップショッ
トの他の例を示す図である。
FIG. 14 is a diagram showing another example of the stack snapshot in the exception sequence.

【図15】図14を4分割した場合の左上の部分を拡大
して示す図である。
FIG. 15 is an enlarged view showing an upper left portion in the case where FIG. 14 is divided into four.

【図16】図14を4分割した場合の左下の部分を拡大
して示す図である。
FIG. 16 is an enlarged view showing a lower left portion of FIG. 14 divided into four parts.

【図17】図14を4分割した場合の右上の部分を拡大
して示す図である。
FIG. 17 is an enlarged view showing an upper right part in the case where FIG. 14 is divided into four.

【図18】図14を4分割した場合の右下の部分を拡大
して示す図である。
FIG. 18 is an enlarged view showing a lower right portion when FIG. 14 is divided into four.

【図19】例外の起動を行うプログラムのシーケンスを
示すフローチャートである。
FIG. 19 is a flowchart showing the sequence of a program for starting an exception.

【図20】Raise Exception 命令が実行された時の仮想
CPUの動作を示すフローチャートである。
FIG. 20 is a flowchart showing the operation of the virtual CPU when a Raise Exception instruction is executed.

【図21】例外ハンドラブロック出の処理シーケンスを
示すフローチャートである。
FIG. 21 is a flowchart showing a processing sequence for outputting an exception handler block.

【図22】Continue Exception命令が実行された場合の
仮想CPUの動作を示すフローチャートである。
FIG. 22 is a flowchart showing the operation of the virtual CPU when a Continue Exception instruction is executed.

【図23】Unwind Stack命令が実行された場合の仮想C
PUの動作を示すフローチャートである。
FIG. 23: Virtual C when the Unwind Stack instruction is executed
It is a flowchart which shows operation | movement of PU.

【図24】Return Exception命令が実行された場合の仮
想CPUの動作を示すフローチャートである。
FIG. 24 is a flowchart showing the operation of the virtual CPU when a Return Exception instruction is executed.

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

1・・・・・・・・・・スタックポインタ 2・・・・・・・・・・プログラムカウンタ 3・・・・・・・・・・関数ワードフレームポインタ 5・・・・・・・・・・例外状態フレームポインタ 6・・・・・・・・・・例外引数フレームポインタ 7・・・・・・・・・・スタック 8・・・・・・・・・・関数ワードフレーム 9・・・・・・・・・・関数命令フレーム 12・・・・・・・・・例外ハンドラテーブル 20・・・・・・・・・関数スタックフレーム 21・・・・・・・・・例外スタックフレーム 100・・・・・・・・CPU 102・・・・・・・・仮想CPUインタプリタプログ
ラム格納領域 103・・・・・・・・仮想CPUメモリ格納領域 104・・・・・・・・画像バッファメモリ 105・・・・・・・・MPEGデコーダ 106・・・・・・・・CD−ROMドライブ 107・・・・・・・・キー入力装置 108・・・・・・・・バス 109・・・・・・・・CRTディスプレイコントロー
ラ 110・・・・・・・・CRTディスプレイ 111・・・・・・・・CD−ROMディスク 112・・・・・・・・仮想CPUプログラム領域 120・・・・・・・・ROM 130・・・・・・・・RAM
1 Stack pointer 2 Program counter 3 Function word frame pointer 5 ..Exception status frame pointer 6 ... Exception argument frame pointer 7 ... Stack 8 ... Function word frame 9 ...・ ・ ・ ・ ・ ・ ・ ・ Function instruction frame 12 ・ ・ ・ ・ ・ ・ Exception handler table 20 ・ ・ ・ ・ ・ ・ ・ ・ ・ Function stack frame 21 ・ ・ ・ ・ ・ ・ ・ Exception stack frame 100 ... CPU 102 ... Virtual CPU interpreter program storage area 103 ... Virtual CPU memory storage area 104 ... Image buffer Memory 105 ... MPE Decoder 106 ・ ・ ・ ・ ・ ・ CD-ROM drive 107 ・ ・ ・ ・ ・ ・ Key input device 108 ・ ・ ・ ・ ・ ・ Bus 109 ・ ・ ・ ・ ・ ・ CRT display controller 110 ・・ ・ ・ ・ CRT display 111 ・ ・ ・ ・ ・ ・ CD-ROM disk 112 ・ ・ ・ ・ ・ ・ Virtual CPU program area 120 ・ ・ ・ ・ ・ ・ ROM 130 .... RAM

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成6年7月19日[Submission date] July 19, 1994

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】特許請求の範囲[Name of item to be amended] Claims

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【特許請求の範囲】[Claims]

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0019[Correction target item name] 0019

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0019】 図2及び図3には、仮想CPUにおける
レジスタ(図1のRAM130の仮想CPUメモリ格納
領域103及びCPU100のレジスタの一部に対応す
る)を示し、プログラミングモデルを示している。
2 and 3 show registers in the virtual CPU (corresponding to the virtual CPU memory storage area 103 of the RAM 130 of FIG. 1 and a part of the registers of the CPU 100), and show a programming model.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0043[Correction target item name] 0043

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0043】 図21には、例外ハンドラブロックでの
処理シーケンスフローを示している。この図21におい
て、ステップS21は例外ハンドラでの処理の本体で、
ここでは例外ハンドラのブロックがある関数と同じコン
テクストで実行されるので、その関数の引数とローカル
変数は例外起動時の内容を保持したままでアクセスで
き、その他EP,ESレジスタ(例外引数フレームポイ
ンタ6,例外状態フレームポインタ5)をベースにした
例外引数と例外状態フレームの参照も可能である。その
後、例外ハンドラブロックでの処理を終了するには、フ
ローチャートでは条件判断を図示していないが例外ハン
ドラでの処理結果や例外の種類による条件を判断をした
うえで、3つの選択が可能である。
FIG. 21 shows a processing sequence flow in the exception handler block. In FIG. 21, step S21 is the main body of processing in the exception handler.
Since the exception handler block is executed in the same context as the function here, the arguments and local variables of the function can be accessed while retaining the contents at the time of exception activation, and other EP and ES registers (exception argument frame pointer 6 It is also possible to refer to the exception argument and exception state frame based on the exception state frame pointer 5). After that, to finish the processing in the exception handler block, although the condition judgment is not shown in the flowchart, three selections are possible after judging the processing result in the exception handler and the condition depending on the type of exception. .

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図21[Name of item to be corrected] Fig. 21

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図21】 例外ハンドラブロックでの処理シーケンス
を示すフローチャートである。
FIG. 21 is a flowchart showing a processing sequence in an exception handler block.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図3[Name of item to be corrected] Figure 3

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図3】 [Figure 3]

【手続補正6】[Procedure correction 6]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図4[Name of item to be corrected] Fig. 4

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図4】 [Figure 4]

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図5[Name of item to be corrected] Figure 5

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図5】 [Figure 5]

【手続補正8】[Procedure Amendment 8]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図7[Name of item to be corrected] Figure 7

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図7】 [Figure 7]

【手続補正9】[Procedure Amendment 9]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図8[Correction target item name] Figure 8

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図8】 [Figure 8]

【手続補正10】[Procedure Amendment 10]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図14[Name of item to be corrected] Fig. 14

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図14】 FIG. 14

【手続補正11】[Procedure Amendment 11]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図20[Name of item to be corrected] Fig. 20

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図20】 FIG. 20

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータプログラムを通常処理プロ
グラムと複数の例外処理ハンドラに分離してコード化
し、上記例外処理ハンドラの定義を上記通常処理プログ
ラムの実行により動的に行い、例外検出時において上記
通常処理プログラムの実行状態に基づいて上記例外処理
ハンドラを動的に選択して実行する制御を行う情報処理
装置であって、 所定の規則に則った第1の例外処理ハンドラから第2の
例外処理ハンドラへの制御の移動の行程と、 例外処理ハンドラの実行制御状態の消去及び当該例外処
理ハンドラを定義した実行環境の回復の行程と、 例外処理ハンドラから例外起動点への制御の復帰の行程
と、 例外処理ハンドラと例外起動点のパラメータ交換の行程
と、 例外処理ハンドラが定義された実行環境での当該例外処
理ハンドラの実行の行程と、 例外処理を多重化する多重例外の行程とを行う制御手段
を有してなることを特徴とする情報処理装置。
1. A computer program is divided into a normal processing program and a plurality of exception processing handlers and coded, the definition of the exception processing handler is dynamically performed by executing the normal processing program, and the normal processing is performed when an exception is detected. An information processing apparatus for controlling to dynamically select and execute the exception handling handler based on the execution state of a program, from a first exception handling handler according to a predetermined rule to a second exception handling handler Process of transferring the control of the exception handling handler, the process of clearing the execution control state of the exception handling handler and the recovery of the execution environment in which the exception handling handler is defined, the process of returning control from the exception handling handler to the exception starting point, and the exception Process of exchanging parameters between processing handler and exception starting point, and the exception processing handler in the execution environment in which the exception processing handler is defined And execution of the process, the information processing apparatus characterized by comprising a control means for the stroke of multiple exceptions for multiplexing exception handling.
【請求項2】 上記例外処理ハンドラを選択するため
に、各例外処理ハンドラに選択されるべき通常処理プロ
グラムの実行状態情報を付加し、コード化されたプログ
ラムに予め情報として含めておくことを特徴とする請求
項1記載の情報処理装置。
2. In order to select the exception handling handler, execution state information of a normal processing program to be selected is added to each exception handling handler and included in the coded program in advance as information. The information processing device according to claim 1.
【請求項3】 上記例外検出時に、例外検出時の通常プ
ログラムの実行状態と各例外処理ハンドラに付加された
上記通常処理プログラムの実行状態情報とを比較するこ
とにより例外処理ハンドラを選択し、実行制御を行うこ
とを特徴とする請求項2記載の情報処理装置。
3. When the exception is detected, the exception processing handler is selected and executed by comparing the execution state of the normal program when the exception is detected with the execution state information of the normal processing program added to each exception processing handler. The information processing apparatus according to claim 2, which is controlled.
【請求項4】 上記制御手段を、1本のスタックで制御
することを特徴とする請求項1記載の情報処理装置。
4. The information processing apparatus according to claim 1, wherein the control means is controlled by one stack.
JP19012793A 1993-07-30 1993-07-30 Information processing apparatus and method Expired - Fee Related JP3603314B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19012793A JP3603314B2 (en) 1993-07-30 1993-07-30 Information processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19012793A JP3603314B2 (en) 1993-07-30 1993-07-30 Information processing apparatus and method

Publications (2)

Publication Number Publication Date
JPH0744398A true JPH0744398A (en) 1995-02-14
JP3603314B2 JP3603314B2 (en) 2004-12-22

Family

ID=16252849

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19012793A Expired - Fee Related JP3603314B2 (en) 1993-07-30 1993-07-30 Information processing apparatus and method

Country Status (1)

Country Link
JP (1) JP3603314B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012086288A1 (en) * 2010-12-20 2012-06-28 インターナショナル・ビジネス・マシーンズ・コーポレーション Exception control method, system, and program
CN102570990A (en) * 2010-12-29 2012-07-11 安凯(广州)微电子技术有限公司 Overcurrent protection circuit of amplifier output stage
US9710270B2 (en) 2010-12-20 2017-07-18 International Business Machines Corporation Exception control method, system, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012086288A1 (en) * 2010-12-20 2012-06-28 インターナショナル・ビジネス・マシーンズ・コーポレーション Exception control method, system, and program
JP5822848B2 (en) * 2010-12-20 2015-11-25 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Exception control method, system and program
US9710270B2 (en) 2010-12-20 2017-07-18 International Business Machines Corporation Exception control method, system, and program
CN102570990A (en) * 2010-12-29 2012-07-11 安凯(广州)微电子技术有限公司 Overcurrent protection circuit of amplifier output stage

Also Published As

Publication number Publication date
JP3603314B2 (en) 2004-12-22

Similar Documents

Publication Publication Date Title
US7308567B2 (en) Information processing apparatus for performing a system boot by using programs stored in a non-voltile storage device
KR101782313B1 (en) Apparatus and method for handling exception events
WO2001055845A2 (en) System and method for flexible software linking
JP2000347872A (en) Method and device for processing exception as regular control flow
JPH05204686A (en) Passive recovery method and system for operating system kernel
US6957367B2 (en) System and method for controlling activity of temporary files in a computer system
CN1117166A (en) Backout logic for dual execution unit processor
JPH01161442A (en) Register save and recovery system
JPH05250182A (en) Program condition processing method and computer system
JP2005063435A (en) Method and system for containing software fault
JP2850808B2 (en) Data processing device and data processing method
JPH0744398A (en) Information processor
JPH1196002A (en) Data processor
US5150474A (en) Method for transferring arguments between object programs by switching address modes according to mode identifying flag
JP4155052B2 (en) Emulator, emulation method and program
US5138617A (en) Method for masking false bound faults in a central processing unit
JPH03184123A (en) Procedure state description element system for digital data processor
JP2009230479A (en) Microprocessor
WO1988007239A1 (en) Apparatus and method for synchronization of arithmetic exceptions in parallel pipelined execution units
KR20080044652A (en) Method for debugging by using stack of cpu
CA1223079A (en) Data processor having selective breakpoint capability with minimal overhead
JP2642788B2 (en) Execution monitoring point reduction method
JP3021697B2 (en) Exception handling in programming languages
JP2002149417A (en) Method for saving and restoring register
JPH0248733A (en) Information processor

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040426

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040907

A61 First payment of annual fees (during grant procedure)

Effective date: 20040920

Free format text: JAPANESE INTERMEDIATE CODE: A61

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

Free format text: PAYMENT UNTIL: 20091008

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees