JPH0760383B2 - Processor - Google Patents
ProcessorInfo
- Publication number
- JPH0760383B2 JPH0760383B2 JP62076488A JP7648887A JPH0760383B2 JP H0760383 B2 JPH0760383 B2 JP H0760383B2 JP 62076488 A JP62076488 A JP 62076488A JP 7648887 A JP7648887 A JP 7648887A JP H0760383 B2 JPH0760383 B2 JP H0760383B2
- Authority
- JP
- Japan
- Prior art keywords
- decoding
- information
- instruction
- machine language
- decoded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30145—Instruction analysis, e.g. decoding, instruction word fields
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
- Executing Machine-Instructions (AREA)
Description
【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、命令のデコード時間を短縮することができ
るプロセッサに関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a processor capable of shortening instruction decoding time.
(従来の技術) マイクロプログラム制御方式におけるマイクロプロセッ
サの高性能化に伴ない、マイクロプロセッサに所定の動
作をさせる機械語命令の命令長は長くなる傾向にあり、
可変長の機械語命令を処理するマイクロプロセッサが増
えつつある。(Prior Art) With the increase in performance of microprocessors in the micro program control system, the instruction length of machine language instructions for causing the microprocessor to perform a predetermined operation tends to be long,
An increasing number of microprocessors process variable-length machine language instructions.
このようなマイクロプロセッサにおいては、可変長の機
械語命令は単位命令長(例えば8ビット=1バイト)毎
に意味を有しているのが一般的であるため、このような
可変長の機械語命令を単位命令長毎に順次デコードして
いた。ただし、命令の実行のために用いられる変位(Di
splacement)及び即値(Immediate)が機械語命令中に
複数存在する場合には、上述した限りではなく、単位命
令長にとらわれることなくデコードが行われる場合があ
る。In such a microprocessor, a variable-length machine language instruction generally has a meaning for each unit instruction length (for example, 8 bits = 1 byte). Instructions were sequentially decoded for each unit instruction length. However, the displacement (Di
When a plurality of "splacement" and immediate values (Immediate) exist in a machine language instruction, the decoding may be performed regardless of the unit instruction length, not limited to the above.
可変長の機械語命令のデコード方法としては、可変長の
機械語命令が単位命令長毎にデコーダに与えられ、この
単位命令は、この単位命令がデコードされる前にデコー
ドされた単位命令のデコード結果の一部となっている次
の単位命令のデコードに必要な情報にしたがってデコー
ドされる。このデコード結果は、マイクロプログラムが
解釈,実行可能な情報と次の単位命令のデコードに必要
な情報とからなっている。そして、このデコード結果の
一部の情報である次のデコードに必要な情報にしたがっ
て、次の単位命令がデコードされ、可変長の機械語命令
が単位命令毎に順次デコードされる。As a method for decoding a variable-length machine language instruction, a variable-length machine language instruction is given to a decoder for each unit instruction length, and this unit instruction is decoded before the unit instruction is decoded. It is decoded according to the information required to decode the next unit instruction that is part of the result. The decoding result includes information that can be interpreted and executed by the microprogram and information necessary for decoding the next unit instruction. Then, the next unit instruction is decoded according to the information necessary for the next decoding which is a part of the information of the decoding result, and the variable length machine language instruction is sequentially decoded for each unit instruction.
このような可変長の機械語命令のデコード方法にあっ
て、単位命令のデコードには、一般的に1マシンサイク
ルの時間を要していた。このため、可変長の機械語命令
をデコードするためには、その単位命令分のマシンサイ
クルの時間が必要であった。In such a variable-length machine language instruction decoding method, decoding of a unit instruction generally requires one machine cycle. Therefore, in order to decode a variable-length machine language instruction, a machine cycle time corresponding to the unit instruction is required.
(発明が解決しようとする問題点) 以上説明したように、可変長の機械語命令を単位命令毎
に順次デコードする方法にあっては、可変長の機械語命
令のデコードにその単位命令分のマシンサイクルの時間
がかかり、単位命令が多くなるとかなりの時間を要する
ことになる。(Problems to be Solved by the Invention) As described above, in the method of sequentially decoding a variable-length machine language instruction for each unit instruction, the variable-length machine language instruction is decoded for the unit instruction. It takes a long machine cycle, and a large number of unit instructions requires a considerable amount of time.
したがって、マイクロプロセッサが利用される分野にお
いては、処理の高速性が要求されるものがほとんどであ
り、上記のようなデコード方法では、マイクロプロセッ
サの性能が機械語命令のデコード時間が長くなることに
よって劣化してしまうという問題があった。Therefore, in most fields where microprocessors are used, high-speed processing is required. In the decoding method as described above, the performance of the microprocessor increases the decoding time of machine language instructions. There was a problem of deterioration.
そこで、この発明は、上記に鑑みてなされたものであ
り、その目的とするところは、機械語命令のデコード時
間を短縮して、プロセッサによる処理を高速に行うこと
ができるプロセッサを提供することにある。Therefore, the present invention has been made in view of the above, and an object of the present invention is to provide a processor capable of reducing the decoding time of a machine language instruction and performing processing by the processor at high speed. is there.
[発明の構成] (問題点を解決するための手段) 上記目的を達成するために、この発明は、複数の単位命
令からなる機械語命令のデコードを要する単位命令を単
位命令毎に並行してデコードし、それぞれの単位命令毎
に複数のデコード結果を得て、それぞれのデコード結果
はマイクロプログラムが実行可能な複数のデコード後命
令とこのデコード後命令に付随して上位の単位命令のデ
コード結果を特定するデコード情報とからなる複数のデ
コード手段と、複数のデコード手段にそれぞれ対応して
設けられ、下位の単位命令のデコード結果から得られた
デコード情報又は前機械語命令の最上位のデコード結果
から得られたデコード情報にしたがって対応するデコー
ド手段により得られた複数のデコード結果の中から1つ
のデコード結果を選択する複数の選択手段と、複数の選
択手段によって選択されたそれぞれのデコード結果を保
持し、保持されたデコード結果の内、最上位の選択手段
によって選択されたデコード結果のデコード情報が最下
位の選択手段に与えられ、下位の選択手段によって選択
されたデコード結果のデコード情報が上位の選択手段に
与えられてなる保持手段とから構成される。[Structure of the Invention] (Means for Solving Problems) In order to achieve the above object, according to the present invention, a unit instruction requiring decoding of a machine language instruction including a plurality of unit instructions is executed in parallel for each unit instruction. After decoding, a plurality of decoding results are obtained for each unit instruction, and each decoding result is a plurality of decoded instructions executable by the microprogram and a decoding result of the upper unit instruction accompanying this decoded instruction. Decoding information obtained from the decoding result of the lower unit instruction or the decoding result obtained from the highest-order decoding result of the preceding machine language instruction One decoding result is selected from a plurality of decoding results obtained by the corresponding decoding means according to the obtained decoding information. A plurality of selecting means and a decoding result selected by each of the selecting means, and the decoding information of the decoding result selected by the highest selecting means is the lowest of the held decoding results. The decoding information of the decoding result given to the means and selected by the lower selection means is provided to the upper selection means.
(作用) 上記構成において、この発明は、機械語命令の複数の単
位命令を並行してデコードして、それぞれの単位命令毎
に複数のデコード結果を得て、下位側のデコード結果の
デコード情報にしたがって上位側のデコード結果の中か
ら1つのデコード結果を選択するようにしている。(Operation) In the above configuration, according to the present invention, a plurality of unit instructions of machine language instructions are decoded in parallel, a plurality of decoding results are obtained for each unit instruction, and the decoding information of the decoding result on the lower side is obtained. Therefore, one decoding result is selected from the decoding results on the upper side.
(実施例) 以下、図面を用いてこの発明の一実施例を説明する。Embodiment An embodiment of the present invention will be described below with reference to the drawings.
第1図はこの発明の一実施例に係るプロセッサの構成を
示すブロック図である。同図に示すプロセッサは、単位
命令の命令長を1バイト(8ビット)とする可変長の機
械語命令を2バイトすなわち2単位命令ずつ、2個のデ
コーダを用い並行してデコードするようにしたものであ
る。この実施例では、米国インテル社の32ビットマイク
ロプロセッサ(i APX80386)で取り扱われる機械語命令
のデコードの一例を示している。FIG. 1 is a block diagram showing the configuration of a processor according to an embodiment of the present invention. The processor shown in the figure is configured such that a variable-length machine language instruction having a unit instruction length of 1 byte (8 bits) is decoded in 2 bytes, that is, 2 unit instructions in parallel by using two decoders. It is a thing. This embodiment shows an example of decoding a machine language instruction handled by a 32-bit microprocessor (i APX80386) manufactured by Intel Corporation of the United States.
ここで、第1図の構成を説明する前に、上記プロセッサ
の機械語命令の概略を説明する。Here, before explaining the configuration of FIG. 1, an outline of machine language instructions of the processor will be described.
第2図は上記プロセッサで処理される機械語命令の一部
を示した図であるが、この他にも所望の処理を行うため
に各種の命令が用意されている。FIG. 2 is a diagram showing a part of the machine language instruction processed by the processor. In addition to this, various instructions are prepared for performing desired processing.
上記プロセッサで処理される各種の機械語命令は、その
インストラクションに応じて、第2図に示すように、フ
ォーマット化されており、1バイトから15バイトの可変
長命令体系を有している。Various machine language instructions processed by the processor are formatted according to their instructions as shown in FIG. 2 and have a variable length instruction system of 1 byte to 15 bytes.
このような命令体系を有する機械語命令を命令フォーマ
ット毎に分類すると、第3図に示すように、13種類に分
類される。Machine language instructions having such an instruction system are classified into 13 types, as shown in FIG.
第3図において、“OP1"及び“OP2"は、処理内容を示す
情報であり、“OP2"は拡張された命令であり、“OP1"が
OF(H)の時のみ発生するものである。In FIG. 3, “OP1” and “OP2” are information indicating the processing content, “OP2” is an extended instruction, and “OP1” is
It occurs only when OF (H).
“mod r/m"は汎用レジスタあるいはメモリを指定する情
報であり、“sib"は実行アドレスの算出時に汎用レジス
タを32ビットで指定する情報であり、“mod r/m"が特定
の値をとったときにのみ存在する情報である。"Mod r / m" is information that specifies a general-purpose register or memory, "sib" is information that specifies a general-purpose register with 32 bits when calculating an execution address, and "mod r / m" is a specific value. It is information that exists only when it is taken.
“T/P"のうち“T"は命令によって割り込みを行うための
情報であり、“P"は入出力機器を指定する情報である。
“offset"及び“selector"は実効アドレスをセグメント
方式で算出するために用いられる情報であり、“level"
は特定の命令でのみ使用される情報である。“DISP"は
実効アドレス算出に用いられる変位を示す情報であり、
“IMM"は即値である。ここで、“T/P",“offset",“sel
ector",“level",“DISP",“IMM"はいずれも数値情報で
ある。“Prefix"は命令の先頭に付加され、一連の命令
の中でこの“Prefix"が付加された命令のみアドレスサ
イズあるいはデータサイズ等を変更させる情報である。"T" of "T / P" is information for interrupting by an instruction, and "P" is information for specifying an input / output device.
"Offset" and "selector" are information used to calculate the effective address in the segment method, and "level"
Is information used only in a specific instruction. “DISP” is information that indicates the displacement used to calculate the effective address.
"IMM" is an immediate value. Where “T / P”, “offset”, “sel
ector "," level "," DISP ", and" IMM "are all numerical information." Prefix "is added to the beginning of the instruction, and only the instruction with this" Prefix "added in the series of addresses This is information for changing the size or the data size.
このように機械語命令を分類することによって、同様な
機能、性質を有した命令を同一のハードウエアによって
デコードして、デコード効率を高めるようにしている。By classifying machine language instructions in this way, instructions having similar functions and properties are decoded by the same hardware to improve decoding efficiency.
第3図に示したように分類された機械語命令にあって、
任意の2バイトを選択した場合の命令の組み合わせは、
第4図に示すように、43通りの組み合わせとなる。第4
図に示す“無効”は選択された2バイドのうち上位にあ
るアドレスに分岐した場合に発生するものである。In the machine language instructions classified as shown in FIG. 3,
The combination of instructions when selecting any 2 bytes is
As shown in FIG. 4, there are 43 combinations. Fourth
The "invalid" shown in the figure occurs when a branch is made to a higher address of the selected two bytes.
無効は第4図に記載されているが、無効は単位命令では
なく、機械語命令の下位側のフィールドの値が参照され
ず意味を持たない情報となり、無効として取り扱われる
ということを意味するものであり、便宜上第4図及び第
5図に記載してある。この実施例では、機械語命令を2
バイトづつ並行してデコードしており、下位バイトは偶
数アドレスに設定され、上位バイトは奇数アドレスに設
定されているため、分岐命令が実行されて分岐先アドレ
スが奇数の場合には、機械語命令の先頭は上位の第2の
デコーダ2に供給されるので、下位側の第1のデコーダ
1は無効として取り扱われる。Although invalid is described in FIG. 4, invalid means not a unit instruction, but means that the value of the lower field of the machine language instruction is not referenced and has no meaning, and is treated as invalid. And is shown in FIGS. 4 and 5 for convenience. In this embodiment, two machine language instructions are used.
Since the lower byte is set to an even address and the upper byte is set to an odd address, the instruction is executed in parallel and the machine instruction Is supplied to the upper second decoder 2, the lower first decoder 1 is treated as invalid.
ここで、第4図に示したように分類された機械語命令を
構成するそれぞれの単位命令長の情報は、共通に取扱う
ことができる情報があり、“T/P"及び“offset"を“DIS
P"として扱い、“Selector",“level"を“IMM"として扱
い、“Prefix",“OP1"を“先頭”として扱うようにす
る。このようにすることによって、第4図に示した2バ
イトの組み合わせは、第5図に示すように簡単化され
る。Here, the information of the unit instruction lengths that compose the machine language instructions classified as shown in FIG. 4 has information that can be commonly handled, and "T / P" and "offset" are set to " DIS
P "is treated," Selector "and" level "are treated as" IMM ", and" Prefix "and" OP1 "are treated as" head ". By doing this, the 2 shown in FIG. The combination of bytes is simplified as shown in FIG.
第5図に示すような組み合わせにおいて、デコードすべ
き単位命令長の情報は、“無効",“先頭",“OP2",“mod
r/m",“sib",“DISP",“IMM"で十分である。したがっ
て、ある1バイトの情報をデコードした結果、この情報
の上位のアドレスにある1バイトの情報は、上記に示し
た7つの情報のうちの1つとなる。In the combination as shown in FIG. 5, the unit instruction length information to be decoded is "invalid", "start", "OP2", "mod".
r / m "," sib "," DISP "," IMM "are enough. Therefore, as a result of decoding a certain 1-byte information, the 1-byte information at the higher address of this information is shown above. It is one of the seven information items.
ここで、“DISP"は“先頭",“OP2",“mod r/m",“sib"
のいずれかのデコード結果として得られ、“IMM"は“先
頭,“OP2",“mod r/m"のいずれかのデコード結果とし
て得られ、“DISP"及び“IMM"は数値情報であり、エン
コードされたものではないのでデコード処理は不要とな
る。また、“無効”は次のバイトが機械語命令の先頭で
あることを示し、それ自体に意味がないのでデコード処
理は不要となる。したがって、デコード処理は、上述し
た7つの情報のうち、“先頭",“OP2",“mod r/m",“si
b"の4つについて行えばよいことになる。。Here, "DISP" is "start", "OP2", "mod r / m", "sib"
“IMM” is obtained as the decoding result of any of “head,“ OP2 ”, and“ mod r / m ”, and“ DISP ”and“ IMM ”are numerical information. Decoding is not necessary because it is not encoded, and “invalid” indicates that the next byte is the beginning of the machine language instruction, and since it has no meaning in itself, decoding is unnecessary. In the decoding process, among the above-mentioned seven information, “head”, “OP2”, “mod r / m”, “si
All you have to do is four of b ".
次に、第1図に戻って、この実施例の構成及び作用を順
に説明する。Next, returning to FIG. 1, the configuration and operation of this embodiment will be described in order.
同図に示すマイクロプロセッサは、第1デコーダ1,第2
デコーダ2,第1セレクタ3,第2セレクタ4及びレジスタ
5,6を有している。The microprocessor shown in the figure includes a first decoder 1 and a second decoder 2.
Decoder 2, first selector 3, second selector 4 and register
It has 5,6.
第1デコーダ1は、外部から2バイトづつ与えられる機
械語命令7のうち小さいアドレス(1バイト目)の単位
命令長の情報を、マイクロプログラムが解釈、実行可能
な命令形式の情報にデコードするものである。すなわ
ち、コード化されて与えられる情報を、前述したよう
に、“先頭",“OP2",“mod r/m"“sib"として4通りに
デコードするものであり、各々のデコード結果は第1セ
レクタ3に供給される。The first decoder 1 decodes information of a unit instruction length of a small address (first byte) of a machine language instruction 7 given from the outside in units of 2 bytes into information of an instruction format that can be interpreted and executed by a microprogram. Is. That is, the coded and given information is decoded in four ways as "head", "OP2", "mod r / m""sib", as described above, and the decoding result of each is the first. It is supplied to the selector 3.
第2デコーダ2は、2バイトの機械語命令7のうち大き
いアドレス(2バイト目)の単位命令長の情報を、上記
の第1デコーダ1と同様にデコードするものであり、各
々のデコード結果は第2セレクタ4に供給される。ここ
で、2バイトの機械語命令7は同時に各々のデコーダに
与えられる。The second decoder 2 decodes the unit instruction length information of the larger address (2nd byte) of the 2-byte machine language instruction 7 in the same manner as the first decoder 1 described above. It is supplied to the second selector 4. Here, the 2-byte machine language instruction 7 is simultaneously applied to each decoder.
第1セレクタ3は、第1デコーダの4通りのデコード結
果の中から、レジスタ6に一時的に保持される情報にし
たがって、1つのデコード結果を選択するものである。
選択されたデコード結果は、1バイト目の情報のデコー
ド結果8と上位のアドレスの情報すなわち2バイト目の
情報がどのような情報であるかを示すデコード情報9と
からなっている。このうち、1バイト目の情報のデコー
ド結果8はレジスタ5に供給され、2バイト目のデコー
ド情報9は第2セレクタ4に供給される。The first selector 3 selects one of the four decoding results of the first decoder according to the information temporarily stored in the register 6.
The selected decoding result is composed of the decoding result 8 of the information of the first byte and the decoding information 9 indicating the information of the higher address, that is, the information of the second byte. Of these, the decoding result 8 of the information of the first byte is supplied to the register 5, and the decoding information 9 of the second byte is supplied to the second selector 4.
第2セレクタ4は、第1セレクタ3と同様に、第2デコ
ーダ2の4通りのデコード結果の中から1つのデコード
結果を選択するものであるが、この選択は、第1デコー
ダ1と異なり、第1セレクタ3から出力される2バイト
目のデコード情報9にしたがって行われる。Like the first selector 3, the second selector 4 selects one decoding result from the four decoding results of the second decoder 2, but this selection is different from the first decoder 1. This is performed according to the second byte of decode information 9 output from the first selector 3.
選択されたデコード結果は、2バイト目の情報のデコー
ド結果10と、この2バイトの機械語命令の次に与えられ
る2バイトの機械語命令のうち小さいアドレスにある情
報がどのような情報であるかを示すデコード情報11とか
らなっている。このうち、2バイト目の情報のデコード
結果10はレジスタ5に供給され、デコード情報11はレジ
スタ6に供給される。The selected decoding result is the decoding result 10 of the information of the second byte and what information is at a small address of the 2-byte machine language instruction given next to this 2-byte machine language instruction. It is composed of decoding information 11 indicating whether or not. Of these, the decoding result 10 of the information of the second byte is supplied to the register 5, and the decoding information 11 is supplied to the register 6.
第1のセレクタ3により選択されたデコード結果の内デ
コード情報9は、選択されるとともに第2のセレクタ4
に供給されるため、スルーラッチ回路等によって保持出
力される。一方、第2のセレクタ4により選択されたデ
コード結果の内デコード情報11は、次機械語命令の下位
のデコード結果を選択するため、デコード情報9のよう
に保持するとともに保持した時の命令サイクルの期間内
に第1のセレクタ3に出力する必要がなく、次の命令サ
イクルでレジスタ6に出力されるようにすればよいの
で、フリップフロップ回路等によって保持される。The decoding information 9 of the decoding results selected by the first selector 3 is selected and the second selector 4
Therefore, it is held and output by a through latch circuit or the like. On the other hand, the decode information 11 of the decode results selected by the second selector 4 is held as the decode information 9 in order to select the lower decode result of the next machine language instruction. It is not necessary to output to the first selector 3 within the period, and it is sufficient to output to the register 6 in the next instruction cycle, so that it is held by the flip-flop circuit or the like.
したがって、デコード情報9は、1つの命令サイクルの
期間内に非同期に第1のセレクタ3により選択されてス
ルーラッチ回路等に保持されるとともに第2のセレクタ
4に供給される。Therefore, the decode information 9 is asynchronously selected by the first selector 3 within one instruction cycle, held in the through latch circuit or the like, and supplied to the second selector 4.
なお、デコーダ及びセレクタが増加した場合であって
も、デコード結果として得られるそれぞれのデコード情
報は、最上位のデコード情報を除いて1つの命令サイク
ルの期間内に下位側から上位側に非同期に伝達されるよ
うに、デコーダ、セレクタ及びスルーラッチ回路を設計
するようにすればよい。Even when the number of decoders and selectors is increased, each piece of decode information obtained as a decoding result is asynchronously transmitted from the lower side to the upper side within one instruction cycle except for the highest-order decode information. As described above, the decoder, selector, and through latch circuit may be designed.
レジスタ5は、第1セレクタ3によって選択された1バ
イト目のデコード結果8及び第2セレクタ4によって選
択された2バイト目のデコード結果10を各々所定の領域
に格納保持するものであり、格納保持された情報によっ
てマイクロプログラムが解釈、実行される。The register 5 stores and holds the decoding result 8 of the first byte selected by the first selector 3 and the decoding result 10 of the second byte selected by the second selector 4 in predetermined areas. The information is interpreted and executed by the microprogram.
レジスタ6は、第2セレクタ4によって選択されたデコ
ード結果のデコード情報11を格納保持するものであり、
この格納保持されたデコード情報11は第1セレクタ3に
供給される。The register 6 stores and holds the decoding information 11 of the decoding result selected by the second selector 4,
The stored and held decode information 11 is supplied to the first selector 3.
以上説明したように、この実施例は構成されており、次
にこの実施例の作用を説明する。As described above, this embodiment is constructed. Next, the operation of this embodiment will be described.
ここで、外部から与えられる2バイトの機械語命令のう
ち、例えば小さいアドレス(1バイト目)の情報を“先
頭”とし、大きいアドレス(2バイト目)の情報を“mo
d r/m"とした場合について説明する。Here, in a 2-byte machine language instruction given from the outside, for example, the information of a small address (first byte) is set as the "head" and the information of a large address (second byte) is set as "mo".
The case of "dr / m" will be described.
外部から同時に2バイトの機械語命令7が与えられる
と、小さいアドレスの情報は第1デコーダ1に与えら
れ、大きいアドレスの情報は第2デコーダ2に与えられ
る。When a 2-byte machine language instruction 7 is simultaneously applied from the outside, information of a small address is given to the first decoder 1 and information of a large address is given to the second decoder 2.
小さいアドレスの情報が第1デコーダ1に与えられる
と、この情報は第1デコーダ1によって“先頭",“OP
2",“mod r/m",“sib"の4通りにデコードされる。これ
らのデコード結果のうち“先頭”のデコード結果が、上
記の機械語命令7の前に与えられた機械語命令の大きい
アドレスのデコード結果のうちレジスタ6に保持されて
いるデコード情報(1バイト目の情報が“先頭”である
ことを示す情報)にしたがって、第1セレクタ3により
選択される。When the information of a small address is given to the first decoder 1, this information is "first", "OP" by the first decoder 1.
2 "," mod r / m "," sib "are decoded in four ways. The" leading "decoding result of these decoding results is the machine language instruction given before the above machine language instruction 7. Is selected by the first selector 3 in accordance with the decode information (information indicating that the information of the first byte is the "head") held in the register 6 among the decoded results of the larger address.
選択されたデコード結果のうち、“先頭”としてマイク
ロプログラムが解釈、実行する情報8はレジスタ8に与
えられて格納保持され、大きいアドレスのデコード情報
(大きいアドレスの情報が“mod r/m"であることを示す
情報)9は第2セレクタ4に与えられる。Of the selected decoding results, the information 8 which the microprogram interprets and executes as the "head" is given to the register 8 and stored and held, and the decoding information of the large address (the information of the large address is "mod r / m" Information 9 indicating that there is) is given to the second selector 4.
一方、2バイト同時に与えられた機械語命令7のうち、
大きいアドレスの情報は、第1デコーダ1のデコード動
作と同時に第2デコーダ2によって、“先頭",“OP2",
“mod r/m",“sib"の4通りにデコードされる。これら
のデコード結果のうち“mod r/m"が、第1セレクタ3か
ら与えられるデコード情報9にしたがって第2セレクタ
4により選択される。On the other hand, of the machine language instructions 7 given simultaneously for 2 bytes,
The information of the large address is transferred to the "head", "OP2",
It is decoded in 4 ways: "mod r / m" and "sib". Of these decoding results, “mod r / m” is selected by the second selector 4 in accordance with the decoding information 9 given from the first selector 3.
選択されたデコード結果のうち、“mod r/m"としてマイ
クロプログラムが解釈、実行する情報10はレジスタ5に
格納保持され、デコード情報11はレジスタ6に与えられ
て一時的に保持され、次に与えられる2バイトの機械語
命令の小さいアドレスの情報のデコード結果を選択する
際に用いられる。なお、2バイトの機械語命令のうち、
デコードの必要がない情報例えば“DISP",“IMM"等は、
各々のデコーダを介さずに直接レジスタ5に与えられて
格納される。Of the selected decoding results, the information 10 that the microprogram interprets and executes as "mod r / m" is stored and held in the register 5, the decoding information 11 is given to the register 6 and temporarily held, and then It is used when selecting the decoding result of information of a small address of a given 2-byte machine language instruction. Of the 2-byte machine language instructions,
Information that does not need to be decoded, such as "DISP", "IMM",
It is directly applied to and stored in the register 5 without going through each decoder.
このようにして、2バイトの機械語命令を並行してデコ
ードすることによって、第6図に示すように、2バイト
の機械命令は1マシンサイクルでデコードすることがで
きるようになる。したがって、1バイトの機械語命令は
1/2マシンサイクルでデコードされ、多数の単位命令で
構成される機械語命令は、従来に比べて1/2の時間でデ
コードすることができる。In this way, by decoding the 2-byte machine language instruction in parallel, the 2-byte machine instruction can be decoded in one machine cycle as shown in FIG. Therefore, a 1-byte machine language instruction is
Machine language instructions that are decoded in 1/2 machine cycle and consist of many unit instructions can be decoded in 1/2 time compared with the conventional method.
なお、この発明の一実施例は、米国インテル社の32ビッ
トマイクロプロセッサ(i APX80386)で用いられている
機械語命令のデコード例を示したが、これに限ることは
なく、同様な可変長機械語命令であってもよいことは勿
論である。また、並行してデコードしようとする機械語
命令は2バイトに限ることはなく、用いるデコーダの数
に応じて増加させてもよい。さらに、第1図に示したマ
イクロプロセッサに与えられる機械語命令を、この機械
語命令が所定数デコードされる毎に、例えば外部メモリ
からこのマイクロプロセッサ内のバッファに所定数格納
保持して、このバッファからマイクロプロセッサに与え
るようにすることもできる。さらにまた、第1及び第2
セレクタを各々対応するデコーダの入力側に設け、デコ
ードしようとする機械語命令の情報を予め選択して各々
のデコーダに与えるようにしてもよい。ただしこの場合
には、並行してデコードされる例えば2バイトの機械語
命令のデコード時間が短く、1マシンサイクルでデコー
ドされることが条件となる。Although one embodiment of the present invention shows an example of decoding a machine language instruction used in a 32-bit microprocessor (i APX80386) manufactured by Intel Corporation of the United States, the invention is not limited to this, and a similar variable-length machine may be used. Of course, it may be a word instruction. The machine language instruction to be decoded in parallel is not limited to 2 bytes, and may be increased according to the number of decoders used. Further, every time a predetermined number of machine language instructions given to the microprocessor shown in FIG. 1 are decoded, a predetermined number of machine language instructions are stored and held from an external memory in a buffer in the microprocessor. The buffer may be supplied to the microprocessor. Furthermore, the first and second
The selectors may be provided on the input sides of the corresponding decoders, and the information of the machine language instruction to be decoded may be selected in advance and given to each decoder. However, in this case, the decoding time of, for example, a 2-byte machine language instruction that is decoded in parallel is short, and the decoding is required in one machine cycle.
[発明の効果] 以上説明したように、この発明によれば、機械語命令の
所定数の単位命令を並行してデコードするようにしたの
で、可変長機械語命令のデコード時間が短縮され、プロ
セッサによる処理を高速に行うプロセッサを提供するこ
とができる。[Effects of the Invention] As described above, according to the present invention, a predetermined number of unit instructions of machine language instructions are decoded in parallel, so that the decoding time of variable length machine language instructions is shortened and the processor It is possible to provide a processor that performs the processing according to the above.
第1図はこの発明の一実施例に係るプロセッサの構成を
示すブロック図、第2図乃至第5図は第1図のプロセッ
サで処理される命令を示す図、第6図は第1図のプロセ
ッサのタイミング図である。 (図の主要な部分を表わす符号の説明) 1……第1デコーダ、2……第2デコーダ 3……第1セレクタ、4……第2セレクタ 5,6……レジスタ1 is a block diagram showing a configuration of a processor according to an embodiment of the present invention, FIGS. 2 to 5 are diagrams showing instructions processed by the processor of FIG. 1, and FIG. 6 is a diagram showing FIG. FIG. 9 is a timing diagram of a processor. (Explanation of symbols representing main parts of the drawing) 1 ... First decoder, 2 ... Second decoder 3 ... First selector, 4 ... Second selector 5, 6 ... Register
Claims (1)
ードを要する単位命令を単位命令毎に並行してデコード
し、それぞれの単位命令毎に複数のデコード結果を得
て、それぞれのデコード結果はマイクロプログラムが実
行可能な複数のデコード後命令とこのデコード後命令に
付随して上位の単位命令のデコード結果を特定するデコ
ード情報とからなる複数のデコード手段と、 複数のデコード手段にそれぞれ対応して設けられ、下位
の単位命令のデコード結果から得られたデコード情報又
は前機械語命令の最上位のデコード結果から得られたデ
コード情報にしたがって対応するデコード手段により得
られた複数のデコード結果の中から1つのデコード結果
を選択する複数の選択手段と、 複数の選択手段によって選択されたそれぞれのデコード
結果を保持し、保持されたデコード結果の内、最上位の
選択手段によって選択されたデコード結果のデコード情
報が最下位の選択手段に与えられ、下位の選択手段によ
って選択されたデコード結果のデコード情報が上位の選
択手段に与えられてなる保持手段と を有することを特徴とするプロセッサ。1. A unit instruction that requires decoding of a machine language instruction composed of a plurality of unit instructions is decoded in parallel for each unit instruction, and a plurality of decoding results are obtained for each unit instruction. Corresponding to each of the plurality of decoding means, which is composed of a plurality of decoded instructions executable by the microprogram and decode information for specifying the decoded result of the upper unit instruction accompanying the decoded instructions, From among the plurality of decoding results obtained by the corresponding decoding means according to the decoding information obtained from the decoding result of the lower unit instruction or the decoding information obtained from the highest decoding result of the previous machine language instruction A plurality of selection means for selecting one decoding result and the respective decoding means selected by the plurality of selection means. The decoding information of the decoding result holding the result, of which the decoding result of the decoding result selected by the uppermost selecting means is given to the lowermost selecting means, and the decoding information of the decoding result selected by the lower selecting means. And a holding means provided to a higher-order selection means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62076488A JPH0760383B2 (en) | 1987-03-31 | 1987-03-31 | Processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62076488A JPH0760383B2 (en) | 1987-03-31 | 1987-03-31 | Processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63244233A JPS63244233A (en) | 1988-10-11 |
| JPH0760383B2 true JPH0760383B2 (en) | 1995-06-28 |
Family
ID=13606601
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62076488A Expired - Fee Related JPH0760383B2 (en) | 1987-03-31 | 1987-03-31 | Processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0760383B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2834289B2 (en) * | 1990-07-20 | 1998-12-09 | 株式会社日立製作所 | Microprocessor |
-
1987
- 1987-03-31 JP JP62076488A patent/JPH0760383B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPS63244233A (en) | 1988-10-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0220682B1 (en) | Data processing system | |
| JPS6312029A (en) | information processing equipment | |
| EP0489266A2 (en) | Computer and method for performing immediate calculation by utilizing the computer | |
| US11397583B2 (en) | Conditional execution specification of instructions using conditional extension slots in the same execute packet in a VLIW processor | |
| EP0275170B1 (en) | Instruction decoder | |
| JPH03218523A (en) | Data processor | |
| US12265827B2 (en) | Forming constant extensions in the same execute packet in a VLIW processor | |
| EP1039375A1 (en) | Method and apparatus for implementing zero overhead loops | |
| US6763450B1 (en) | Processor | |
| JPH0760383B2 (en) | Processor | |
| US20050033938A1 (en) | Network processing system, core language processor and method of executing a sequence of instructions in a stored program | |
| US6611211B2 (en) | Data mask coding | |
| US20040210748A1 (en) | Processor and method capable of executing conditional instructions | |
| JPS59160239A (en) | information processing equipment | |
| JPH0713758A (en) | Instruction decoding method | |
| JP3643270B2 (en) | Data processing device | |
| JPH01284926A (en) | Instruction reading system for arithmetic unit | |
| JPH0575130B2 (en) | ||
| JP2001229075A (en) | Bi-endian multiple instruction length execution method | |
| JPH0520056A (en) | Instruction decoding device for integrated circuit microprocessor | |
| JPH06131150A (en) | Encoder | |
| JPH02236631A (en) | microprocessor | |
| JPH02140832A (en) | Parallel processor | |
| JPS63145534A (en) | Data processor | |
| JPH0728639A (en) | Microprocessor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |