JP2002140199A - Information processing device and method - Google Patents

Information processing device and method

Info

Publication number
JP2002140199A
JP2002140199A JP2000332050A JP2000332050A JP2002140199A JP 2002140199 A JP2002140199 A JP 2002140199A JP 2000332050 A JP2000332050 A JP 2000332050A JP 2000332050 A JP2000332050 A JP 2000332050A JP 2002140199 A JP2002140199 A JP 2002140199A
Authority
JP
Japan
Prior art keywords
register
information
valid
instruction
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000332050A
Other languages
Japanese (ja)
Inventor
Yasunori Yamamoto
泰宜 山本
Tetsuya Tanaka
哲也 田中
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 JP2000332050A priority Critical patent/JP2002140199A/en
Publication of JP2002140199A publication Critical patent/JP2002140199A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To save only an effective resource corresponding to an instruction for permitting interruption, and improve the overhead, in an information processing device. SOLUTION: An instruction generation device 101 determines whether a register 102d of a CPU 102 is effective or not from a source file 101a described by a user by a compiler 101b, and reports information acquired by determination including an object file 101c to the CPU. The CPU temporarily holds the reported information in a state register 102e, saves the held information in a stack memory 104, and saves selectively the effective content in the register in the stack memory by referring the information held in the state register.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、CPUの性能向上
技術に関し、特に、各命令毎の資源が有効か否かの情報
をハードウェアに認識させることで、割込みや分岐の際
に余計な資源までも退避してしまうことによる性能劣化
を回避する情報処理装置および方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for improving the performance of a CPU. The present invention relates to an information processing apparatus and method for avoiding performance degradation due to evacuation.

【0002】[0002]

【従来の技術】割込み技術は、イベントに対するリアル
タイムな応答を行うために、入出力装置からのリクエス
トやインターバル・タイマ割込みなど今日種々の用途に
用いられている。
2. Description of the Related Art Interrupt technology is used for various purposes such as requests from input / output devices and interval timer interrupts in order to respond in real time to events.

【0003】CPUにおける基本的な割込み制御には、
割込みを受け付ける状態と割込みを受け付けない状態が
存在する。通常、割込みを受け付ける状態であっても、
各割込み毎に、予め状態レジスタに設定されたマスクビ
ットにより、割込みを許可しないことも可能である。ま
た、CPUが割込みを受け付ける状態か割込みを禁止す
るかの状態を選択する場合も、状態レジスタの書き込み
を経由して制御を行っている。
[0003] Basic interrupt control in the CPU includes:
There are states where interrupts are accepted and states where interrupts are not accepted. Normally, even when interrupts are accepted,
For each interrupt, it is possible not to permit the interrupt by a mask bit set in the status register in advance. Also, when the CPU selects the state of accepting the interrupt or the state of prohibiting the interrupt, the control is performed via the writing of the state register.

【0004】したがって、あるプロセスの実行中に割込
み要求があった場合、そのプロセスが割込みを受け付け
得る状態であって、かつ割込み要求信号がマスクされて
いない時に割込みが発生する。割込みが発生した場合、
通常はしかるべき割込みハンドラに分岐するが、この時
にユーザープログラムで使用していたレジスタ及び状態
レジスタなどの資源が、割込みハンドラ内での処理中に
破壊された場合には、割込みハンドラからの復帰後に、
もとのユーザープログラムの正常な実行を再開すること
ができなくなる。
Therefore, when an interrupt request is issued during the execution of a certain process, the interrupt occurs when the process is ready to accept an interrupt and the interrupt request signal is not masked. If an interrupt occurs,
Normally, branch to the appropriate interrupt handler, but if resources such as registers and status registers used by the user program are destroyed during processing in the interrupt handler at this time, after returning from the interrupt handler, ,
Normal execution of the original user program cannot be resumed.

【0005】このため、割込み発生時には、必ず資源の
退避が必要となる。しかし、資源が有効であるか無効で
あるかの区別がつかないので、実質、無効な資源を含ん
だ全資源を割込み受付け毎に退避している。
Therefore, when an interrupt occurs, it is necessary to save resources. However, since it is not possible to distinguish whether the resource is valid or invalid, virtually all resources including the invalid resource are saved every time an interrupt is received.

【0006】そこで、実質的に数マイクロ秒以上のオー
ダーで発生する割込みに対しては、必ずしも全ての命令
で割込みを受け付けなくてもユーザーの要望に答え得る
という観点から、ある特定の命令がデコードされた場合
に割込みを許可するという制御方法が考案されている。
[0006] In view of the fact that an interrupt that occurs substantially on the order of several microseconds or more can be answered by a user without necessarily receiving an interrupt for all instructions, a specific instruction is decoded. A control method has been devised in which an interrupt is permitted in the event that the operation is performed.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、割込み
を許可する命令だけで割込みを受け付けたとしても、場
合によっては、かなりの量の資源を退避させなければな
らない場合がある。しかも、資源が有効であるか無効で
あるかの区別がつかないので、実質、無効な資源を含ん
だ全資源に対する退避および復帰処理を行っているた
め、オーバーヘッドが生じているという問題がある。
However, even if an interrupt is accepted only by an instruction for permitting an interrupt, a considerable amount of resources may have to be saved in some cases. In addition, since it is not possible to distinguish whether a resource is valid or invalid, there is a problem that overhead is generated because the saving and restoring processes are performed for all resources including the invalid resource.

【0008】本発明は、かかる問題に鑑みてなされたも
のであり、その目的は、割込みを許可する命令に応じて
有効な資源のみを退避させることで、オーバーヘッドを
改善し、システム性能を向上させた情報処理装置および
方法を提供することにある。
The present invention has been made in view of such a problem, and an object of the present invention is to save overhead and improve system performance by saving only valid resources in accordance with an instruction that permits an interrupt. To provide an information processing apparatus and method.

【0009】[0009]

【課題を解決するための手段】前記の目的を達成するた
め、本発明に係る第1情報処理装置は、命令生成装置、
および少なくとも1つのレジスタを有し命令生成装置で
生成された命令に従って処理を行うCPUを含む情報処
理装置であって、命令生成装置は、CPUのレジスタが
有効であるか否かを判定する手段と、判定手段により得
られた、レジスタが有効であるか否かの情報をCPUに
通知するための通知手段とを備え、CPUは、通知され
た前記情報を一時保持する手段と、一時保持手段に保持
された情報を退避させる第1退避手段と、一時保持手段
に保持された情報を参照して、有効なレジスタの内容を
選択的に退避させる第2退避手段とを備えたことを特徴
とする。
In order to achieve the above object, a first information processing apparatus according to the present invention comprises an instruction generation apparatus,
And an information processing device including a CPU having at least one register and performing processing in accordance with an instruction generated by the instruction generation device, wherein the instruction generation device determines whether or not the register of the CPU is valid. Notification means for notifying the CPU of the information as to whether the register is valid or not obtained by the determination means, wherein the CPU temporarily stores the notified information and a temporary storage means. A first saving means for saving the held information, and a second saving means for selectively saving the contents of the valid register with reference to the information held in the temporary holding means. .

【0010】第1情報処理装置において、CPUは、退
避させた情報を復帰する第1復帰手段と、第1復帰手段
により復帰させた情報を参照して、第2退避手段により
退避させた有効なレジスタの内容を選択的に復帰させる
第2復帰手段とを備えたことを特徴とする。この場合、
第2復帰手段は、前記第1復帰手段によりスタックメモ
リから復帰させた前記情報が保持された状態レジスタか
ら前記レジスタに対応するビットを1ビットずつ参照
し、前記参照した1ビットの情報が所定の論理値であっ
た場合にのみ、該当するレジスタの内容を前記スタック
メモリから復帰させることが好ましい。
In the first information processing apparatus, the CPU refers to first return means for restoring the saved information and the effective information saved by the second save means with reference to the information restored by the first return means. A second restoring means for selectively restoring the contents of the register. in this case,
The second return means refers to a bit corresponding to the register one by one from a status register holding the information restored from the stack memory by the first return means, and the referenced one-bit information is a predetermined bit. It is preferable to restore the contents of the corresponding register from the stack memory only when it is a logical value.

【0011】また、通知手段は、生成された命令により
情報をCPUに通知することが好ましい。
It is preferable that the notifying unit notifies the CPU of information by the generated instruction.

【0012】また、一時保持手段は、状態レジスタにレ
ジスタに対応したビットを割り当て、有効なレジスタに
対応するビットに所定の論理値を保持することが好まし
い。
Preferably, the temporary holding means allocates a bit corresponding to the register to the status register, and holds a predetermined logical value in a bit corresponding to a valid register.

【0013】また、第2退避手段は、情報が保持された
状態レジスタからレジスタに対応するビットを1ビット
ずつ参照し、参照した1ビットの情報が所定の論理値で
あった場合にのみ、該当するレジスタの内容をスタック
メモリに退避させることが好ましい。
The second saving means refers to a bit corresponding to the register from the status register holding the information one bit at a time, and only when the referenced one bit information has a predetermined logical value, It is preferable to save the contents of the register to be stored in the stack memory.

【0014】前記の目的を達成するため、本発明に係る
第2情報処理装置は、少なくとも1つのレジスタを有
し、特定の命令を実行したときのみ割込みを受け付ける
CPUを含む情報処理装置であって、CPUのレジスタ
が有効であるか否かを判定する手段と、判定手段により
得られた、レジスタが有効であるか否かの情報をCPU
に命令によって通知するための通知手段と、通知手段に
より通知された情報が有効である間に命令を実行するこ
とで割込みを許可する手段と、命令をレジスタの有効で
ある数が最も少ない位置に配置する手段とを備えたこと
を特徴とする。
In order to achieve the above object, a second information processing apparatus according to the present invention is an information processing apparatus including a CPU having at least one register and receiving an interrupt only when a specific instruction is executed. Means for determining whether the register of the CPU is valid, and information obtained by the determination means for determining whether the register is valid.
Notification means for notifying by means of an instruction, means for permitting an interrupt by executing the instruction while the information notified by the notification means is valid, and setting the instruction in the least effective position of the register. Means for arranging.

【0015】また、第2情報処理装置は、命令が割込み
を受け付けた場合にのみ、レジスタが有効か否かの情報
を一時保持する手段と、一時保持手段に保持された情報
を退避させる第1待避手段と、一時保持手段に保持され
た情報を参照して、有効なレジスタの内容を選択的に退
避させる第2待避手段とを備えたことを特徴とする。
The second information processing apparatus includes means for temporarily holding information on whether or not the register is valid only when the instruction accepts an interrupt, and a first means for saving the information held in the temporary holding means. The information processing apparatus is characterized by comprising a saving means and a second saving means for selectively saving the contents of the valid register with reference to the information held in the temporary holding means.

【0016】前記の目的を達成するため、本発明に係る
第1情報処理方法は、生成された命令に従って、少なく
とも1つのレジスタを有するCPUを用いて処理を行う
情報処理方法であって、CPUのレジスタが有効である
か否かを判定し、判定により得られた、レジスタが有効
であるか否かの情報をCPUに通知し、CPUにおい
て、通知された情報を一時保持し、一時保持した情報を
退避させ、一時保持した情報を参照して有効なレジスタ
の内容を選択的に退避させることを特徴とする。
In order to achieve the above object, a first information processing method according to the present invention is an information processing method for performing processing using a CPU having at least one register in accordance with a generated instruction. Determining whether the register is valid, notifying the CPU of the information as to whether the register is valid or not obtained by the determination, and temporarily storing the notified information in the CPU; Is saved, and the contents of valid registers are selectively saved by referring to the temporarily held information.

【0017】この第1情報処理方法はさらに、退避させ
た情報を復帰させ、復帰させた情報を参照して有効なレ
ジスタの内容を選択的に復帰させることを特徴とする。
この場合、有効なレジスタ内容の選択的復帰は、復帰さ
せた情報が保持された状態レジスタからレジスタに対応
するビットを1ビットずつ参照し、参照した1ビットの
情報が所定の論理値であった場合にのみ、該当するレジ
スタの内容をスタックメモリから復帰させることで行う
ことが好ましい。
Further, the first information processing method is characterized in that the saved information is restored, and the contents of the valid register are selectively restored by referring to the restored information.
In this case, the selective restoration of the valid register contents refers to the bit corresponding to the register one bit at a time from the status register holding the restored information, and the referenced one-bit information is a predetermined logical value. Only in such a case, it is preferable to restore the contents of the corresponding register from the stack memory.

【0018】また、情報の通知は、生成された命令によ
り行うことが好ましい。
It is preferable that the notification of the information is performed by a generated instruction.

【0019】また、情報の一時保持は、状態レジスタに
レジスタに対応したビットを割り当て、有効なレジスタ
に対応するビットに所定の論理値を保持させることで行
うことが好ましい。
Preferably, the information is temporarily stored by allocating a bit corresponding to the register to the status register, and storing a predetermined logical value in the bit corresponding to the valid register.

【0020】また、有効なレジスタ内容の選択的退避
は、情報が保持された状態レジスタから前記レジスタに
対応するビットを1ビットずつ参照し、参照した1ビッ
トの情報が所定の論理値であった場合にのみ、該当する
レジスタの内容をスタックメモリに退避させることで行
うことが好ましい。
Further, in the selective saving of the valid register contents, a bit corresponding to the register is referred one bit at a time from a state register holding information, and the referenced one bit information is a predetermined logical value. Only in this case, it is preferable to save the contents of the corresponding register in the stack memory.

【0021】前記の目的を達成するため、本発明に係る
第2情報処理方法は、少なくとも1つのレジスタを有
し、特定の命令を実行したときのみ割込みを受け付ける
CPUを用いて処理を行う情報処理方法であって、CP
Uのレジスタが有効であるか否かを判定し、判定により
得られた、レジスタが有効であるか否かの情報をCPU
に命令によって通知し、CPUにおいて、通知された情
報が有効である間に命令を実行することで割込みを許可
し、命令をレジスタの有効である数が最も少ない位置に
配置することを特徴とする。
In order to achieve the above object, a second information processing method according to the present invention has at least one register and performs processing using a CPU that receives an interrupt only when a specific instruction is executed. The method comprises: CP
The CPU determines whether or not the register of U is valid, and outputs information obtained by the determination whether or not the register is valid to the CPU.
And an interrupt is permitted by executing the instruction while the notified information is valid in the CPU, and the instruction is arranged at a position where the number of valid registers is the least. .

【0022】この第2情報処理方法はさらに、割込みを
受け付けた場合にのみ、情報を一時保持し、一時保持し
た情報を退避させ、一時保持した情報を参照して有効な
レジスタの内容を選択的に退避させることを特徴とす
る。
This second information processing method further holds information temporarily, saves the temporarily held information only when an interrupt is received, and selectively refers to the temporarily held information to select valid register contents. It is characterized by being evacuated to.

【0023】前記の目的を達成するため、本発明に係る
記録媒体は、第1情報処理装置における命令生成装置に
より生成された命令列を記憶することを特徴とする。
In order to achieve the above object, a recording medium according to the present invention is characterized by storing an instruction sequence generated by an instruction generation device in a first information processing device.

【0024】上記の構成および方法によれば、あるポイ
ントにおいて、レジスタが有効であるか否かの情報をC
PUに通知し、最も資源の退避が少ないポイントで割込
みを受け付けることで、資源退避のペナルティを減少さ
せ、システム性能を向上させることができる。
According to the above configuration and method, at a certain point, information as to whether or not a register is valid is represented by C
By notifying the PU and accepting an interrupt at a point where the resource is saved the least, it is possible to reduce the resource saving penalty and improve the system performance.

【0025】[0025]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図1から図10を用いて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS.

【0026】図1は、本発明の一実施形態による情報処
理装置の概略構成を示す図である。
FIG. 1 is a diagram showing a schematic configuration of an information processing apparatus according to one embodiment of the present invention.

【0027】図1において、101は命令生成装置であ
り、ユーザーにより記述されたソースファイル101a
と、ソースファイル101aを翻訳するコンパイラ90
1bと、コンパイラ101bによりコンパイルして作成
されるオブジェクトファイル101cとからなる。
In FIG. 1, reference numeral 101 denotes an instruction generation device, which is a source file 101a described by a user.
And a compiler 90 for translating the source file 101a
1b and an object file 101c created by compilation by the compiler 101b.

【0028】オブジェクトファイル101cは、命令メ
モリ103にロードされ、CPU102により実行され
る。
The object file 101c is loaded into the instruction memory 103 and executed by the CPU 102.

【0029】CPU102は、命令メモリ103からの
命令をデコードする命令デコード部102aと、命令デ
コード部102aでデコードされた情報等に基づき制御
を行う制御部102cと、制御部102cにより指令さ
れた制御を行う実行部102bと、レジスタ(d0、d
1、d2、d3、a0、a1、a2、a3を含む)10
2dと、CPU102の状態を表すプロセッサ状態レジ
スタ(PSW)102fと、現在実行している命令が命
令メモリ103上のどのアドレスかを示すプログラムカ
ウンタ(PC)102gと、レジスタ102dが有効で
あるか否かの状態を表す状態レジスタ(RVSR)10
2eとからなる。なお、図1のうち命令生成装置101
およびCPU102以外の装置は一般的な構成をとるも
のとする。
The CPU 102 decodes an instruction from the instruction memory 103, an instruction decoding unit 102a, a control unit 102c that performs control based on information decoded by the instruction decoding unit 102a, and a control unit 102c that controls the control unit 102c. Execution unit 102b and registers (d0, d0
1, d2, d3, a0, a1, a2, and a3) 10
2d, a processor status register (PSW) 102f indicating the status of the CPU 102, a program counter (PC) 102g indicating the address of the instruction currently being executed on the instruction memory 103, and whether the register 102d is valid. Status register (RVSR) 10 indicating the status
2e. Note that, in FIG.
Devices other than the CPU 102 have a general configuration.

【0030】以下では、まず、命令生成装置101によ
り、レジスタ102dが有効か否かの情報を判定しCP
U102に通知する方法を示し、続いて、割込み許可命
令がデコードされた際のCPU102の挙動について説
明する。
In the following, first, the instruction generator 101 determines whether or not the register 102d is valid, and determines whether the register 102d is valid.
A method of notifying the U102 will be described, and subsequently, the behavior of the CPU 102 when the interrupt permission instruction is decoded will be described.

【0031】図2は、図1のソースファイル101aの
内容を模式的に示す図である。ここで、図2に用いた機
械語命令の意味は以下の通りである。
FIG. 2 is a diagram schematically showing the contents of the source file 101a of FIG. Here, the meanings of the machine language instructions used in FIG. 2 are as follows.

【0032】 ADD OP1,OP2 :OP1+OP2の内容をOP2に転送 ADD OP1,OP2,OP3:OP1+OP2の内容をOP3に転送 CLR OP :OPの内容を「0」にする MOV OP1,OP2 :OP1の内容をOP2に転送 MOV OP,(addr) :OPの内容をaddrの指すアドレスに 転送 INC4 OP :OPの内容を4加算 NOP :No Operation 図2の機械語命令列に対して、コンパイラ101bは有
効レジスタの情報を判定する手段を有し、その判定手順
を図3示す。まず、図2の機械語命令列を100命令毎
にグルーピングし、図3の処理単位とする。なお、グル
ーピング数の100は一例であり他の数でも同様であ
る。また、グループピングの方法としては、命令数以外
に、ベーシックブロック単位に区切ることも可能であ
る。
ADD OP1, OP2: transfer the contents of OP1 + OP2 to OP2 ADD OP1, OP2, OP3: transfer the contents of OP1 + OP2 to OP3 CLR OP: set the contents of OP to "0" MOV OP1, OP2: change the contents of OP1 Transfer to OP2 MOV OP, (addr): Transfer the contents of OP to the address indicated by addr INC4 OP: Add 4 to the contents of OP NOP: No Operation For the machine language instruction sequence in FIG. It has means for determining information, and the determination procedure is shown in FIG. First, the machine language instruction sequence in FIG. 2 is grouped for every 100 instructions, and is set as a processing unit in FIG. Note that the grouping number of 100 is an example, and the same applies to other numbers. In addition, as a grouping method, it is also possible to divide into basic blocks in addition to the number of instructions.

【0033】図3において、まず、あるレジスタに着目
し(ステップS301)、グルーピングされた命令群の
中で、このレジスタがデスティネーション(dst)レ
ジスタになっている命令があるか否かをサーチする(ス
テップS302)。デスティネーションレジスタになっ
ている命令が全くない場合(S302でNo)は、この
グループ内の全ての命令で着目しているレジスタは有効
となる(ステップS303)。
In FIG. 3, first, attention is paid to a certain register (step S301), and it is searched whether or not there is an instruction in which this register is a destination (dst) register in a group of instructions. (Step S302). If there is no instruction that is the destination register (No in S302), the register of interest for all instructions in this group is valid (step S303).

【0034】一方、デスティネーションレジスタとなる
命令が存在する場合(S302でYes)には、この命
令を基準とし、基準より前に着目しているレジスタが、
ソース(src)レジスタとして用いられている命令が
あるか否かをサーチする(ステップS304)。ソース
レジスタとして用いられる命令が全くない場合(S30
4でNo)には、前ステップで設定した基準からの本ス
テップでの基準までの間の命令全て、着目しているレジ
スタは無効である(ステップS305)。
On the other hand, when there is an instruction to be a destination register (Yes in S302), the register focused on before this reference is set based on this instruction.
It is searched whether there is an instruction used as a source (src) register (step S304). When there is no instruction used as a source register (S30
(No in 4), the register of interest is invalid for all instructions from the reference set in the previous step to the reference in this step (step S305).

【0035】一方、ソースレジスタとして用いられる命
令がある場合(S304でYes)には、その命令の次
の命令からサーチスタートポイント命令までの間、着目
しているレジスタは無効となる(ステップS306)。
On the other hand, if there is an instruction to be used as the source register (Yes in S304), the register of interest becomes invalid from the instruction following the instruction to the search start point instruction (step S306). .

【0036】このようにして、グループ内における残り
の命令列のうち、デスティネーションレジスタとして使
われる命令があれば、その命令を基準に同様のステップ
を行う。他のレジスタについても同様に各命令で有効か
否かがサーチされる。
In this way, if there is an instruction used as the destination register among the remaining instruction strings in the group, the same steps are performed based on the instruction. The other registers are similarly searched for validity of each instruction.

【0037】コンパイラ101bは、図2の機械語命令
列に対して上記操作を施した結果、図4に示す「有効レ
ジスタ情報テーブル」を獲得する。図4において、CP
U102はレジスタd0、d1、d2、d3、a0、a
1、a2、a3を有し、テーブル中「○」はレジスタが
有効であることを、「×」は無効であることを示してい
る。
The compiler 101b obtains the "valid register information table" shown in FIG. 4 as a result of performing the above operation on the machine language instruction sequence shown in FIG. In FIG.
U102 is a register d0, d1, d2, d3, a0, a
1, a2, and a3. In the table, “」 ”indicates that the register is valid, and“ × ”indicates that the register is invalid.

【0038】この情報を元に、コンパイラ101bは、
命令列中の既存技術である割込み許可命令(INT_P
ERMIT)に対して、配置する位置と有効レジスタの
情報を以下のようにして決定する。ここで、割込み許可
命令とは、この命令がデコードされた場合にのみ割込み
が許可される制御が行われる命令である。
Based on this information, the compiler 101b
The interrupt enable instruction (INT_P
ERMIT), the location and the information of the effective register are determined as follows. Here, the interrupt permission instruction is an instruction for performing a control of permitting an interrupt only when this instruction is decoded.

【0039】コンパイラ101bは、図4の「有効レジ
スタ情報テーブル」を用いて、割込み許可命令を割込み
発生時に最も退避する資源が少ないポイントに配置す
る。まず、「有効レジスタ情報テーブル」の中で、有効
数が最も少ない命令を選出する。ここで、有効数が同数
の場合は、最もアドレスが小さい命令を選出するものと
する。次に、選ばれた命令の直前の位置に割込み許可命
令INT_PERMITを挿入する。さらに、割込み許
可命令は、図4の「有効レジスタ情報テーブル」に基づ
いて、この位置で有効なレジスタ名をオペランドとして
以下のように明記される。
The compiler 101b uses the “valid register information table” of FIG. 4 to arrange an interrupt permitting instruction at a point where the resources to be saved when an interrupt occurs are the least. First, an instruction having the smallest effective number is selected from the "effective register information table". Here, when the effective numbers are the same, the instruction having the smallest address is selected. Next, an interrupt permission instruction INT_PERMIT is inserted at a position immediately before the selected instruction. Further, the interrupt enable instruction is specified as follows using a valid register name at this position as an operand based on the “valid register information table” of FIG.

【0040】INT_PERMIT [regs]:
[regs]で示された有効レジスタ情報を状態レジス
タ902eに設定して、この命令で割込みを許可する このようにして、図5に示すように、コンパイラ101
bによりINT_PERMITが配置されたオブジェク
トファイル101cが作成される。
INT_PERMIT [regs]:
The valid register information indicated by [regs] is set in the status register 902e, and the interrupt is permitted by this instruction. Thus, as shown in FIG.
b, an object file 101c in which INT_PERMIT is arranged is created.

【0041】ここで、図6に示すように、割込みハンド
ラの先頭にはVALID_STOREを、割込みハンド
ラの出口にはVALID_LOADおよびRTIを必ず
配置しておくものとする。これらの命令の意味は以下の
通りである。
Here, as shown in FIG. 6, VALID_STORE is always arranged at the head of the interrupt handler, and VALID_LOAD and RTI are always arranged at the exit of the interrupt handler. The meaning of these instructions is as follows.

【0042】VALID_STORE:状態レジスタ1
02eに格納された有効レジスタの情報に従って、有効
なレジスタのみをスタックメモリ104に退避し、最後
に状態レジスタ102eをスタックメモリ104に退避
する VALID_LOAD :最初にスタックメモリ104
から状態レジスタ102eを復帰し、状態レジスタ10
2eに格納された有効レジスタの情報に従って、有効な
レジスタのみをスタックメモリ104から復帰する RTI :割込みハンドラからプロセッ
サ状態レジスタPSWを復帰して戻りアドレスに分岐す
る 次に、これらの命令がCPU102により実行される際
の挙動について、図7を用いて説明する。
VALID_STORE: status register 1
In accordance with the information of the valid registers stored in 02e, only valid registers are saved in the stack memory 104, and finally the status register 102e is saved in the stack memory 104. VALID_LOAD: first the stack memory 104
From the status register 102e.
Only the valid registers are restored from the stack memory 104 according to the information of the valid registers stored in 2e. RTI: The processor status register PSW is restored from the interrupt handler and branched to the return address. Next, these instructions are executed by the CPU 102. The behavior at the time of this will be described with reference to FIG.

【0043】図7は、CPU102のパイプライン構成
の一部を示したもので、他の構成は通常のパイプライン
と同様である。
FIG. 7 shows a part of the pipeline configuration of the CPU 102, and the other configuration is the same as that of a normal pipeline.

【0044】図7において、701は、命令メモリ10
3から命令を読み出す命令フェッチユニット、702
は、命令デコード部102aをさらに細かい機能ブロッ
ク単位で表したデコードユニット、703は、実行部1
02bをさらに細かい機能ブロック単位で表した実行ユ
ニットである。
In FIG. 7, reference numeral 701 denotes an instruction memory 10.
Instruction fetch unit 702 for reading instructions from 3
Is a decode unit representing the instruction decode unit 102a in smaller functional block units, and 703 is an execution unit 1
02b is an execution unit that expresses the function block 02b in smaller functional block units.

【0045】デコードユニット702は、通常命令デコ
ード部702aと、割込み許可命令(INT_PERM
IT)デコード部702bと、有効レジスタデコード部
702cと、有効レジスタストア命令(VALID_S
TORE)デコード部702dと、有効レジスタロード
命令(VALID_LOAD)デコード部702eから
なる。
The decode unit 702 includes a normal instruction decode unit 702a and an interrupt enable instruction (INT_PERM).
IT) decode unit 702b, valid register decode unit 702c, and valid register store instruction (VALID_S
(TORE) decoding unit 702d and a valid register load instruction (VALID_LOAD) decoding unit 702e.

【0046】実行ユニット703は、通常命令実行部7
03aと、有効レジスタ情報保持部703bと、有効レ
ジスタ情報獲得部703cと、有効レジスタ内容退避部
704dと、有効レジスタ内容復帰部703eからな
る。
The execution unit 703 includes the normal instruction execution unit 7
03a, a valid register information holding unit 703b, a valid register information acquiring unit 703c, a valid register contents saving unit 704d, and a valid register contents returning unit 703e.

【0047】次に、このようにパイプライン構成された
CPU102の動作について説明する。
Next, the operation of the CPU 102 having such a pipeline configuration will be described.

【0048】まず、CPU102が、図5に示すような
オブジェクトファイル101cを実行するパイプライン
動作の過程で、割込み許可命令INT_PERMITが
デコードされて制御部102cが割込みを受付けた場合
には、割込み許可命令のオペランドで明示された有効レ
ジスタ名を有効レジスタデコード部702cで解読し、
解読により得られた有効レジスタ情報を有効レジスタ情
報保持部703bで状態レジスタ(RVSR)102e
に保持する。
First, when the CPU 102 decodes the interrupt permission instruction INT_PERMIT in the course of the pipeline operation for executing the object file 101c as shown in FIG. 5 and the control unit 102c receives the interrupt, the interrupt permission instruction The effective register name specified by the operand is decoded by the effective register decoding unit 702c,
The valid register information obtained by the decryption is stored in the valid register information holding unit 703b by the status register (RVSR) 102e.
To hold.

【0049】また、状態レジスタ(RVSR)102e
に保持された有効レジスタ情報は、例えば、図8に示す
フォーマットでレジスタ名を格納しておくものとする。
すなわち、レジスタ名を8ビットで表現し、論理値
「1」がセットされたビットに対応するレジスタは有効
レジスタであることを示す。ここでは、有効レジスタ情
報として「0x5E」が状態レジスタ(RVSR)10
2eに保持される。
The status register (RVSR) 102e
In the valid register information held in the register, for example, a register name is stored in a format shown in FIG.
That is, the register name is represented by 8 bits, and the register corresponding to the bit in which the logical value “1” is set is a valid register. Here, “0x5E” is set to the status register (RVSR) 10 as valid register information.
2e.

【0050】続いて、制御部102cは、プログラムカ
ウンタ(PC)102gとプロセッサ状態レジスタ(P
SW)102fを、図9に示すように、スタックメモリ
104の最も深い位置に退避して、割込みハンドラに分
岐する。
Subsequently, the control unit 102c includes a program counter (PC) 102g and a processor status register (P
SW) 102f is saved to the deepest position of the stack memory 104 as shown in FIG.

【0051】割込みハンドラの先頭では、図6に示され
た有効レジスタ情報を状態レジスタ102eから獲得
し、有効レジスタの内容をストアする命令VALID_
STOREが実行される。次に、VALID_STOR
Eが有効レジスタストア命令デコード部702dでデコ
ードされると、有効レジスタ情報獲得部703cで有効
レジスタ情報を状態レジスタ(RVSR)102eより
獲得する。ここでは、状態レジスタ(RVSR)102
eの内容を下位ビットより1ビットずつ獲得して、論理
値「1」が設定されていた場合には、有効レジスタ内容
退避部703dにより、獲得したビットに該当するレジ
スタの内容をスタックメモリ104にストアする。
At the beginning of the interrupt handler, the valid register information shown in FIG. 6 is obtained from the status register 102e and the instruction VALID_ for storing the contents of the valid register is obtained.
STORE is executed. Next, VALID_STOR
When E is decoded by the valid register store instruction decoding unit 702d, the valid register information acquiring unit 703c acquires valid register information from the status register (RVSR) 102e. Here, the status register (RVSR) 102
e, the content of the register corresponding to the acquired bit is stored in the stack memory 104 by the valid register content saving unit 703d when the logical value “1” is set by acquiring the content of the bit from the lower bit one by one. Store.

【0052】レジスタ内容のストア順序は、d0、d
1、d2、d3、a0、a1、a2、a3であるとし
て、全てのレジスタ102dがスタックメモリ104に
退避された場合には8サイクルを要する。獲得したビッ
トが論理値「0」であった場合には、これら一連の退避
操作を行うサイクルは発生しない。
The order of storing the register contents is d0, d
Assuming that 1, 2, d3, a0, a1, a2, and a3, all the registers 102d are saved in the stack memory 104, and eight cycles are required. If the acquired bit has the logical value "0", no cycle occurs in which a series of these save operations are performed.

【0053】本実施形態では、図8に示すように、レジ
スタd1、d2、d3、a0、a2の内容のみがスタッ
クメモリ104に退避されるので、5サイクルを要する
ことになり、全レジスタ102dを退避するのに比べ
て、3サイクル分処理スピードが速くなることになる。
In this embodiment, as shown in FIG. 8, only the contents of the registers d1, d2, d3, a0, and a2 are saved in the stack memory 104, so that five cycles are required. The processing speed is increased by three cycles as compared with the evacuation.

【0054】有効レジスタストア命令VALID_ST
OREによって、有効レジスタがスタックメモリ104
に退避された後、図8に示すように、最後に状態レジス
タ(RVSR)102eの内容がスタックメモリ104
に退避される。なお、割込み許可命令(INT_PER
MIT)がデコードされても、制御部102cにおいて
割込みを認識しなかった場合には、上記の有効レジスタ
情報の保持操作は行われない。
Valid register store instruction VALID_ST
The ORE causes the valid register to be
8, the contents of the status register (RVSR) 102e are finally stored in the stack memory 104, as shown in FIG.
Evacuated to Note that an interrupt enable instruction (INT_PER
Even if the MIT) is decoded, if the control unit 102c does not recognize the interrupt, the operation of holding the valid register information is not performed.

【0055】次に、割込みハンドラの出口すなわち、割
込み復帰命令(RTI)直前で、図6に示すように、有
効レジスタ情報を状態レジスタ(RVSR)102eか
ら獲得し、有効レジスタの内容をスタックメモリ104
から復帰する有効レジスタロード命令VALID_LO
ADが実行される。
Next, at the exit of the interrupt handler, that is, immediately before the interrupt return instruction (RTI), as shown in FIG. 6, the valid register information is obtained from the status register (RVSR) 102e, and the contents of the valid register are obtained from the stack memory 104.
Valid register load instruction VALID_LO returning from
AD is executed.

【0056】有効レジスタロード命令VALID_LO
ADが有効レジスタロード命令デコード部702eでデ
コードされると、有効レジスタ情報獲得部703cにお
いて、有効レジスタ情報を状態レジスタ(RVSR)1
02eから獲得する。ここでは、状態レジスタ(RVS
R)102eの内容を上位ビットより1ビットずつ獲得
して、論理値「1」が設定されていた場合には、有効レ
ジスタ内容復帰部703eにおいて、獲得したビットに
該当するレジスタの内容をスタックメモリ904から復
帰する。このスタックメモリ104からの復帰順序は、
退避させた場合と逆になる。また、獲得したビットが論
理値「0」であった場合には、これら一連の復帰操作を
行うサイクルは発生しない。
Valid register load instruction VALID_LO
When the AD is decoded by the valid register load instruction decoding unit 702e, the valid register information is obtained by the valid register information acquiring unit 703c in the state register (RVSR) 1.
02e. Here, the status register (RVS
R) The content of the register 102e is obtained one bit at a time from the upper bits, and if the logical value "1" is set, the contents of the register corresponding to the obtained bit are stored in the stack memory in the valid register content return unit 703e. Return from step 904. The order of return from the stack memory 104 is as follows.
It is the opposite of the evacuation. If the acquired bit has the logical value "0", no cycle for performing these series of return operations occurs.

【0057】したがって、本実施形態においては、a
2、a0、d3、d2、d1の順で復帰し、全レジスタ
102dを復帰させるのに要するサイクル8サイクルに
対して、5サイクルのみで有効なレジスタを復帰させる
ことができる。
Therefore, in this embodiment, a
The registers are restored in the order of 2, a0, d3, d2, and d1, and an effective register can be restored in only five cycles, compared with eight cycles required to restore all the registers 102d.

【0058】尚、本実施形態で用いた有効レジスタスト
ア命令(VALID_STORE)と有効レジスタロー
ド命令(VALID_LOAD)が行う処理内容を、そ
れぞれ、割込み処理命令(INT_PERMIT)と割
込み復帰命令(RTI)に持たしてしまうことも可能で
ある。この場合の動作について、図10を用いて説明す
る。
The contents of processing performed by the valid register store instruction (VALID_STORE) and the valid register load instruction (VALID_LOAD) used in the present embodiment are provided in an interrupt processing instruction (INT_PERMIT) and an interrupt return instruction (RTI), respectively. It is possible that The operation in this case will be described with reference to FIG.

【0059】図10は、CPU102のパイプライン構
成の一部を示したもので、他の構成は通常のパイプライ
ンと同様である。
FIG. 10 shows a part of the pipeline configuration of the CPU 102, and the other configuration is the same as that of a normal pipeline.

【0060】図10において、1001は命令フェッチ
ユニット、1002はデコードユニット、1003は実
行ユニットである。
In FIG. 10, 1001 is an instruction fetch unit, 1002 is a decode unit, and 1003 is an execution unit.

【0061】デコードユニット802は、通常命令デコ
ード部1002aと、割込み許可命令(INT_PER
MIT)デコード部1002bと、有効レジスタデコー
ド部1002cと、割込み復帰命令(RTI)デコード
部1002dとからなる。
The decode unit 802 includes a normal instruction decode unit 1002a and an interrupt enable instruction (INT_PER).
It comprises an MIT) decoding unit 1002b, a valid register decoding unit 1002c, and an interrupt return instruction (RTI) decoding unit 1002d.

【0062】実行ユニット803は、通常命令実行部1
003aと、有効レジスタ情報退避部1003bと、有
効レジスタ情報獲得部1003cと、有効レジスタ内容
退避部1003dと、有効レジスタ内容復帰部1003
eとからなる。
The execution unit 803 includes the normal instruction execution unit 1
003a, a valid register information saving unit 1003b, a valid register information acquiring unit 1003c, a valid register contents saving unit 1003d, and a valid register contents restoring unit 1003.
e.

【0063】次に、このようにパイプライン構成された
CPU102の動作について説明する。
Next, the operation of the CPU 102 having such a pipeline configuration will be described.

【0064】まず、割込み許可命INT_PERMIT
が割込み許可命令デコード部1002bでデコードさ
れ、制御部102cが、割込みがあることを認識する
と、有効レジスタデコード部1002cにより有効レジ
スタ情報を得て、有効レジスタ情報退避部1003bに
より、有効レジスタ情報を状態レジスタ(RVSR)1
02eに退避する。次に、有効レジスタ内容退避部10
03dにより、有効レジスタ情報に基づいて有効なレジ
スタの内容をスタックメモリ1004に退避し、ハンド
ラに分岐する。なお、割込み許可命令INT_PERM
ITは割込みがない場合には、退避も分岐も行わない。
First, an interrupt permission instruction INT_PERMIT
Is decoded by the interrupt enable instruction decoding unit 1002b, and when the control unit 102c recognizes that there is an interrupt, the valid register information is obtained by the valid register decoding unit 1002c and the valid register information is saved by the valid register information saving unit 1003b. Register (RVSR) 1
Save to 02e. Next, the valid register contents saving unit 10
According to 03d, the contents of the valid registers are saved in the stack memory 1004 based on the valid register information, and the process branches to the handler. Note that the interrupt enable instruction INT_PERM
The IT does not save or branch if there is no interrupt.

【0065】また、割込み復帰命令(RTI)が割込み
復帰命令デコード部1002dでデコードされた場合、
有効レジスタ情報獲得部1003cにより、状態レジス
タ(RVSR)102eに設定された有効レジスタ情報
を読み出し、有効レジスタ情報を獲得する。続いて、有
効レジスタ内容復帰部1003eにより、有効レジスタ
の内容がスタックメモリ1004から復帰されてハンド
ラから戻りアドレスに分岐する。
When the interrupt return instruction (RTI) is decoded by the interrupt return instruction decoding unit 1002d,
The valid register information acquisition unit 1003c reads the valid register information set in the status register (RVSR) 102e, and acquires the valid register information. Subsequently, the contents of the valid registers are returned from the stack memory 1004 by the valid register contents return unit 1003e, and the handler branches to the return address.

【0066】[0066]

【発明の効果】以上説明したように、本発明によれば、
レジスタが有効であるか否かの情報を用いて、割込みを
許可するか否かの情報をもつ命令を、退避させるべきレ
ジスタの最も少ないポイントでデコードすることで、よ
り高速に割込み処理を行うことができるという効果を奏
する。
As described above, according to the present invention,
Using the information on whether the register is valid or not, decode the instruction with the information on whether to enable the interrupt at the point where the register to be saved is the least, and perform the interrupt processing faster. This has the effect that it can be performed.

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

【図1】 本発明の一実施形態による情報処理装置の概
略構成を示す図
FIG. 1 is a diagram showing a schematic configuration of an information processing apparatus according to an embodiment of the present invention;

【図2】 図1のソースファイル101aの内容を機械
語命令列で模式的に示す図
FIG. 2 is a diagram schematically showing the contents of a source file 101a in FIG. 1 in a machine language instruction sequence.

【図3】 図1のコンパイラ101bによる有効レジス
タの情報を判定する手順を示すフローチャート
FIG. 3 is a flowchart showing a procedure of determining valid register information by a compiler 101b in FIG. 1;

【図4】 図3の判定手順の結果得られた有効レジスタ
情報テーブルを示す図
FIG. 4 is a view showing an effective register information table obtained as a result of the determination procedure of FIG. 3;

【図5】 図4の有効レジスタ情報テーブルに基づきコ
ンパイラ101bにより作成されたオブジェクトファイ
ル101cの内容を示す図
FIG. 5 is a view showing the contents of an object file 101c created by a compiler 101b based on the valid register information table of FIG.

【図6】 割込みハンドラの命令内容の一部を示す図FIG. 6 is a diagram showing a part of instruction contents of an interrupt handler.

【図7】 図1のCPU102におけるパイプライン構
成例の一部を示す図
FIG. 7 is a diagram showing a part of a pipeline configuration example in the CPU 102 of FIG. 1;

【図8】 図1の状態レジスタ102eにおける有効レ
ジスタ情報の格納方法を例示する図
FIG. 8 is a diagram illustrating a method of storing valid register information in the status register 102e of FIG. 1;

【図9】 図1のスタックメモリ104への退避内容を
模式的に示す図
9 is a diagram schematically showing the contents saved in the stack memory 104 in FIG. 1;

【図10】 図1のCPU102における他のパイプラ
イン構成例の一部を示す図
FIG. 10 is a diagram showing a part of another example of a pipeline configuration in the CPU 102 of FIG. 1;

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

101 命令生成装置 101a ソースファイル 101b コンパイラ 101c オブジェクトファイル 102 CPU 102a 命令デコード部 102b 実行部 102c 制御部 102d レジスタ 102e 状態レジスタ(RVSR) 102f プロセッサ状態レジスタ(PSW) 102g プログラムカウンタ(PC) 103 命令メモリ 104 スタックメモリ 701、1001 命令フェッチユニット 702、1002 デコーダユニット 702a、1002a 通常命令デコード部 702b、1002b 割込み許可命令(INT_PE
RMIT)デコード部 702c、1002c 有効レジスタデコード部 702d 有効レジスタストア命令(VALID_ST
ORE)デコード部 702e 有効レジスタロード命令(VALID_LO
AD)デコード部 703、1003 実行ユニット 703a、1003a 通常命令実行部 703b 有効レジスタ情報保持部 703c、1003c 有効レジスタ情報獲得部 703d、1003d 有効レジスタ内容退避部 703e、1003e 有効レジスタ内容復帰部
101 Instruction Generator 101a Source File 101b Compiler 101c Object File 102 CPU 102a Instruction Decoding Unit 102b Execution Unit 102c Control Unit 102d Register 102e Status Register (RVSR) 102f Processor Status Register (PSW) 102g Program Counter (PC) 103 Instruction Memory 104 Stack Memory 701, 1001 Instruction fetch unit 702, 1002 Decoder unit 702a, 1002a Normal instruction decode unit 702b, 1002b Interrupt enable instruction (INT_PE
RMIT) decoding unit 702c, 1002c valid register decoding unit 702d valid register store instruction (VALID_ST)
ORE) Decode section 702e Valid register load instruction (VALID_LO)
AD) decoding unit 703, 1003 execution unit 703a, 1003a normal instruction execution unit 703b effective register information holding unit 703c, 1003c effective register information acquisition unit 703d, 1003d effective register contents saving unit 703e, 1003e effective register contents restoration unit

Claims (17)

【特許請求の範囲】[Claims] 【請求項1】 命令生成装置、および少なくとも1つの
レジスタを有し前記命令生成装置で生成された命令に従
って処理を行うCPUを含む情報処理装置であって、 前記命令生成装置は、 前記CPUの前記レジスタが有効であるか否かを判定す
る手段と、 前記判定手段により得られた、前記レジスタが有効であ
るか否かの情報を前記CPUに通知するための通知手段
とを備え、 前記CPUは、 通知された前記情報を一時保持する手段と、 前記一時保持手段に保持された前記情報を退避させる第
1退避手段と、 前記一時保持手段に保持された前記情報を参照して、前
記有効なレジスタの内容を選択的に退避させる第2退避
手段とを備えたことを特徴とする情報処理装置。
1. An information processing apparatus, comprising: an instruction generation device; and a CPU having at least one register and performing processing according to an instruction generated by the instruction generation device, wherein the instruction generation device includes: Means for determining whether or not the register is valid; and notifying means for notifying the CPU of information on whether or not the register is valid, obtained by the determining means, wherein the CPU Means for temporarily holding the notified information, first evacuation means for evacuation of the information held in the temporary holding means, and the effective information with reference to the information held in the temporary holding means. An information processing apparatus comprising: a second save unit for selectively saving the contents of a register.
【請求項2】 前記CPUは、 退避させた前記情報を復帰する第1復帰手段と、 前記第1復帰手段により復帰させた前記情報を参照し
て、前記第2退避手段により退避させた有効なレジスタ
の内容を選択的に復帰させる第2復帰手段とを備えたこ
とを特徴とする請求項1記載の情報処理装置。
2. The information processing apparatus according to claim 1, wherein the CPU refers to the first return unit that restores the information that has been saved, and refers to the information that has been restored by the first return unit, and refers to the valid information that has been saved by the second save unit. 2. The information processing apparatus according to claim 1, further comprising a second restoration unit that selectively restores the contents of the register.
【請求項3】 前記通知手段は、生成された前記命令に
より前記情報をCPUに通知することを特徴とする請求
項1記載の情報処理装置。
3. The information processing apparatus according to claim 1, wherein the notifying unit notifies the CPU of the information by the generated command.
【請求項4】 前記一時保持手段は、状態レジスタに前
記レジスタに対応したビットを割り当て、前記有効なレ
ジスタに対応する前記ビットに所定の論理値を保持する
ことを特徴とする請求項1記載の情報処理装置。
4. The temporary storage unit according to claim 1, wherein the temporary storage unit allocates a bit corresponding to the register to a status register, and stores a predetermined logical value in the bit corresponding to the valid register. Information processing device.
【請求項5】 前記第2退避手段は、前記情報が保持さ
れた状態レジスタから前記レジスタに対応するビットを
1ビットずつ参照し、前記参照した1ビットの情報が所
定の論理値であった場合にのみ、該当するレジスタの内
容をスタックメモリに退避させることを特徴とする請求
項1記載の情報処理装置。
5. The second evacuation unit refers to a bit corresponding to the register from a status register holding the information one bit at a time, and when the referenced one-bit information is a predetermined logical value. 2. The information processing apparatus according to claim 1, wherein the contents of the corresponding register are saved only in the stack memory.
【請求項6】 前記第2復帰手段は、前記第1復帰手段
によりスタックメモリから復帰させた前記情報が保持さ
れた状態レジスタから前記レジスタに対応するビットを
1ビットずつ参照し、前記参照した1ビットの情報が所
定の論理値であった場合にのみ、該当するレジスタの内
容を前記スタックメモリから復帰させることを特徴とす
る請求項2記載の情報処理装置。
6. The second return means refers to a bit corresponding to the register from the status register holding the information restored from the stack memory by the first return means one bit at a time, and 3. The information processing apparatus according to claim 2, wherein the content of the corresponding register is restored from the stack memory only when the bit information has a predetermined logical value.
【請求項7】 少なくとも1つのレジスタを有し、特定
の命令を実行したときのみ割込みを受け付けるCPUを
含む情報処理装置であって、 前記CPUの前記レジスタが有効であるか否かを判定す
る手段と、 前記判定手段により得られた、前記レジスタが有効であ
るか否かの情報を前記CPUに命令によって通知するた
めの通知手段と、 前記通知手段により通知された前記情報が有効である間
に前記命令を実行することで割込みを許可する手段と、 前記命令を前記レジスタの有効である数が最も少ない位
置に配置する手段とを備えたことを特徴とする情報処理
装置。
7. An information processing apparatus including a CPU having at least one register and accepting an interrupt only when a specific instruction is executed, and determining whether or not the register of the CPU is valid. Notification means for notifying the CPU of information on whether the register is valid obtained by the determination means to the CPU by an instruction; and while the information notified by the notification means is valid. An information processing apparatus, comprising: means for permitting an interrupt by executing the instruction; and means for arranging the instruction at a position in the register where the number of effective registers is the smallest.
【請求項8】 前記情報処理装置は、 前記命令が割込みを受け付けた場合にのみ、前記レジス
タが有効か否かの情報を一時保持する手段と、 前記一時保持手段に保持された前記情報を退避させる第
1待避手段と、 前記一時保持手段に保持された前記情報を参照して、前
記有効なレジスタの内容を選択的に退避させる第2待避
手段とを備えたことを特徴とする請求項7記載の情報処
理装置。
8. The information processing apparatus, comprising: means for temporarily holding information on whether the register is valid only when the instruction accepts an interrupt; and saving the information held by the temporary holding means. 8. A system according to claim 7, further comprising: a first shunting unit for causing the contents of the valid register to be selectively saved by referring to the information held in the temporary holding unit. An information processing apparatus according to claim 1.
【請求項9】 生成された命令に従って、少なくとも1
つのレジスタを有するCPUを用いて処理を行う情報処
理方法であって、 前記CPUの前記レジスタが有効であるか否かを判定
し、 前記判定により得られた、前記レジスタが有効であるか
否かの情報を前記CPUに通知し、 前記CPUにおいて、通知された前記情報を一時保持
し、 一時保持した前記情報を退避させ、 一時保持した前記情報を参照して前記有効なレジスタの
内容を選択的に退避させることを特徴とする情報処理方
法。
9. According to the generated instructions, at least one
An information processing method for performing processing using a CPU having two registers, the method comprising: determining whether the register of the CPU is valid; and determining whether the register obtained by the determination is valid. To the CPU, the CPU temporarily holds the notified information, saves the temporarily held information, and selectively refers to the temporarily held information to select the contents of the valid register. An information processing method characterized by evacuating to a computer.
【請求項10】 前記情報処理方法はさらに、退避させ
た前記情報を復帰させ、復帰させた前記情報を参照して
前記有効なレジスタの内容を選択的に復帰させることを
特徴とする請求項9記載の情報処理方法。
10. The information processing method according to claim 9, further comprising restoring the saved information, and selectively restoring the contents of the valid register by referring to the restored information. The information processing method described.
【請求項11】 前記情報の通知は、前記生成された命
令により行うことを特徴とする請求項9記載の情報処理
方法。
11. The information processing method according to claim 9, wherein the notification of the information is performed by the generated instruction.
【請求項12】 前記情報の一時保持は、状態レジスタ
に前記レジスタに対応したビットを割り当て、前記有効
なレジスタに対応する前記ビットに所定の論理値を保持
させることで行うことを特徴とする請求項9記載の情報
処理方法。
12. The temporary holding of the information is performed by allocating a bit corresponding to the register to a status register and holding a predetermined logical value in the bit corresponding to the valid register. Item 10. The information processing method according to Item 9.
【請求項13】 前記有効なレジスタ内容の選択的退避
は、前記情報が保持された状態レジスタから前記レジス
タに対応するビットを1ビットずつ参照し、参照した1
ビットの情報が所定の論理値であった場合にのみ、該当
するレジスタの内容をスタックメモリに退避させること
で行うことを特徴とする請求項9記載の情報処理方法。
13. The method of selectively saving the contents of a valid register is performed by referring to a bit corresponding to the register from a status register holding the information one bit at a time, and
10. The information processing method according to claim 9, wherein the method is performed by saving the contents of a corresponding register to a stack memory only when the bit information has a predetermined logical value.
【請求項14】 前記有効なレジスタ内容の選択的復帰
は、復帰させた前記情報が保持された状態レジスタから
前記レジスタに対応するビットを1ビットずつ参照し、
前記参照した1ビットの情報が所定の論理値であった場
合にのみ、該当するレジスタの内容をスタックメモリか
ら復帰させることで行うことを特徴とする請求項10記
載の情報処理方法。
14. The method of selectively restoring valid register contents refers to a bit corresponding to the register from a state register in which the restored information is held, one bit at a time,
11. The information processing method according to claim 10, wherein the method is performed by restoring the contents of the corresponding register from the stack memory only when the referenced one-bit information is a predetermined logical value.
【請求項15】 少なくとも1つのレジスタを有し、特
定の命令を実行したときのみ割込みを受け付けるCPU
を用いて処理を行う情報処理方法であって、 前記CPUの前記レジスタが有効であるか否かを判定
し、 前記判定により得られた、前記レジスタが有効であるか
否かの情報を前記CPUに命令によって通知し、 前記CPUにおいて、通知された前記情報が有効である
間に前記命令を実行することで割込みを許可し、 前記命令を前記レジスタの有効である数が最も少ない位
置に配置することを特徴とする情報処理方法。
15. A CPU having at least one register and receiving an interrupt only when a specific instruction is executed.
An information processing method for performing processing by using the CPU, wherein it is determined whether the register of the CPU is valid, and the information obtained as a result of the determination whether the register is valid is used by the CPU. In the CPU, the interrupt is permitted by executing the instruction while the notified information is valid, and the instruction is arranged at a position in the register where the valid number is the smallest. An information processing method, comprising:
【請求項16】 前記情報処理方法はさらに、 前記割込みを受け付けた場合にのみ、前記情報を一時保
持し、 一時保持した前記情報を退避させ、 一時保持した前記情報を参照して前記有効なレジスタの
内容を選択的に退避させることを特徴とする請求項15
記載の情報処理方法。
16. The information processing method further comprises: temporarily storing the information only when the interrupt is received; saving the temporarily stored information; and referencing the temporarily stored information to the valid register. 16. The method according to claim 15, wherein the contents of the contents are selectively saved.
The information processing method described.
【請求項17】 請求項1記載の情報処理装置における
命令生成装置により生成された命令列を記憶することを
特徴とする記録媒体。
17. A recording medium storing an instruction sequence generated by the instruction generation device in the information processing device according to claim 1.
JP2000332050A 2000-10-31 2000-10-31 Information processing device and method Pending JP2002140199A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000332050A JP2002140199A (en) 2000-10-31 2000-10-31 Information processing device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000332050A JP2002140199A (en) 2000-10-31 2000-10-31 Information processing device and method

Publications (1)

Publication Number Publication Date
JP2002140199A true JP2002140199A (en) 2002-05-17

Family

ID=18808306

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000332050A Pending JP2002140199A (en) 2000-10-31 2000-10-31 Information processing device and method

Country Status (1)

Country Link
JP (1) JP2002140199A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007304926A (en) * 2006-05-12 2007-11-22 Matsushita Electric Ind Co Ltd Information processing method and instruction generation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007304926A (en) * 2006-05-12 2007-11-22 Matsushita Electric Ind Co Ltd Information processing method and instruction generation method
US7865706B2 (en) 2006-05-12 2011-01-04 Panasonic Corporation Information processing method and instruction generating method

Similar Documents

Publication Publication Date Title
JP3499252B2 (en) Compiling device and data processing device
US6931635B2 (en) Program optimization
US6230259B1 (en) Transparent extended state save
US7574588B2 (en) Time-multiplexed speculative multi-threading to support single-threaded applications
RU98113914A (en) METHOD AND DEVICE FOR PERFORMING MOBILE COMMANDS AND PACKED DATA USING A SINGLE REGISTER FILE
JPH0242569A (en) Context switching method and apparatus used for vector processing system
JP2002532775A (en) Interpreter program execution method
CN111133418A (en) Allowing non-aborted transactions after an exception mask update instruction
JPH06309178A (en) Method and computer system for processing interruption by interruption processing cord
US6453463B1 (en) Method and apparatus for providing finer marking granularity for fields within objects
EP0720087A1 (en) Apparatus and method for a memory extension stack in a data processing system
JP2002140199A (en) Information processing device and method
Kawano et al. Fine-grain multi-thread processor architecture for massively parallel processing
JPH08161169A (en) Vliw type computer system and method for interpreting/ executing vliw
CA1304823C (en) Apparatus and method for synchronization of arithmetic exceptions in central processing units having pipelined execution units simultaneously executing instructions
JP6882320B2 (en) Vector instruction processing
EP1393162A2 (en) Method and system for tracking and recycling physical register assignment
JPH0668725B2 (en) Device for responding to interrupt condition in data processing system and method for responding to asynchronous interrupt condition
US6604193B1 (en) Processor in which register number translation is carried out
US6862679B2 (en) Synchronization of load operations using load fence instruction in pre-serialization/post-serialization mode
US5579495A (en) Information processing in which a simulation of parallelism is achieved
EP3462308B1 (en) Transaction nesting depth testing instruction
JP2007304926A (en) Information processing method and instruction generation method
JP3739556B2 (en) Information processing device
JP2932812B2 (en) Language processing program execution device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040402

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040907

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041104

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050502

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050512

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050531

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20051014