JP2000089954A - Information processor - Google Patents

Information processor

Info

Publication number
JP2000089954A
JP2000089954A JP10256703A JP25670398A JP2000089954A JP 2000089954 A JP2000089954 A JP 2000089954A JP 10256703 A JP10256703 A JP 10256703A JP 25670398 A JP25670398 A JP 25670398A JP 2000089954 A JP2000089954 A JP 2000089954A
Authority
JP
Japan
Prior art keywords
exception
information
exception information
instruction
execution path
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.)
Withdrawn
Application number
JP10256703A
Other languages
Japanese (ja)
Inventor
Atsuhiro Suga
敦浩 須賀
Takuya Iwata
卓也 岩田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP10256703A priority Critical patent/JP2000089954A/en
Publication of JP2000089954A publication Critical patent/JP2000089954A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an information processor capable of surely executing exceptional processing for exceptional information generated by an instruction executed speculatively without depending upon a register resource in a CPU and reducing the throughput of the CPU by using comparatively inexpensive constitution. SOLUTION: In the information processor, a CPU 10 constituting an arithmetic processing unit is provided with an exception detector 11 constituting an exception detecting means, an exception canceling device 12 or a pass storing register R3 constituting an exceptional information invalidating means, an exception processor 13 constituting an exception processing means, and an exception address control part 14 constituted of an exceptional information start address register R1 and an exceptional information stack pointer register R2 and an external memory 20 constituting an external storage device is provided with an exceptional information storing device 21 constituting an exceptional information storing means.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、情報処理装置に関
し、特に、例外処理機能を有する計算機等に適用して良
好な情報処理装置に関する。現在のコンピュータシステ
ムは、一度に実行できる命令、すなわち命令レベルの並
列度を上げることにより処理性能の向上を図っている。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus, and more particularly, to a good information processing apparatus applied to a computer having an exception handling function. Current computer systems attempt to improve processing performance by increasing the number of instructions that can be executed at a time, that is, instruction level parallelism.

【0002】命令レベルの並列度は、コンパイラにより
一度に最適化が行える命令(ベーシックブロック)の数に
依存するが、ベーシックブロック内の命令数を増加させ
る手法として、「命令の投機的な実行処理」が知られて
いる。「命令の投機的な実行処理」とは、演算処理を実
行する上で、実行順序の制約を実質的に受けない命令を
任意のタイミングで「投機的に」実行することをいい、
このような命令の投機的な実行により、レイテンシの大
きい命令の先行実行と最適化できる命令数を増加させる
ことができるため、命令レベルの並列度を向上させて、
処理性能の向上を図ることができる。
The degree of instruction-level parallelism depends on the number of instructions (basic blocks) that can be optimized at once by a compiler. To increase the number of instructions in a basic block, a technique called "speculative execution processing of instructions" is used. "It has been known. "Speculative execution of instructions" refers to "speculatively" executing instructions that are not substantially restricted by the execution order at an arbitrary timing in performing arithmetic processing.
By speculative execution of such an instruction, it is possible to increase the number of instructions that can be optimized with the advance execution of an instruction having a large latency.
Processing performance can be improved.

【0003】ところで、汎用のプロセッサで投機的に命
令を実行する場合、例外が発生する可能性がある命令に
対しては、実行パスが確定する前に投機的に実行した命
令の例外処理を行なうことができないため、例外処理を
抑止(禁止)し、実行パスが確定した後に例外処理を実
行する方法が採用されている。そして、投機的に実行し
た複数の命令で例外が発生した場合には、それぞれの命
令の例外情報を確保するレジスタが必要となる。このレ
ジスタ資源により投機的に実行できる命令数が決定され
る。
When an instruction is speculatively executed by a general-purpose processor, exception processing of an instruction speculatively executed before an execution path is determined is performed for an instruction that may cause an exception. Therefore, a method is adopted in which exception processing is suppressed (prohibited) and the exception processing is executed after the execution path is determined. When an exception occurs in a plurality of speculatively executed instructions, a register for securing exception information of each instruction is required. The number of instructions that can be executed speculatively is determined by the register resources.

【0004】[0004]

【従来の技術】従来の例外処理機能を有するプロセッサ
(演算処理装置:以下、CPUという)の概略構成につ
いて、図8を参照して説明する。図8に示すように、C
PU10´内部で実現される例外処理機能は、大別し
て、例外検出装置11、例外キャンセル装置12、例外
処理装置13及び例外情報格納レジスタ15により実現
される。
2. Description of the Related Art A schematic configuration of a conventional processor (arithmetic processing unit: hereinafter referred to as a CPU) having an exception handling function will be described with reference to FIG. As shown in FIG.
The exception handling function realized inside the PU 10 ′ is roughly realized by the exception detection device 11, the exception cancellation device 12, the exception handling device 13, and the exception information storage register 15.

【0005】例外検出装置11は、投機的に実行した命
令において、発生した例外を検出し、CPU10´の内
部レジスタに設けられた例外情報格納レジスタ15の所
定のアドレスに格納する。例外キャンセル装置12は、
例外情報格納レジスタ15に格納された例外情報のう
ち、実行パス上にない投機的に実行した命令の例外情報
を、無効化(キャンセル)する処理を行う。
The exception detector 11 detects an exception that has occurred in an instruction executed speculatively, and stores the exception in a predetermined address of an exception information storage register 15 provided in an internal register of the CPU 10 '. The exception cancellation device 12
A process of invalidating (cancelling) the exception information of the speculatively executed instruction that is not on the execution path among the exception information stored in the exception information storage register 15 is performed.

【0006】また、例外処理装置13は、例外情報格納
レジスタ15に格納された例外情報のうち、実行パス上
の投機的に実行した命令の例外情報を、読み出して所定
の例外処理を実行する。具体的な例外処理動作につい
て、図9のタイミングチャートを参照して説明する。
The exception handling device 13 reads out exception information of an instruction speculatively executed on an execution path from among the exception information stored in the exception information storage register 15 and executes a predetermined exception process. A specific exception handling operation will be described with reference to the timing chart of FIG.

【0007】図9において、CLKは例外処理の動作ク
ロック、COM1は投機的に実行した命令、COM2は
実行バスを確定する命令、COM3は例外情報を読み出
す命令である。各命令COM1、COM2、COM3
は、それぞれ動作クロックCLKに同期するフェッチ
(Fetch)、デコード(Decode)、命令実行(Execut
e)、書き込み(Write)の周知の手順に基づいて実行さ
れる。
In FIG. 9, CLK is an operation clock for exception processing, COM1 is an instruction executed speculatively, COM2 is an instruction for determining an execution bus, and COM3 is an instruction for reading exception information. Each instruction COM1, COM2, COM3
Are fetch (Fetch), decode (Decode), and instruction execution (Execut) synchronized with the operation clock CLK, respectively.
e), which is executed based on a well-known procedure of writing.

【0008】図9に示すように、投機的に実行した命令
COM1において、例外検出装置11が例外の発生を検
出すると、例外処理が抑止又は禁止され、動作クロック
CLKのタイミングT04、すなわち書き込みタイミング
でCPU10´内部の例外情報格納レジスタ15に例外
情報が格納される。ここで、例外の発生が検出されると
例外処理が抑止又は禁止されるのは、実行パスが確定す
る前においては、投機的に実行した命令について例外処
理を行うことができないためである。
As shown in FIG. 9, when the exception detector 11 detects the occurrence of an exception in the speculatively executed instruction COM1, the exception processing is suppressed or prohibited, and the timing T 04 of the operation clock CLK, ie, the write timing Then, the exception information is stored in the exception information storage register 15 inside the CPU 10 '. Here, the reason why the exception processing is suppressed or prohibited when the occurrence of the exception is detected is that the exception processing cannot be performed on the speculatively executed instruction before the execution path is determined.

【0009】次いで、実行パス確定命令COM2により
実行パスが確定した後、例外情報格納レジスタ15に格
納された例外情報のうち、実行パス上になく、投機的に
実行した命令の例外情報については、動作クロックCL
KのタイミングT14、すなわち書き込みタイミングで例
外キャンセル装置12によりキャンセルされる。一方、
実行パスが確定した後、例外情報格納レジスタ15に格
納された例外情報のうち、実行パス上にある、投機的に
実行した命令の例外情報については、動作クロックCL
KのタイミングT24、すなわち書き込みタイミングで例
外情報読み出し命令COM3により読み出され(取得さ
れ)、例外処理装置13により所定の例外処理が実行さ
れる。
Next, after the execution path is determined by the execution path determination instruction COM2, of the exception information stored in the exception information storage register 15, the exception information of the instruction that is not on the execution path but is speculatively executed is: Operation clock CL
K timing T 14, that is canceled by the exception cancellation device 12 at the write timing. on the other hand,
After the execution path is determined, among the exception information stored in the exception information storage register 15, for the exception information of the speculatively executed instruction on the execution path, the operation clock CL is used.
At the timing T 24 of K, that is, at the write timing, the exception information is read (acquired) by the exception information read command COM3, and the exception processing device 13 executes a predetermined exception process.

【0010】[0010]

【発明が解決しようとする課題】上述したような例外処
理機能を有する情報処理装置においては、実行パスが確
定する前に、複数の命令を投機的に実行した場合、それ
ぞれの命令毎に例外情報をCPU内部のレジスタに格納
する必要があるため、CPU外部に設けられる外部メモ
リに比較して高価なCPU内部のレジスタが例外情報に
より占有され、CPUの処理性能の改善を図ることがで
きないという問題を有しているとともに、投機的に実行
する命令の数に応じてレジスタの容量を増設しなければ
ならないという問題を有していた。
In an information processing apparatus having an exception handling function as described above, if a plurality of instructions are speculatively executed before an execution path is determined, exception information is provided for each instruction. Need to be stored in a register inside the CPU, the exceptional information occupies a register inside the CPU which is more expensive than an external memory provided outside the CPU, and the processing performance of the CPU cannot be improved. In addition, there is a problem that the capacity of the register must be increased according to the number of instructions to be executed speculatively.

【0011】本発明は、上述した問題を解決し、投機的
に実行した命令において発生した例外情報を、CPU内
部のレジスタ資源に依存することなく、比較的安価な構
成でかつCPUの処理能力を低下させることなく、確実
に例外処理することができる情報処理装置を提供するこ
とを目的としている。
[0011] The present invention solves the above-described problem, and enables exception information generated in an instruction executed speculatively to have a relatively inexpensive configuration and to reduce the processing power of the CPU without depending on register resources inside the CPU. An object of the present invention is to provide an information processing apparatus capable of reliably performing exception processing without lowering.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明は、実行パスが確定する前に、
投機的に実行した命令に発生した例外を検出する例外検
出手段と、少なくとも前記例外に関する情報を所定のア
ドレスに格納する例外情報格納手段と、前記実行パス確
定後に、前記例外情報格納手段に格納された例外情報の
うち、前記実行パス上の前記投機的に実行した命令に発
生した例外情報を読み出し、例外処理を実行する例外処
理手段と、前記実行パス確定後に、前記例外情報格納手
段に格納された例外情報のうち、前記実行パス上にな
く、前記投機的に実行した命令に発生した例外情報を無
効化する例外情報無効化手段と、を具備する情報処理装
置において、前記例外検出手段、前記例外処理手段及び
前記例外無効化手段は、同一の演算処理装置内に設けら
れ、かつ、前記例外情報格納手段は、前記演算処理部外
の所定の外部記憶装置内に設けられ、前記演算処理装置
は、前記例外情報無効化手段に保持された、前記例外情
報に対応する前記実行パスに関する情報に基づいて、前
記例外情報の有効/無効を判別し、前記例外処理の実行
を制御することを特徴としている。
In order to achieve the above object, according to the first aspect of the present invention, before the execution path is determined,
Exception detecting means for detecting an exception that has occurred in the speculatively executed instruction; exception information storing means for storing at least information on the exception at a predetermined address; and storing the exception information in the exception information storing means after the execution path is determined. Exception information generated in the speculatively executed instruction on the execution path from among the exception information, and exception processing means for executing exception processing, and after the execution path is determined, stored in the exception information storage means. An exception information invalidating means for invalidating exception information generated on the speculatively executed instruction, which is not on the execution path, of the exception information, The exception processing means and the exception invalidating means are provided in the same arithmetic processing device, and the exception information storage means is provided in a predetermined external storage device outside the arithmetic processing unit. Wherein the arithmetic processing unit determines whether the exception information is valid / invalid based on information on the execution path corresponding to the exception information held by the exception information invalidating means, and It is characterized in that execution of processing is controlled.

【0013】また、請求項2記載の発明は、請求項1記
載の情報処理装置において、前記外部記憶装置は、前記
演算処理装置外に設けられたキャッシュメモリであっ
て、前記キャッシュメモリは、通常のメモリデータのコ
ピー又は前記例外情報を保持するデータ格納部と、該デ
ータ格納部に保持された情報に対応し、少なくとも該情
報の内容を判別するフラグビットを保持するタグ格納部
と、を有し、前記フラグビットに基づいて、前記データ
格納部に保持された情報を判別し、前記例外情報が保持
されている場合には、前記キャッシュメモリへのデータ
の読み出し及び書き込み動作を禁止することを特徴とし
ている。
According to a second aspect of the present invention, in the information processing apparatus according to the first aspect, the external storage device is a cache memory provided outside the arithmetic processing unit, and the cache memory is normally A data storage unit for holding a copy of the memory data or the exception information, and a tag storage unit corresponding to the information held in the data storage unit and holding at least a flag bit for determining the content of the information. Determining information held in the data storage unit based on the flag bit, and prohibiting data read and write operations to the cache memory when the exception information is held. Features.

【0014】さらに、請求項3記載の発明は、請求項1
記載の情報処理装置において、前記外部記憶装置は、前
記演算処理装置外に設けられた大容量のメモリ装置であ
って、前記演算処理装置と前記メモリ装置との間に、前
記例外検出手段により検出され、前記メモリ装置に格納
される前記例外情報のアドレスを、論理アドレスから物
理アドレスに変換するアドレス変換手段を有しているこ
とを特徴とする特徴としている。
Further, the invention described in claim 3 is the invention according to claim 1.
The information processing apparatus according to claim 1, wherein the external storage device is a large-capacity memory device provided outside the arithmetic processing device, and the external storage device is detected by the exception detection means between the arithmetic processing device and the memory device. And an address conversion means for converting the address of the exception information stored in the memory device from a logical address to a physical address.

【0015】このような構成の情報処理装置によれば、
投機的に実行した命令に例外が発生した場合、CPU
(演算処理装置)内部のレジスタに対して比較的安価な
キャッシュメモリあるいは大容量の主記憶装置(メモリ
装置)等の外部メモリ(外部記憶装置)内に、ハードウ
ェアにより例外情報を退避、格納し、投機的に実行した
命令の実行パスが確定後、例外情報を含む実行パスに関
する情報に基づいて、実際に実行すべき命令に対して、
外部メモリに格納された例外情報がソフトウェアにより
読み出され、例外処理が実行され、一方、実行すべきで
ない命令に対しては、例外情報がキャンセルされる。
According to the information processing apparatus having such a configuration,
When an exception occurs in a speculatively executed instruction, the CPU
(Operation processing unit) Exception information is saved and stored in hardware in an external memory (external storage device) such as a relatively inexpensive cache memory or a large-capacity main storage device (memory device) for internal registers. After the execution path of the speculatively executed instruction is determined, based on the information on the execution path including the exception information, for the instruction to be actually executed,
The exception information stored in the external memory is read out by software, and exception processing is executed. On the other hand, for instructions that should not be executed, the exception information is canceled.

【0016】ここで、CPU内部に設けられたレジスタ
容量に比較してキャッシュメモリ等の外部メモリの容量
は、一般に十分に大きいため、投機的に実行した複数の
命令で例外が発生した場合でも、これら全ての例外情報
が格納される。したがって、図8に示したように、投機
的に実行した命令において発生した例外情報を、CPU
内部のレジスタに格納する従来の構成に比較して、比較
的安価な構成で、かつ、CPUの処理能力を低下させる
ことなく、投機的に実行した複数の命令で例外が発生し
た場合においても、各々の例外を確実に処理することが
できる。
Here, since the capacity of an external memory such as a cache memory is generally sufficiently large as compared with the capacity of a register provided inside the CPU, even if an exception occurs due to a plurality of speculatively executed instructions, All these exception information are stored. Therefore, as shown in FIG. 8, the exception information generated in the speculatively executed instruction is
Compared to the conventional configuration of storing in an internal register, the configuration is relatively inexpensive, and even if an exception occurs in a plurality of speculatively executed instructions without lowering the processing capability of the CPU, Each exception can be reliably handled.

【0017】(基本構成)本発明に係る情報処理装置の
基本構成について、図1を参照して説明する。図1に示
すように、本発明に係る情報処理装置は、演算処理装置
を構成するCPU10内部に、例外検出手段を構成する
例外検出装置11と、例外情報無効化手段を構成する例
外キャンセル装置12又はパス格納レジスタR3と、例
外処理手段を構成する例外処理装置13と、例外情報ス
タートアドレスレジスタ(以下、スタートアドレスレジ
スタという)R1及び例外情報スタックポインタレジス
タ(以下、スタックポインタレジスタという)R2から
構成される例外アドレス制御部14と、を有し、一方、
外部記憶装置を構成する外部メモリ20内部には、例外
情報格納手段を構成する例外情報保持装置21を有して
いる。
(Basic Configuration) The basic configuration of the information processing apparatus according to the present invention will be described with reference to FIG. As shown in FIG. 1, an information processing apparatus according to the present invention includes, in a CPU 10 constituting an arithmetic processing unit, an exception detecting apparatus 11 constituting an exception detecting means and an exception canceling apparatus 12 constituting an exception information invalidating means. Or, it is composed of a path storage register R3, an exception processing device 13 constituting an exception processing means, an exception information start address register (hereinafter, referred to as a start address register) R1, and an exception information stack pointer register (hereinafter, a stack pointer register) R2. And an exception address control unit 14
An exception information holding device 21 that constitutes exception information storage means is provided inside the external memory 20 that constitutes the external storage device.

【0018】そして、例外検出装置11は、命令パスが
確定する前に、投機的に実行した命令において発生した
例外を検出し、外部メモリ20内部に画定された所定の
メモリ空間を例外情報保持装置21として、所定のアド
レスに例外情報として格納する。例外キャンセル装置1
2は、実行パス確定後、例外情報保持装置21に格納さ
れた例外情報のうち、実行パス上にない投機的に実行し
た命令の例外情報を、無効化(キャンセル)する処理を
行う。
Before the instruction path is determined, the exception detection device 11 detects an exception that has occurred in the speculatively executed instruction and stores a predetermined memory space defined in the external memory 20 into the exception information holding device. 21 as exception information at a predetermined address. Exception cancellation device 1
After the execution path is determined, the processing 2 invalidates (cancels) the exception information of the speculatively executed instruction that is not on the execution path among the exception information stored in the exception information holding device 21.

【0019】ここで、例外情報の無効化の手法として、
上述したように例外情報保持装置に格納された例外情報
をキャンセルする方法の他に、パス格納レジスタR3に
予め実行パスの有効/無効に関する情報を格納してお
き、例外処理に先立つ例外情報の読み出し時に、該実行
パスに関する情報に基づいて無効なパスの例外情報につ
いては例外処理を実行しないようにする(非実行とす
る)方法を採用することができる。詳しくは、実施例に
おいて後述する。
Here, as a method of invalidating the exception information,
As described above, in addition to the method of canceling the exception information stored in the exception information holding device, information on the validity / invalidity of the execution path is stored in advance in the path storage register R3, and the exception information is read prior to the exception processing. At times, a method may be employed in which exception processing is disabled (not executed) for exception information on an invalid path based on the information on the execution path. Details will be described later in Examples.

【0020】また、例外処理装置13は、実行パス確定
後、例外情報保持装置21に格納された例外情報のう
ち、実行パス上の投機的に実行した命令の例外情報を、
読み出して所定の例外処理を実行する。さらに、例外情
報アドレス制御部14に設けられたスタートアドレスレ
ジスタR1及びスタックポインタレジスタR2は、上述
した例外情報保持装置21に格納される例外情報の格納
/読み出しアドレスの設定を制御する。詳しくは後述す
る。
After the execution path is determined, the exception processing unit 13 extracts exception information of the speculatively executed instruction on the execution path from the exception information stored in the exception information holding unit 21.
Read and execute predetermined exception processing. Further, the start address register R1 and the stack pointer register R2 provided in the exception information address control unit 14 control the setting of the storage / read address of the exception information stored in the exception information holding device 21 described above. Details will be described later.

【0021】次に、本発明に係る情報処理装置の命令実
行処理について、図2のフローチャート及び図3のタイ
ミングチャートを参照して説明する。なお、図9に示し
たタイミングチャートと同等の手順については同一の符
号を付して、その説明を省略する。図2に示すように、
まず、CPU10によりスタックポインタレジスタR2
にスタックポイントが設定され(S11)、次いで図3
に示すように、投機的実行命令COM1が指示される
(S12)。
Next, the instruction execution processing of the information processing apparatus according to the present invention will be described with reference to the flowchart of FIG. 2 and the timing chart of FIG. Note that steps equivalent to those in the timing chart shown in FIG. 9 are denoted by the same reference numerals, and description thereof will be omitted. As shown in FIG.
First, the stack pointer register R2 is
The stack point is set in (S11), and then, FIG.
As shown in (5), the speculative execution command COM1 is instructed (S12).

【0022】このような投機的に実行した命令COM1
において、例外が発生した場合(S13)、実行パスが
確定する前に投機的に実行した命令については、例外処
理を行うことができないため、例外処理が抑止され、タ
イミングT04、すなわち書き込みタイミングで例外検出
装置11により、スタックポインタレジスタR2が指示
するアドレスへの例外情報の格納要求が、該当する例外
情報とともに例外情報保持装置21に出力される。そし
て、この格納要求により、該当する例外情報は、所定の
タイミングT0nで例外情報保持装置21の上記指示アド
レスに格納される(S14)。
The instruction COM1 executed speculatively as described above.
In the case where an exception occurs (S13), exception processing cannot be performed on an instruction executed speculatively before the execution path is determined, so that exception processing is suppressed, and the exception processing is suppressed at timing T 04 , that is, at the write timing. The exception detection device 11 outputs a request for storing exception information to the address indicated by the stack pointer register R2 to the exception information holding device 21 together with the corresponding exception information. Then, in response to this storage request, the corresponding exception information is stored at the specified address of the exception information holding device 21 at a predetermined timing T0n (S14).

【0023】次いで、実行パス確定命令COM2により
実行パスが確定した後(S15)、例外情報保持装置2
1に格納された例外情報のうち、実行パス上の投機的に
実行した命令の例外情報については(S16)、動作ク
ロックCLKのタイミングT 24、すなわち書き込みタイ
ミングで例外情報読み出し命令COM3により、スター
トアドレスレジスタR1が指示するスタートアドレスか
らスタックポインタレジスタR2が指示するスタックポ
イントまで順次例外情報の読み出し要求が、該当するア
ドレスとともに例外情報保持装置21に出力される。そ
して、この読み出し要求により、該当する例外情報は、
所定のタイミングT0nで例外情報保持装置21から読み
出され(取得され)、例外処理装置13により所定の例
外処理が実行される(S18)。
Next, an execution path determination command COM2
After the execution path is determined (S15), the exception information holding device 2
1 of the exception information stored in
Regarding the exception information of the executed instruction (S16), the operation
Lock CLK timing T twenty four, Ie writing ties
In response to the exception information read command COM3,
Start address indicated by the address register R1
Stack pointer specified by the stack pointer register R2.
The request for reading the exception information sequentially
It is output to the exception information holding device 21 together with the dress. So
Then, by this read request, the corresponding exception information is
Predetermined timing T0nRead from the exception information holding device 21
Issued (acquired) and given by the exception handling device 13
External processing is executed (S18).

【0024】一方、実行パス確定命令COM2により実
行パスが確定した後、例外情報保持装置21に格納され
た例外情報のうち、実行パス上になく、投機的に実行し
た命令の例外情報については、動作クロックCLKのタ
イミングT14、すなわち書き込みタイミングにおいて、
次の2つの手法により例外情報の無効化(キャンセル)
処理が実行される(S17)。
On the other hand, after the execution path is determined by the execution path determination instruction COM2, among the exception information stored in the exception information holding device 21, the exception information of the instruction that is not on the execution path but is speculatively executed is: At the timing T 14 of the operation clock CLK, that is, at the write timing,
Invalidating (cancelling) exception information using the following two methods
The process is executed (S17).

【0025】第1の手法は、実行パス上になく、投機的
に実行した命令の例外情報は、動作クロックCLKのタ
イミングT14において例外キャンセル装置12から例外
情報保持装置21に対して、キャンセル要求が出力さ
れ、タイミングT1nにおいて該当する例外情報がキャン
セル、すなわち無効化される。第2の手法は、実行パス
上になく、投機的に実行した命令において発生した例外
情報を、動作クロックCLKのタイミングT04で例外情
報保持装置21に格納する際、どの実行パスの投機的命
令で発生した例外であるかを示す情報(フラグ)を例外
情報に付加して格納し、さらに、実行パスの確定後、ど
の実行パスが有効であるかを示す情報をパス格納レジス
タR3に格納する。次いで、動作クロックCLKのタイ
ミングT14において例外情報保持装置21への例外情報
読み出し要求が出力され、該当する例外情報が、どの実
行パスの例外情報であるのを示す情報(フラグ)と、パ
ス格納レジスタR3に格納された、どの実行パスが有効
であるかを示す情報とを照合することにより、有効な実
行パスと判別された例外情報のみを例外処理し、無効な
実行パスの例外情報については例外処理を行わない。す
なわち、タイミングT1nにおいて非実行として、無効化
される。
The first approach is not on execution path, the exception information of the instruction that speculatively executed, to the exception information holding device 21 from the exception cancellation device 12 at a timing T 14 of the operation clock CLK, a cancellation request Is output, and the corresponding exception information is canceled, that is, invalidated at the timing T 1n . The second approach, rather than on the execution path, when storing exception information generated in instruction speculatively executed, at the timing T 04 of the operation clock CLK to the exception information holding device 21, the speculative instruction which execution path The information (flag) indicating whether the exception has occurred in step (1) is added to the exception information and stored, and after the execution path is determined, the information indicating which execution path is valid is stored in the path storage register R3. . Then, the exception information read request output to the exception information holding device 21 at timing T 14 of the operation clock CLK, the appropriate exception information, and information (flag) indicating that the an exception information which execution path, the path store By comparing with the information indicating which execution path is valid stored in the register R3, only exception information determined as a valid execution path is exception-processed. Does not perform exception handling. That is, it is invalidated as non-execution at the timing T1n .

【0026】このように、本発明に係る情報処理装置に
よれば、上記投機的実行命令処理の係るアルゴリズムが
全てハードウェアにより処理される。特に、キャッシュ
メモリ又はメモリ装置への例外情報の格納処理は、投機
的実行命令において例外が発生したことを契機としてハ
ードウェアが自動的に行われる。また、従来、例えば厳
密例外アーキテクチャのスーパースカラプロセッサ等に
おいては、Out-OF-Orderにより投機実行を行う場合、プ
ログラムの順序性を保証するために、CPU内部のリオ
ーダーバッファ又はヒストリーバッファと呼ばれるバッ
ファ内で先行命令の終了を待つ処理が必須であるが、本
発明においては、例外情報の格納場所を、CPU内部の
レジスタではなく、キャッシュメモリやメモリ装置等の
外部メモリとすることにより、CPUの処理性能の劣化
を防止している。
As described above, according to the information processing apparatus of the present invention, all the algorithms related to the speculative execution instruction processing are processed by hardware. In particular, the processing for storing exception information in the cache memory or the memory device is automatically performed by hardware when an exception occurs in a speculative execution instruction. Conventionally, for example, in a super scalar processor with a strict exception architecture, when speculative execution is performed by Out-OF-Order, a buffer called a reorder buffer or a history buffer inside the CPU is required to guarantee the order of programs. However, in the present invention, the storage location of the exception information is not a register inside the CPU but an external memory such as a cache memory or a memory device. The processing performance is prevented from deteriorating.

【0027】したがって、投機的に実行する命令に例外
が発生した場合、例外情報に関する所定の情報を付加し
て外部メモリに格納することにより、CPU内部のレジ
スタ資源に影響されることなく、例外処理を確実に実行
することができる。
Therefore, when an exception occurs in an instruction to be executed speculatively, predetermined information relating to the exception information is added and stored in an external memory so that exception processing can be performed without being affected by register resources inside the CPU. Can be executed reliably.

【0028】[0028]

【発明の実施の形態】(第1の実施例)次に、本発明に
係る情報処理装置の第1の実施例について、図4を参照
して説明する。上述した基本構成と同等の構成について
は、同一の符号を付して、その説明を省略する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) Next, a first embodiment of the information processing apparatus according to the present invention will be described with reference to FIG. The same components as those described above are denoted by the same reference numerals, and description thereof is omitted.

【0029】図4に示すように、本実施例の情報処理装
置は、CPU10とキャッシュメモリ20aとを具備
し、CPU10は、例外検出装置11、例外キャンセル
装置12、例外処理装置13、スタートアドレスレジス
タR1、スタックポインタレジスタR2及びインクリメ
ンタINCを有して構成され、一方、キャッシュメモリ
20aは、所定のメモリ空間にキャッシュタグ装置21
a、21ba及びキャッシュデータ装置22a、22b
を有して構成されている。
As shown in FIG. 4, the information processing apparatus of this embodiment includes a CPU 10 and a cache memory 20a. The CPU 10 includes an exception detecting device 11, an exception canceling device 12, an exception processing device 13, a start address register R1, a stack pointer register R2, and an incrementer INC. On the other hand, the cache memory 20a stores the cache tag device 21 in a predetermined memory space.
a, 21ba and cache data devices 22a, 22b
Is configured.

【0030】ここで、スタートアドレスレジスタR1に
は、キャッシュメモリ20a内に格納されている例外情
報の先頭アドレスが保持され、一方、スタックポインタ
レジスタR2には、格納されている例外情報の最終アド
レスが保持される。インクリメンタINCは、例外情報
の格納毎に、スタックポインタレジスタR2に保持され
たスタックポイント、すなわち例外情報の最終アドレス
を1インクリメントする。
Here, the start address register R1 holds the start address of the exception information stored in the cache memory 20a, while the stack pointer register R2 stores the last address of the stored exception information. Will be retained. The incrementer INC increments the stack point held in the stack pointer register R2, that is, the final address of the exception information by one every time the exception information is stored.

【0031】また、キャッシュタグ装置21a、21b
は、例外情報が格納されるメモリラインが有効であるか
どうかを示すValidビット、キャッシュデータ装置22
a、21bに格納された内容が通常のメモリデータのコ
ピーであるか、あるいは例外情報であるかを示すExpフ
ラグ、及び、キャッシュタグTagから構成される。キャ
ッシュデータ装置22a、22bは、キャッシュタグ装
置21a、21bに格納される情報に関連付けられた、
メモリデータのコピーあるいは所定の例外情報が格納さ
れる。具体的には、キャッシュデータ装置22a、22
b内には、例外情報が有効であるか否かを示すフラグ、
命令のアドレス、命令の種類、例外の種類、実効アドレ
ス(LD/ST命令)、ディスティネーションレジスタ
番号、先行する命令の例外に起因して発生した例外であ
るか否か、どの実行パスに対して投機的な実行を行って
いるか等の情報が保持される。
The cache tag devices 21a, 21b
Is a Valid bit indicating whether or not the memory line storing the exception information is valid;
a and 21b are composed of an Exp flag indicating whether the content stored in the memory 21b is a copy of normal memory data or exceptional information, and a cache tag Tag. The cache data devices 22a and 22b are associated with information stored in the cache tag devices 21a and 21b.
A copy of memory data or predetermined exception information is stored. Specifically, the cache data devices 22a, 22
b, a flag indicating whether the exception information is valid,
Instruction address, instruction type, exception type, effective address (LD / ST instruction), destination register number, whether the exception occurred due to the exception of the preceding instruction, and which execution path Information such as whether or not speculative execution is being performed is held.

【0032】このような構成の情報処理装置において、
投機的に実行した命令に例外が発生した場合、例外検出
装置11は、スタックポイントが示すアドレスADを指
定してキャッシュメモリ20aに例外情報の格納要求を
出力し、例外情報がキャッシュデータ装置22a又は2
2bの所定のアドレス空間に格納される。そして、スタ
ックポインタレジスタR2が保持するスタックポイント
は、投機的に実行した命令において次に発生する例外を
次のアドレス空間に格納するため、インクリメンタIN
Cにより1インクリメントされる。
In the information processing apparatus having such a configuration,
When an exception occurs in the speculatively executed instruction, the exception detection device 11 outputs a request for storing exception information to the cache memory 20a by specifying the address AD indicated by the stack point, and the exception information is stored in the cache data device 22a or the cache data device 22a. 2
2b is stored in a predetermined address space. The stack point held by the stack pointer register R2 is used to store the next exception that occurs in the speculatively executed instruction in the next address space.
C is incremented by one.

【0033】ここで、キャッシュデータ装置22a又は
22bのアドレス空間に格納されたデータが例外情報で
ある場合、キャッシュタグ装置21a又は21bのExp
フラグには、”1”が設定され、格納されたデータが通
常のメモリデータのコピーである場合には、”0”が設
定される。したがって、Expフラグが”1”の場合に
は、該当するメモリラインに対するデータの読み出し、
書き込み動作を不許可にし、キャッシュデータ装置22
a又は22bに格納されている例外情報を通常のデータ
として誤った上書き、あるいは読み出しが行われること
を防止する。
Here, when the data stored in the address space of the cache data device 22a or 22b is the exception information, the Exp tag of the cache tag device 21a or 21b is used.
“1” is set in the flag, and “0” is set if the stored data is a copy of normal memory data. Therefore, when the Exp flag is “1”, reading of data from the corresponding memory line,
The write operation is prohibited and the cache data device 22
This prevents erroneous overwriting or reading of the exception information stored in a or 22b as normal data.

【0034】次いで、実行パスが確定した後、実行パス
上になく投機的に実行した命令の例外情報については、
例外キャンセル装置12から無効となる実行パスに関す
るキャンセル情報がキャッシュタグ装置21a、21b
及びキャッシュデータ装置22a、22bに送出され、
キャッシュデータ装置22a、22b内の例外情報が有
効であるか否かを示すフラグを”0”にクリアすること
により、例外情報のキャンセル処理が実行される。
Next, after the execution path is determined, the exception information of the instruction that is not on the execution path but executed speculatively is as follows:
The cancellation information on the execution path that becomes invalid from the exception cancellation device 12 is transmitted to the cache tag devices 21a and 21b.
And transmitted to the cache data devices 22a and 22b,
By clearing the flag indicating whether the exception information in the cache data devices 22a and 22b is valid to "0", the exception information is canceled.

【0035】一方、実行パスが確定した後、実行パス上
にある投機的に実行した命令の例外情報については、例
外情報読み出し命令により、スタートアドレスレジスタ
R1に保持されているスタートアドレスからスタックポ
インタレジスタR2に保持されているスタックポイント
までのアドレスADについて、順次例外情報の読み出し
要求が指示され、まずキャッシュタグ装置21a又は2
1bに格納された情報とが比較され、例外情報が有効
(フラグ”1”)である場合には、キャッシュデータ装
置22a又は22bの該当するアドレス空間の例外情報
がマルチプレクサMUXを介して例外処理装置13に読
み出され(取得され)、所定の例外処理が実行される。
On the other hand, after the execution path is determined, the exception information of the speculatively executed instruction on the execution path is read from the start address stored in the start address register R1 by the stack pointer register by the exception information read instruction. For the address AD up to the stack point held in R2, a request for reading exception information is sequentially instructed, and the cache tag device 21a or 21
1b, and if the exception information is valid (flag "1"), the exception information of the corresponding address space of the cache data device 22a or 22b is sent to the exception processing device via the multiplexer MUX. 13 is read (acquired) and predetermined exception processing is executed.

【0036】(第2の実施例)次に、本発明に係る情報
処理装置の第2の実施例について、図5を参照して説明
する。なお、上述した実施例と同等の構成については、
同一の符号を付して、その説明を省略する。図5に示す
ように、本実施例の情報処理装置は、CPU10と大容
量のメモリ装置20bとを具備し、CPU10は、上述
した実施例と同様に、例外検出装置11、例外キャンセ
ル装置12、例外処理装置13、スタートアドレスレジ
スタR1、スタックポインタレジスタR2、インクリメ
ンタINCを有して構成され、一方、メモリ装置20b
は、所定のメモリ空間21を有して構成されている。
(Second Embodiment) Next, a second embodiment of the information processing apparatus according to the present invention will be described with reference to FIG. In addition, about the structure equivalent to the above-mentioned Example,
The same reference numerals are given and the description is omitted. As shown in FIG. 5, the information processing apparatus according to the present embodiment includes a CPU 10 and a large-capacity memory device 20b. The CPU 10 includes an exception detecting device 11, an exception canceling device 12, The exception processing device 13 includes a start address register R1, a stack pointer register R2, and an incrementer INC.
Is configured to have a predetermined memory space 21.

【0037】ここで、メモリ空間21には、例外情報が
有効であるかの否かを示すフラグ、命令のアドレス、命
令の種類、例外の種類、実効アドレス(LD/ST命
令)、ディスティネーションレジスタ番号、先行する命
令の例外に起因して発生した例外であるか否か、どの実
行パスに対して投機的な実行を行っているか等の情報が
互いに関連付けられて一まとまりの情報として格納され
る。
Here, in the memory space 21, a flag indicating whether the exception information is valid, an instruction address, an instruction type, an exception type, an effective address (LD / ST instruction), a destination register Information such as the number, whether or not the exception occurred due to the exception of the preceding instruction, and which execution path is performing speculative execution, etc., are stored as a set of information in association with each other. .

【0038】さらに、CPU10とメモリ装置20bと
の間には、例外検出装置11及び例外処理装置13から
出力される例外情報のアドレスADを、論理アドレスか
ら物理アドレスに変換してメモリ装置20bに送出する
メモリマネージメントユニットMMUが設けられてい
る。このような構成の情報処理装置において、投機的に
実行した命令に例外が発生した場合、例外検出装置11
は、スタックポイントが示すアドレスADを指定してメ
モリ装置20bに例外情報の格納要求を出力し、例外情
報がメモリ空間21の所定の物理アドレスに格納され
る。そして、スタックポインタレジスタR2が保持する
スタックポイントは、投機的に実行した命令において次
に発生する例外を次のアドレスに格納するために、イン
クリメンタINCにより1インクリメントされる。
Further, between the CPU 10 and the memory device 20b, the address AD of the exception information output from the exception detecting device 11 and the exception processing device 13 is converted from a logical address to a physical address and sent to the memory device 20b. A memory management unit MMU is provided. In the information processing apparatus having such a configuration, when an exception occurs in a speculatively executed instruction, the exception detection device 11
Outputs an exception information storage request to the memory device 20b by specifying the address AD indicated by the stack point, and the exception information is stored at a predetermined physical address in the memory space 21. Then, the stack point held by the stack pointer register R2 is incremented by one by the incrementer INC in order to store the next exception that occurs in the speculatively executed instruction at the next address.

【0039】次いで、実行パスが確定した後、実行パス
上になく投機的に実行した命令の例外情報については、
例外キャンセル装置12から無効となる実行パスに関す
るキャンセル情報がメモリ空間21に送出され、メモリ
空間21内の例外情報が有効であるか否かを示すフラグ
を”0”にクリアすることにより、例外情報のキャンセ
ル処理が実行される。
Next, after the execution path is determined, the exception information of the instruction which is not on the execution path but executed speculatively is as follows:
The exception canceling device 12 sends cancellation information on the execution path that becomes invalid to the memory space 21 and clears the flag indicating whether the exception information in the memory space 21 is valid to “0”. Is executed.

【0040】一方、実行パスが確定した後、実行パス上
の投機的に実行した命令の例外情報については、例外情
報読み出し命令により、スタートアドレスレジスタR1
が保持するスタートアドレスからスタックポインタレジ
スタR2が保持するスタックポイントまでのアドレスA
Dについて、順次例外情報の読み出し要求が指示され
る。ここで、アドレスADは、メモリマネージメントユ
ニットMMUにより論理アドレスから物理アドレスに変
換されて、メモリ空間21の所定のアドレスが指示さ
れ、該当する例外情報が有効な場合には、例外処理装置
13に読み出され(取得され)、所定の例外処理が実行
される。
On the other hand, after the execution path is determined, the exception information of the instruction speculatively executed on the execution path is read by the exception information read instruction and the start address register R1 is read.
A from the start address held by the stack pointer to the stack point held by the stack pointer register R2
Regarding D, a request for reading the exception information is sequentially instructed. Here, the address AD is converted from a logical address to a physical address by the memory management unit MMU, a predetermined address in the memory space 21 is designated, and when the corresponding exception information is valid, the address AD is read by the exception processing device 13. Is issued (acquired), and predetermined exception processing is executed.

【0041】(第3の実施例)次に、本発明に係る情報
処理装置の第3の実施例について、図6を参照して説明
する。なお、上述した第1の実施例と同等の構成につい
ては、同一の符号を付して、その説明を省略する。図6
に示すように、本実施例の情報処理装置は、第1の実施
例と同様に、CPU10とキャッシュメモリ20aとを
具備し、CPU10は、例外検出装置11、例外処理装
置13、スタートアドレスレジスタR1、スタックポイ
ンタレジスタR2、インクリメンタINC及び例外パス
格納レジスタR3を有して構成され、一方、キャッシュ
メモリ20aは、キャッシュタグ装置21a、21b及
びキャッシュデータ装置22a、22bを有して構成さ
れている。
(Third Embodiment) Next, a third embodiment of the information processing apparatus according to the present invention will be described with reference to FIG. The same components as those in the above-described first embodiment are denoted by the same reference numerals, and description thereof will be omitted. FIG.
As shown in FIG. 7, the information processing apparatus of the present embodiment includes a CPU 10 and a cache memory 20a, as in the first embodiment, and the CPU 10 includes an exception detecting device 11, an exception processing device 13, a start address register R1. , A stack pointer register R2, an incrementer INC, and an exception path storage register R3, while the cache memory 20a includes cache tag devices 21a, 21b and cache data devices 22a, 22b. .

【0042】すなわち、本実施例の情報処理装置は、上
述した第1の実施例において、例外キャンセル装置12
に代えて、例外パス格納レジスタR3を備えていること
を特徴とし、この例外パス格納レジスタR3には、投機
的に実行している命令のパスが確定した後に、確定した
実行パスに関する情報が格納される。このような構成の
情報処理装置において、投機的に実行した命令に例外が
発生した場合、例外検出装置11は、スタックポイント
が示すアドレスADを指定してキャッシュメモリ20a
に例外情報の格納要求を出力し、例外情報がキャッシュ
データ装置22a又は22bの所定のアドレス空間に格
納される。そして、スタックポインタレジスタR2が保
持するスタックポイントは、投機的に実行された命令に
おいて次に発生する例外を次のアドレス空間に格納する
ために、インクリメンタINCにより1インクリメント
される。
That is, the information processing apparatus of this embodiment is different from the first embodiment in that the exception canceling device 12
, An exception path storage register R3 is provided. After the path of the speculatively executed instruction is determined, information on the determined execution path is stored in the exception path storage register R3. Is done. In the information processing device having such a configuration, when an exception occurs in an instruction executed speculatively, the exception detection device 11 specifies the address AD indicated by the stack point and specifies the cache memory 20a.
Is output to the cache data device 22a or 22b, and the exception information is stored in a predetermined address space of the cache data device 22a or 22b. The stack point held by the stack pointer register R2 is incremented by one by the incrementer INC in order to store the next exception that occurs in the speculatively executed instruction in the next address space.

【0043】ここで、キャッシュデータ装置22a又は
22bに格納されたデータが例外情報である場合、キャ
ッシュタグ装置21a又は21bのExpフラグには、”
1”が設定され、格納されたデータが通常のメモリデー
タのコピーである場合には、”0”が設定される。した
がって、Expフラグが”1”の場合には、該当するメモ
リラインに対するデータの読み出し、書き込み動作を不
許可にし、例外情報への誤った上書き、あるいは読み出
しを防止する。
Here, when the data stored in the cache data device 22a or 22b is the exception information, the Exp flag of the cache tag device 21a or 21b contains "
When "1" is set and the stored data is a copy of normal memory data, "0" is set.Thus, when the Exp flag is "1", data for the corresponding memory line is set. Read and write operations are prohibited, and erroneous overwriting or reading of exception information is prevented.

【0044】次いで、実行パスが確定すると、確定した
実行パスに関する情報は、例外パス格納レジスタR3に
格納される。そして、例外情報読み出し命令により、例
外情報をキャッシュメモリ20aから例外処理装置13
に読み出された例外情報について、付加情報として設定
されている、どの実行パスに対して投機的な実行を行っ
たかを示すフラグと、例外パス格納レジスタR3に保持
されている実行パスに関する情報とを比較、照合する。
Next, when the execution path is determined, information on the determined execution path is stored in the exception path storage register R3. The exception information is read from the cache memory 20a by the exception information read instruction.
The flag indicating which execution path has been speculatively executed is set as additional information with respect to the exception information read out in the above, and the information on the execution path held in the exception path storage register R3. Compare and collate.

【0045】次いで、この照合結果に基づいて、双方の
情報が一致した例外情報については、所定の例外処理を
実行し、一致しない例外情報については、例外処理を行
わない(禁止あるいは非実行)ようにする。このような
例外情報の読み出し、照合、例外処理の実行可否の判断
を、キャッシュメモリ20aに格納されたスタートアド
レスからスタックポイントまでの各アドレスについて実
行する。
Then, based on the collation result, predetermined exception processing is executed for exception information where both information matches, and exception processing is not performed (prohibition or non-execution) for exception information that does not match. To Such reading of the exception information, collation, and determination of whether or not to execute the exception processing are executed for each address from the start address stored in the cache memory 20a to the stack point.

【0046】(第4の実施例)次に、本発明に係る情報
処理装置の第4の実施例について、図7を参照して説明
する。なお、上述した第2及び第3の実施例と同等の構
成については、同一の符号を付して、その説明を省略す
る。図7に示すように、本実施例の情報処理装置は、C
PU10と大容量のメモリ装置20bとを具備し、CP
U10は、例外検出装置11、例外処理装置13、スタ
ートアドレスレジスタR1、スタックポインタレジスタ
R2、インクリメンタINC及び例外パス格納レジスタ
R3を有してから構成され、一方、メモリ装置20b
は、所定のメモリ空間21を有して構成されている。
(Fourth Embodiment) Next, a fourth embodiment of the information processing apparatus according to the present invention will be described with reference to FIG. The same components as those in the above-described second and third embodiments are denoted by the same reference numerals, and description thereof will be omitted. As shown in FIG. 7, the information processing apparatus of this embodiment
A PU 10 and a large-capacity memory device 20b;
U10 comprises an exception detection device 11, an exception processing device 13, a start address register R1, a stack pointer register R2, an incrementer INC, and an exception path storage register R3, while the memory device 20b
Is configured to have a predetermined memory space 21.

【0047】すなわち、本実施例の情報処理装置は、上
述した第2の実施例において、例外キャンセル装置12
に代えて、例外パス格納レジスタR3を備えていること
を特徴とし、この例外パス格納レジスタR3には、投機
的に実行している命令のパスが確定した後に、確定した
実行パスに関する情報が格納される。このような構成の
情報処理装置において、投機的に実行した命令に例外が
発生した場合、例外検出装置11は、スタックポイント
が示すアドレスADを指定してメモリ装置20bに例外
情報の格納要求を出力し、例外情報がメモリ空間21の
所定の物理アドレスに格納される。そして、スタックポ
インタレジスタR2が保持するスタックポイントは、投
機的に実行した命令において次に発生する例外を次のア
ドレスに格納するために、インクリメンタINCにより
1インクリメントされる。
That is, the information processing apparatus of the present embodiment is different from the second embodiment in that
, An exception path storage register R3 is provided. After the path of the speculatively executed instruction is determined, information on the determined execution path is stored in the exception path storage register R3. Is done. In the information processing device having such a configuration, when an exception occurs in an instruction executed speculatively, the exception detection device 11 specifies the address AD indicated by the stack point and outputs a storage request for exception information to the memory device 20b. Then, the exception information is stored at a predetermined physical address in the memory space 21. Then, the stack point held by the stack pointer register R2 is incremented by one by the incrementer INC in order to store the next exception that occurs in the speculatively executed instruction at the next address.

【0048】次いで、実行パスが確定すると、確定した
実行パスに関する情報は、例外パス格納レジスタR3に
格納される。そして、例外情報読み出し命令より、メモ
リ空間21から例外処理装置13に読み出された例外情
報について、付加情報として設定されている、どの実行
パスに対して投機的な実行を行ったかを示すフラグと、
例外パス格納レジスタR3に保持されている実行パスに
関する情報とを比較、照合する。
Next, when the execution path is determined, information on the determined execution path is stored in the exception path storage register R3. A flag indicating which execution path has been speculatively executed is set as additional information for the exception information read from the memory space 21 to the exception processing device 13 by the exception information read instruction. ,
The information on the execution path stored in the exception path storage register R3 is compared and collated.

【0049】次いで、この照合結果に基づいて、双方の
情報が一致した例外情報については、所定の例外処理を
実行し、一致しない例外情報については、例外処理を行
わない(禁止あるいは非実行)ようにする。このような
例外情報の読み出し、照合、例外処理の実行可否の判断
を、キャッシュメモリ20aに格納されたスタートアド
レスからスタックポイントまでの各アドレスについて実
行する。
Next, based on the collation result, predetermined exception processing is executed for exception information where both information matches, and exception processing is not performed (prohibition or non-execution) for exception information that does not match. To Such reading of the exception information, collation, and determination of whether or not to execute the exception processing are executed for each address from the start address stored in the cache memory 20a to the stack point.

【0050】[0050]

【発明の効果】以上説明したように本発明の情報処理装
置によれば、投機的に実行した命令に例外が発生した場
合、CPU内部のレジスタに対して比較的安価なキャッ
シュメモリあるいは大容量のメモリ装置等の外部メモリ
内に、ハードウェアにより例外情報を退避、格納し、投
機的に実行した命令の実行パスが確定後、例外情報を含
む実行パスに関する情報に基づいて、実際に実行すべき
命令に対して、外部メモリに格納された例外情報をソフ
トウェアにより読み出し、例外処理を実行し、一方、実
行すべきでない命令に対しては、例外情報をキャンセル
することにより、比較的安価な構成で、かつ、CPUの
処理能力を低下させることなく、投機的に実行した複数
の命令で例外が発生した場合においても、各々の例外を
確実に処理することができる。
As described above, according to the information processing apparatus of the present invention, when an exception occurs in a speculatively executed instruction, a relatively inexpensive cache memory or a large capacity Exception information is saved and stored by hardware in an external memory such as a memory device, and after the execution path of the speculatively executed instruction is determined, the execution should be actually performed based on information on the execution path including the exception information. For the instruction, the exception information stored in the external memory is read out by software, and the exception processing is executed. On the other hand, for the instruction that should not be executed, the exception information is canceled, thereby achieving a relatively inexpensive configuration. Even if an exception occurs in a plurality of speculatively executed instructions without lowering the processing performance of the CPU, it is possible to reliably process each exception. Can.

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

【図1】本発明に係る情報処理装置の基本構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a basic configuration of an information processing apparatus according to the present invention.

【図2】本発明に係る情報処理装置の投機的実行命令処
理のフローチャートである。
FIG. 2 is a flowchart of speculative execution instruction processing of the information processing apparatus according to the present invention.

【図3】本発明に係る情報処理装置の投機的実行命令処
理のタイミングチャートである。
FIG. 3 is a timing chart of speculative execution instruction processing of the information processing apparatus according to the present invention.

【図4】第1の実施例の情報処理装置を示す概略構成図
である。
FIG. 4 is a schematic configuration diagram illustrating an information processing apparatus according to a first embodiment.

【図5】第2の実施例の情報処理装置を示す概略構成図
である。
FIG. 5 is a schematic configuration diagram illustrating an information processing apparatus according to a second embodiment.

【図6】第3の実施例の情報処理装置を示す概略構成図
である。
FIG. 6 is a schematic configuration diagram illustrating an information processing apparatus according to a third embodiment.

【図7】第4の実施例の情報処理装置を示す概略構成図
である。
FIG. 7 is a schematic configuration diagram illustrating an information processing apparatus according to a fourth embodiment.

【図8】従来の例外処理機能を有するCPUの概略構成
図である。
FIG. 8 is a schematic configuration diagram of a conventional CPU having an exception handling function.

【図9】従来の例外処理機能におけるタイミングチャー
トである。
FIG. 9 is a timing chart in a conventional exception handling function.

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

10、10´ CPU 11 例外検出装置 12 例外キャンセル装置 13 例外処理装置 14 例外アドレス制御部 15 例外情報格納レジスタ 20 外部メモリ 20a キャッシュメモリ 21 例外情報保持装置 21a、21b キャッシュタグ装置 22a、22b キャッシュデータ装置 23a、23b 比較器 24 マルチプレクサ 30 メモリマネージメントユニット R1 スタートアドレスレジスタ R2 スタックポインタレジスタ R3 例外パス格納レジスタ INC インクリメンタ 10, 10 'CPU 11 Exception detection device 12 Exception cancellation device 13 Exception processing device 14 Exception address control unit 15 Exception information storage register 20 External memory 20a Cache memory 21 Exception information holding device 21a, 21b Cache tag device 22a, 22b Cache data device 23a, 23b Comparator 24 Multiplexer 30 Memory Management Unit R1 Start Address Register R2 Stack Pointer Register R3 Exception Path Storage Register INC Incrementer

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】実行パスが確定する前に、投機的に実行し
た命令に発生した例外を検出する例外検出手段と、 少なくとも前記例外に関する情報を所定のアドレスに格
納する例外情報格納手段と、 前記実行パス確定後に、前記例外情報格納手段に格納さ
れた例外情報のうち、前記実行パス上の前記投機的に実
行した命令に発生した例外情報を読み出し、例外処理を
実行する例外処理手段と、 前記実行パス確定後に、前記例外情報格納手段に格納さ
れた例外情報のうち、前記実行パス上になく、前記投機
的に実行した命令に発生した例外情報を無効化する例外
情報無効化手段と、を具備する情報処理装置において、 前記例外検出手段、前記例外処理手段及び前記例外無効
化手段は、同一の演算処理装置内に設けられ、かつ、前
記例外情報格納手段は、前記演算処理装置外の所定の外
部記憶装置内に設けられ、 前記演算処理装置は、前記例外情報無効化手段に保持さ
れた、前記例外情報に対応する前記実行パスに関する情
報に基づいて、前記例外情報の有効/無効を判別し、前
記例外処理の実行を制御することを特徴とする情報処理
装置。
An exception detecting means for detecting an exception occurring in an instruction executed speculatively before an execution path is determined; an exception information storing means for storing at least information on the exception at a predetermined address; After the execution path is determined, the exception information stored in the exception information storage unit, the exception information generated in the speculatively executed instruction on the execution path is read out, and exception processing means for executing exception processing, After the execution path is determined, the exception information invalidating means for invalidating exception information generated in the speculatively executed instruction that is not on the execution path among the exception information stored in the exception information storage means. In the information processing apparatus, the exception detection unit, the exception processing unit, and the exception invalidation unit are provided in the same arithmetic processing unit, and the exception information storage unit Is provided in a predetermined external storage device outside the arithmetic processing device, the arithmetic processing device is held in the exception information invalidating means, based on information on the execution path corresponding to the exception information, An information processing apparatus for determining whether the exception information is valid or invalid, and controlling execution of the exception processing.
【請求項2】前記外部記憶装置は、前記演算処理装置外
に設けられたキャッシュメモリであって、 前記キャッシュメモリは、通常のメモリデータのコピー
又は前記例外情報を保持するデータ格納部と、該データ
格納部に保持された情報に対応し、少なくとも該情報の
内容を判別するフラグビットを保持するタグ格納部と、
を有し、 前記フラグビットに基づいて、前記データ格納部に保持
された情報を判別し、前記例外情報が保持されている場
合には、前記キャッシュメモリへのデータの読み出し及
び書き込み動作を禁止することを特徴とする請求項1記
載の情報処理装置。
2. The external storage device is a cache memory provided outside the arithmetic processing unit, wherein the cache memory includes a data storage unit that holds a copy of normal memory data or the exception information, A tag storage unit corresponding to the information held in the data storage unit and holding a flag bit for determining at least the content of the information;
Determining the information held in the data storage unit based on the flag bit, and prohibiting data read and write operations to the cache memory when the exception information is held The information processing apparatus according to claim 1, wherein:
【請求項3】前記外部記憶装置は、前記演算処理装置外
に設けられた大容量のメモリ装置であって、 前記演算処理装置と前記メモリ装置との間に、前記例外
検出手段により検出され、前記メモリ装置に格納される
前記例外情報のアドレスを、論理アドレスから物理アド
レスに変換するアドレス変換手段を有していることを特
徴とする請求項1記載の情報処理装置。
3. The external storage device is a large-capacity memory device provided outside the arithmetic processing device, wherein the external storage device is detected by the exception detecting means between the arithmetic processing device and the memory device. 2. The information processing apparatus according to claim 1, further comprising address conversion means for converting an address of the exception information stored in the memory device from a logical address to a physical address.
JP10256703A 1998-09-10 1998-09-10 Information processor Withdrawn JP2000089954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10256703A JP2000089954A (en) 1998-09-10 1998-09-10 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10256703A JP2000089954A (en) 1998-09-10 1998-09-10 Information processor

Publications (1)

Publication Number Publication Date
JP2000089954A true JP2000089954A (en) 2000-03-31

Family

ID=17296310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10256703A Withdrawn JP2000089954A (en) 1998-09-10 1998-09-10 Information processor

Country Status (1)

Country Link
JP (1) JP2000089954A (en)

Similar Documents

Publication Publication Date Title
JP5894120B2 (en) Zero cycle load
US7500087B2 (en) Synchronization of parallel processes using speculative execution of synchronization instructions
EP0747816B1 (en) Method and system for high performance multithread operation in a data processing system
US9081563B2 (en) Method and apparatus for enhancing scheduling in an advanced microprocessor
JP2504830Y2 (en) Data processing device
US6345351B1 (en) Maintenance of speculative state of parallel executed jobs in an information processing system
EP1150202A2 (en) Method and apparatus for optimizing execution of load and store instructions
US20070050592A1 (en) Method and apparatus for accessing misaligned data streams
JPH0658650B2 (en) Virtual computer system
JP2005243050A (en) Computer system
JP2003029986A (en) Inter-processor register succeeding method and device therefor
US7240183B2 (en) System and method for detecting instruction dependencies in multiple phases
US20040123081A1 (en) Mechanism to increase performance of control speculation
US5930491A (en) Identification of related instructions resulting from external to internal translation by use of common ID field for each group
US6625725B1 (en) Speculative reuse of code regions
US20050283770A1 (en) Detecting memory address bounds violations
JPH0340047A (en) Cash-line-storage method
US6421771B1 (en) Processor performing parallel operations subject to operand register interference using operand history storage
US20060026382A1 (en) Information processor and multi-hit control method
US6266767B1 (en) Apparatus and method for facilitating out-of-order execution of load instructions
US6889315B2 (en) Processor and method of controlling the same
JP2000089954A (en) Information processor
JP3497087B2 (en) Instruction control apparatus and method
JP2009230479A (en) Microprocessor
JP2894438B2 (en) Pipeline processing equipment

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060110