JP2591212B2 - High-speed interrupt processing device - Google Patents

High-speed interrupt processing device

Info

Publication number
JP2591212B2
JP2591212B2 JP2013854A JP1385490A JP2591212B2 JP 2591212 B2 JP2591212 B2 JP 2591212B2 JP 2013854 A JP2013854 A JP 2013854A JP 1385490 A JP1385490 A JP 1385490A JP 2591212 B2 JP2591212 B2 JP 2591212B2
Authority
JP
Japan
Prior art keywords
register
interrupt processing
general
registers
flag
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
JP2013854A
Other languages
Japanese (ja)
Other versions
JPH03218529A (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2013854A priority Critical patent/JP2591212B2/en
Publication of JPH03218529A publication Critical patent/JPH03218529A/en
Application granted granted Critical
Publication of JP2591212B2 publication Critical patent/JP2591212B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明は割込み発生時において、レジスタのスタック
退避をハードウェア或いは最適化されたソフトウェアに
より、退避処理を高速に行なうことができる高速割込み
処理装置に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a high-speed interrupt processing apparatus that can save a register stack at high speed by hardware or optimized software when an interrupt occurs. It is.

従来の技術 従来、割込み発生時に於いて、レジスタのデータを退
避する場合、ソフトウェアによって退避動作が実行され
ていた。レジスタは複数のレジスタで構成されて、レジ
スタ群を形成するが、ユーザープログラムによっては、
全てのレジスタを使用するとは限らず、割込み発生時に
全てのレジスタをスタックに退避する方法もあるが、使
用しているレジスタのみをスタックに退避し、スタック
エリアを有効に利用する方法がとられている。
2. Description of the Related Art Conventionally, when data of a register is saved when an interrupt occurs, the saving operation has been executed by software. A register is composed of a plurality of registers to form a register group.
Not all registers are used, and there is a method to save all registers to the stack when an interrupt occurs.However, a method is used to save only the used registers to the stack and use the stack area effectively. I have.

発明が解決しようとする課題 しかしながら、使用しているレジスタを複数のレジス
タから捜し出す方法は時間がかかり、またソフトウェア
の負担も増大する。
Problems to be Solved by the Invention However, the method of searching for a register in use from a plurality of registers is time-consuming and increases the load on software.

一方、この問題点を解決する方法として、複数のレジ
スタ群(レジスタファイル)をハード的に準備して、割
込み発生時にレジスタファイルを切り替えるという方法
が考えられている。しかしながら、この方法では割込み
のネスティングベルが、レジスタファイルの個数で制限
されてしまい、レジスタファイル以上の割込みが発生し
た場合はソフトウェアによりスタックにレジスタの内容
を退避する方法がとられていた。
On the other hand, as a method of solving this problem, a method of preparing a plurality of register groups (register files) in hardware and switching the register files when an interrupt occurs has been considered. However, in this method, the nesting bell of the interrupt is limited by the number of register files, and when an interrupt of more than the register file occurs, the method of saving the contents of the register to the stack by software has been adopted.

本発明は上記従来の課題を解決するもので、割込み発
生時に生ずるレジスタのスタック退避を、退避が必要な
レジスタだけをハードウェア或いはソフトウェアで処理
することにより、高速かつ最適な退避動作を実現する高
速割込み処理装置を提供することを目的としている。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned conventional problem. The register stack that occurs when an interrupt occurs is processed by hardware or software only for registers that need to be saved, thereby realizing a high-speed and optimum save operation. It is intended to provide an interrupt processing device.

課題を解決するための手段 この課題を解決するために、本発明の高速割込み処理
装置は、レジスタ毎にユーザープログラム上でレジスタ
を使用したかどうかを示すフラグを持ち、ハードウェア
により、このフラグをセットし、割込み発生時におい
て、このフラグを参照することにより退避が必要なレジ
スタのみをスタックエリアに退避する。或いは、ユーザ
ープログラムをコンパイル時点に、使用しているレジス
タを抜き出し、予め退避プログラムとして、これらのレ
ジスタを退避するソフトウェアを準備し、ROM化するよ
うに構成されている。
Means for Solving the Problems In order to solve this problem, the high-speed interrupt processing apparatus of the present invention has a flag indicating whether or not a register has been used on a user program for each register. When an interrupt occurs, only the registers that need to be saved are saved in the stack area by referring to this flag. Alternatively, at the time of compiling the user program, the registers used are extracted, software for saving these registers is prepared in advance as a save program, and ROMized.

作用 この構成により、割込み発生時のレジスタ退避を高速
かつ最適化を実現することができる。
Operation With this configuration, it is possible to realize high-speed and optimization of register saving when an interrupt occurs.

実施例 以下本発明の実施例について説明する。Examples Hereinafter, examples of the present invention will be described.

第1図はユーザープログラム上でアクセスがあったと
き、ハードウェアによりフラグをセットし、割込み発生
時にフラグがセットされているレジスタのみを退避する
本発明の一実施例について示したブロック図である。汎
用レジスタ1は複数で構成されて、レジスタ群を形成す
る。各汎用レジスタ1にはユーザープログラム上でアク
セスがあったか否かを示すアクセス履歴フラグ2が設け
られており、マイクロROM5からのライトアクセス信号9
がフラグセット信号発生部3に入力され、セット信号と
なって該当するアクセス履歴フラグ2をイネーブルにす
る。汎用レジスタ1は、ライトアクセスがあって初めて
その内容が有効となるので、マイクロROM5のライトアク
セス信号9のみでアクセス履歴フラグ2をセットする。
割込み発生時において、レジスタを退避する場合、アク
セス履歴フラグ2の値がフラグ信号7としてフラグ検出
部4に入力される。フラグ検出部4では、フラグ信号7
がイネーブルになっているものを捜し出し、汎用レジス
タ番号8としてマイクロROM5に伝送する。マイクロROM5
はこの汎用レジスタ番号8を受けとり、該当する汎用レ
ジスタ1をスタックエリア(図示せず)に退避する。退
避が終了すると次の汎用レジスタ番号8を受けとり、マ
イクロROM5は次の汎用レジスタを退避し、退避すべき汎
用レジスタを全てスタックに退避するまでこの動作を繰
り返す。割込み発生時に退避すべきレジスタをハード的
に抽出できるとともに、ハードウェアでレジスタを退避
するので、退避が必要なレジスタのみを高速に退避する
ことができる。
FIG. 1 is a block diagram showing an embodiment of the present invention in which a flag is set by hardware when an access is made on a user program, and only the register in which the flag is set is saved when an interrupt occurs. The general-purpose register 1 is composed of a plurality of registers to form a register group. Each general-purpose register 1 is provided with an access history flag 2 indicating whether or not an access has been made on the user program.
Is input to the flag set signal generation unit 3 and becomes a set signal to enable the corresponding access history flag 2. Since the contents of the general-purpose register 1 become effective only after a write access, the access history flag 2 is set only by the write access signal 9 of the micro ROM 5.
When the register is saved when an interrupt occurs, the value of the access history flag 2 is input to the flag detection unit 4 as the flag signal 7. In the flag detection unit 4, the flag signal 7
Is searched for, and transmitted to the micro ROM 5 as the general-purpose register number 8. Micro ROM 5
Receives the general-purpose register number 8 and saves the corresponding general-purpose register 1 to a stack area (not shown). When the saving is completed, the next general register number 8 is received, the micro ROM 5 saves the next general register, and repeats this operation until all the general registers to be saved are saved on the stack. Registers to be saved when an interrupt occurs can be extracted in hardware, and registers are saved by hardware. Therefore, only registers that need to be saved can be saved at high speed.

第2図はコンパイル時点に使用する汎用レジスタを抽
出し、汎用レジスタの退避ルーチンをROM化する本発明
の一実施例について示したブロック図である。高級言語
で書かれたソースプログラム10をコンパイラ13で機械語
に変換する際に、使用しているレジスタを抽出し、汎用
レジスタ番号11としてその情報を貯える。次に抽出した
汎用レジスタ番号11に対応するレジスタを割込み発生時
にスタックエリアに退避する。機械語による退避プログ
ラム12を本体のユーザープログラムとは別に作成する。
この割込み退避ルーチンを割込み処理を実行する前に動
作させることにより、割込み発生時に使用しているレジ
スタを調べる処理が不要であり、割込み退避処理を高速
に行なうことができる。
FIG. 2 is a block diagram showing an embodiment of the present invention in which a general-purpose register used at the time of compiling is extracted and a save routine for the general-purpose register is stored in a ROM. When a source program 10 written in a high-level language is converted into a machine language by a compiler 13, a register used is extracted and the information is stored as a general-purpose register number 11. Next, the register corresponding to the extracted general-purpose register number 11 is saved in the stack area when an interrupt occurs. The evacuation program 12 in machine language is created separately from the user program of the main unit.
By operating this interrupt save routine before executing the interrupt process, it is not necessary to check the register used when an interrupt occurs, and the interrupt save process can be performed at high speed.

発明の効果 以上のような本発明によれば、割込み発生時のレジス
タ退避を高速に行なうことができるとともに、退避プロ
グラムをユーザーが準備する必要がなく、ソフトウェア
の負担を軽減することができる。
According to the present invention as described above, it is possible to save registers at the time of occurrence of an interrupt at a high speed, and it is not necessary for a user to prepare an save program, thereby reducing the load on software.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は本発明の他の実施例の構成を示すブロック図であ
る。 1……汎用レジスタ、2……アクセス履歴フラグ、3…
…フラグセット信号発生部、4……フラグ検出部、5…
…マイクロROM、6……フラグセット信号、7……フラ
グ信号、8……汎用レジスタ番号、9……ライトアクセ
ス信号線、10……ソースプログラム、11……抽出された
汎用レジスタ番号、12……機械語による退避プログラ
ム、13……本発明のコンパイラ。
FIG. 1 is a block diagram showing a configuration of one embodiment of the present invention, and FIG. 2 is a block diagram showing a configuration of another embodiment of the present invention. 1 ... General purpose register, 2 ... Access history flag, 3 ...
... Flag set signal generator, 4 ... Flag detector, 5 ...
... Micro ROM, 6 ... Flag set signal, 7 ... Flag signal, 8 ... General register number, 9 ... Write access signal line, 10 ... Source program, 11 ... Extracted general register number, 12 ... ... Evacuation program in machine language, 13 ... Compiler of the present invention.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】高級言語で書かれたソースプログラムをマ
シン語に変換するコンパイラによって、複数の汎用レジ
スタの中から前記ソースプログラムで実際に使用されて
いるレジスタが抽出され、レジスタ番号が格納される使
用レジスタ格納手段と、 割り込み処理時前記使用レジスタ格納手段に格納された
レジスタのみをスタックエリアに退避する割り込み処理
手段とを有することを特徴とする高速割り込み処理装
置。
A register for converting a source program written in a high-level language into a machine language extracts a register actually used in the source program from a plurality of general-purpose registers, and stores a register number. A high-speed interrupt processing apparatus comprising: used register storage means; and interrupt processing means for saving only a register stored in the used register storage means to a stack area at the time of interrupt processing.
JP2013854A 1990-01-24 1990-01-24 High-speed interrupt processing device Expired - Fee Related JP2591212B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013854A JP2591212B2 (en) 1990-01-24 1990-01-24 High-speed interrupt processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013854A JP2591212B2 (en) 1990-01-24 1990-01-24 High-speed interrupt processing device

Publications (2)

Publication Number Publication Date
JPH03218529A JPH03218529A (en) 1991-09-26
JP2591212B2 true JP2591212B2 (en) 1997-03-19

Family

ID=11844865

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013854A Expired - Fee Related JP2591212B2 (en) 1990-01-24 1990-01-24 High-speed interrupt processing device

Country Status (1)

Country Link
JP (1) JP2591212B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6128916A (en) * 1997-11-28 2000-10-10 Enerfex, Inc. Membrane technology to remove non-condensable gases from refrigeration systems
JP3278603B2 (en) 1998-01-12 2002-04-30 エヌイーシーマイクロシステム株式会社 Compiling device, compiler optimizing method, and recording medium recording compiler optimizing procedure

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63311537A (en) * 1987-06-15 1988-12-20 Pfu Ltd Arithmetic processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
正田英介・木田泰著「マイクロプロセッサ マイクロプログラムと制御機器《電子科学シリーズ》77」(昭和53−4−10)産報出版株式会社 PP.89−92,P.140

Also Published As

Publication number Publication date
JPH03218529A (en) 1991-09-26

Similar Documents

Publication Publication Date Title
US5937186A (en) Asynchronous interrupt safing of prologue portions of computer programs
JP2591212B2 (en) High-speed interrupt processing device
JPH02195429A (en) Information processor
KR100639146B1 (en) Data processing system having a cartesian controller
Lavington Manchester computer architectures, 1948-75
JPH0377137A (en) Information processor
JP2895892B2 (en) Data processing device
JP2819668B2 (en) Instruction optimization method
JPH04268928A (en) Emulation device and semiconductor device
JP2568657B2 (en) Hash collision avoidance method for data driven microprocessor
JPH0363822A (en) Computer control system
JP3263123B2 (en) Sorting method in data processing system
JPS62254237A (en) Inter-printer type branch instruction executing system
JP2643399B2 (en) Information processing device
Weicker The influence of the machine model on the time complexity of context-free language recognition
JPS6086625A (en) Data processing device
JPS583042A (en) Program execution system
JPS62182843A (en) Fast compiling/linking system
JPH07306784A (en) Register management device
JPH0285930A (en) Record compiling system
JPH0561674A (en) Program converter
JPH03113651A (en) Garbage correction processing system
JPH04287130A (en) Branching instruction optimizing system for base address system machine
JPH01142936A (en) Information connecting method
JPH03139723A (en) Data processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees