JPH03218529A - High speed interruption processor - Google Patents

High speed interruption processor

Info

Publication number
JPH03218529A
JPH03218529A JP1385490A JP1385490A JPH03218529A JP H03218529 A JPH03218529 A JP H03218529A JP 1385490 A JP1385490 A JP 1385490A JP 1385490 A JP1385490 A JP 1385490A JP H03218529 A JPH03218529 A JP H03218529A
Authority
JP
Japan
Prior art keywords
registers
saving
register
general
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.)
Granted
Application number
JP1385490A
Other languages
Japanese (ja)
Other versions
JP2591212B2 (en
Inventor
Mikio Ogisu
荻須 幹雄
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

Abstract

PURPOSE:To attain a high speed and optimum saving operation by processing only registers which require stack saving among stack saving of registers which are required at the time of generating an interruption by means of hardware or software. CONSTITUTION:Flags 2 showing whether the registers are used or not on a user program are given for respective registers 1-8, and hardware sets the flags 2. When interruption generates, the flags 2 are referred to and only the registers 1-8 which require saving are saved in a stack area. Software which extracts the registers 1-8 that use the user program at the time of compiling and previously saves the registers 1-8 as a saving program is prepared. Thus, the registers can be saved at high speed when interruption generates and a user does not need to prepare the saving program, whereby the burden of software can be reduced.

Description

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

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

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

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

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

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

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

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

第1図はユーザープログラム上でアクセスがあったとき
、ハードウェアによりフラグをセットし、割込み発生時
にフラグがセットされているレジスタのみを退避する本
発明の一実施例について示したブロック図である。汎用
レジスタ1は複数で構成されて、レジスタ群を形成する
。各汎用レジスタ1にはユーザープログラム上でアクセ
スがあったか否かを示すアクセス履歴フラグ2が設けら
れており、マイクロROM5からのライトアクセス信号
9がフラグセット信号発生部3に入力され、セット信号
となって該当するアクセス履歴フラグ2をイネーブルに
する。汎用レジスタ1は、ライトアクセスがあって初め
てその内容が有効となるので、マイクロROM5のライ
トアクセス信号9のみでアクセス履歴フラグ2をセット
する。
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 registers with flags set when an interrupt occurs are saved. A plurality of general-purpose registers 1 are configured to form a register group. Each general-purpose register 1 is provided with an access history flag 2 that indicates whether or not it has been accessed by the user program, and a write access signal 9 from the micro ROM 5 is input to the flag set signal generator 3 and becomes a set signal. enable the corresponding access history flag 2. Since the contents of the general-purpose register 1 become valid only after a write access is made, the access history flag 2 is set only by the write access signal 9 of the micro ROM 5.

割込み発生時において、レジスタを退避する場合、アク
セス履歴フラグ2の値がフラグ信号7としてフラグ検出
部4に入力される。フラグ検出部4では、フラグ信号7
がイネーブルになっているものを捜し出し、汎用レジス
タ番号8としてマイクロROM5に伝送する。マイクロ
ROM5はこの汎用レジスタ番号8を受けとり、該当す
る汎用レジスタ1をスタックエリア(図示せず)に退避
する。退避が終了すると次の汎用レジスタ番号8を受け
とり、マイクロROM5は次の汎用レジスタを退避し、
退避すべき汎用レジスタを全てスタックに退避するまで
この動作を繰り返す。割込み発生時に退避すべきレジス
タをハード的に抽出できるとともに、ハードウェアでレ
ジスタを退避するので、退避が必要なレジスタのみを高
速に退避することができる。
When saving the register when an interrupt occurs, the value of the access history flag 2 is inputted to the flag detection unit 4 as the flag signal 7. In the flag detection section 4, the flag signal 7
is enabled, and transmits it to the micro ROM 5 as general-purpose register number 8. The micro ROM 5 receives this 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-purpose register number 8 is received, and the micro ROM 5 saves the next general-purpose register.
This operation is repeated until all general-purpose registers to be saved are saved to the stack. Since the registers to be saved when an interrupt occurs can be extracted by hardware, and the registers are saved by hardware, only the registers that need to be saved can be saved at high speed.

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

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

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

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

Claims (2)

【特許請求の範囲】[Claims] (1)汎用レジスタ毎に、過去にライトアクセスがあっ
たか否かを示すフラグを持ち、ライトアクセス時にハー
ドウェアにより所定フラグがセットされ、割込み発生時
に前記所定フラグがセットされているレジスタのみをハ
ードウェアでスタックエリアに退避することにより、高
速割込みを実現することを特徴とする高速割込み処理装
置。
(1) Each general-purpose register has a flag indicating whether or not there has been a write access in the past, and a predetermined flag is set by the hardware at the time of a write access, and only the register to which the predetermined flag is set when an interrupt occurs is transferred to the hardware. A high-speed interrupt processing device that realizes high-speed interrupts by saving them to a stack area.
(2)高級言語で書かれたソースプログラムからマシン
語に変換するコンパイラに於いて、使用する所定の汎用
レジスタを抽出し、この汎用レジスタをスタックエリア
に退避或いは復帰するルーチンをROM化し、割込み発
生時にこのルーチンの起動をかけることにより、高速割
込みを実現することを特徴とする請求項(1)記載の高
速割込み処理装置。
(2) In a compiler that converts a source program written in a high-level language into machine language, a routine that extracts a predetermined general-purpose register to be used, saves or restores this general-purpose register to the stack area, is written in ROM, and an interrupt is generated. 2. The high-speed interrupt processing device according to claim 1, wherein high-speed interrupts are realized by activating this routine at certain times.
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 true JPH03218529A (en) 1991-09-26
JP2591212B2 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)

Cited By (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
US6282705B1 (en) 1998-01-12 2001-08-28 Nec Corporation Compiler capable of reducing interrupt handling in optimization and its optimization method

Citations (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

Patent Citations (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

Cited By (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
US6282705B1 (en) 1998-01-12 2001-08-28 Nec Corporation Compiler capable of reducing interrupt handling in optimization and its optimization method

Also Published As

Publication number Publication date
JP2591212B2 (en) 1997-03-19

Similar Documents

Publication Publication Date Title
US5150474A (en) Method for transferring arguments between object programs by switching address modes according to mode identifying flag
JPH03218529A (en) High speed interruption processor
JPH056281A (en) Information processor
JPH0823861B2 (en) Distributed processing method
US7107478B2 (en) Data processing system having a Cartesian Controller
JPH0377137A (en) Information processor
JPS62254237A (en) Inter-printer type branch instruction executing system
JP2708647B2 (en) How coprocessors support auxiliary functions
JP3140028B2 (en) Subroutine argument passing method
JPH03100830A (en) Optimization system for instruction
JPS5829051A (en) Operation processing device
KR970059915A (en) Microprocessor interrupt handler
JPH09120383A (en) Data input and output method and device therefor
JP2895892B2 (en) Data processing device
JPS638841A (en) Interruption accepting system
JPS62184542A (en) Interruption device
JPH05224947A (en) Language processing program executing device
JPH04294427A (en) Argument transfer system
JPS63104144A (en) High-speed context switching device
JPH08115221A (en) C compiler
JPS62106543A (en) Controller for microprogram
JPH04287130A (en) Branching instruction optimizing system for base address system machine
JPS61283930A (en) Information processor
JPH01214944A (en) Program traveling information collecting system
JPS62166444A (en) Program debugging device

Legal Events

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