JPH08286911A - Machine word instruction translating method - Google Patents

Machine word instruction translating method

Info

Publication number
JPH08286911A
JPH08286911A JP8553595A JP8553595A JPH08286911A JP H08286911 A JPH08286911 A JP H08286911A JP 8553595 A JP8553595 A JP 8553595A JP 8553595 A JP8553595 A JP 8553595A JP H08286911 A JPH08286911 A JP H08286911A
Authority
JP
Japan
Prior art keywords
code
opcode
operation code
machine language
bit
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
JP8553595A
Other languages
Japanese (ja)
Inventor
Akinari Fukui
昭也 福井
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.)
Renesas Design Corp
Mitsubishi Electric Corp
Mitsubishi Electric Semiconductor Systems Corp
Original Assignee
Renesas Design Corp
Mitsubishi Electric Corp
Mitsubishi Electric Semiconductor Systems Corp
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 Renesas Design Corp, Mitsubishi Electric Corp, Mitsubishi Electric Semiconductor Systems Corp filed Critical Renesas Design Corp
Priority to JP8553595A priority Critical patent/JPH08286911A/en
Publication of JPH08286911A publication Critical patent/JPH08286911A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To reduce a capacity of a memory for storing an application program of a computer by decoding a read operation code (OP code) into a microinstruction after converting it into a defined conversion pattern when that OP code can be defined, but decoding that OP code into the microinstruction as it is in the other case. CONSTITUTION: A part in the code arrangement of the OP code is previously reserved as the OP code, that can be defined, and defined in a conversion table inside an OP code length converting circuit 7. Then, an OP code length discrimination circuit 6 discriminates whether the read OP code is the definable OP code defined in that conversion table or not. In the case of definable OP code, it is decoded into the microinstruction after being converted to the conversion pattern while referring to the conversion table, but when it is not the definable OP code, that OP code is decoded into the microinstruction as it is. Thus, the OP code of a machine word instruction having the high frequency of usage in the application program can be mapped into a much shorter definable OP code corresponding to the definition change of the conversion table.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、マイクロプログラム
制御方式によるマイクロコンピュータなどのコンピュー
タにおいて、その機械語命令をコンピュータ内部の動作
を指示するマイクロ命令にデコードする機械語命令翻訳
方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a machine language instruction translation method for decoding a machine language instruction into a microinstruction for instructing an operation inside the computer in a computer such as a microcomputer by a microprogram control system.

【0002】[0002]

【従来の技術】図5は従来の機械語命令翻訳方法が適用
されたマイクロコンピュータの要部を示すブロック図で
ある。図において、1は機械語命令のオペコードをラッ
チするオペコードラッチ回路であり、2はこのオペコー
ドラッチ回路1でラッチされたオペコードをマイクロ命
令に変換する機械語デコーダである。3はマイクロ命令
が蓄積された読み取り専用メモリ(ROM)によるマイ
クロプログラムメモリであり、4は機械語デコーダ2で
変換されたマイクロ命令、あるいはマイクロプログラム
メモリ3から読み出されたマイクロ命令が格納されるマ
イクロ命令レジスタである。5はこのマイクロ命令レジ
スタ4に格納されたマイクロ命令に基づいて、当該マイ
クロコンピュータの内部動作を指示する制御信号を生成
する制御回路である。
2. Description of the Related Art FIG. 5 is a block diagram showing a main part of a microcomputer to which a conventional machine language instruction translation method is applied. In the figure, 1 is an operation code latch circuit for latching an operation code of a machine language instruction, and 2 is a machine language decoder for converting an operation code latched by the operation code latch circuit 1 into a micro instruction. Reference numeral 3 is a microprogram memory including a read-only memory (ROM) in which microinstructions are stored, and 4 is a microinstruction converted by the machine language decoder 2 or a microinstruction read from the microprogram memory 3. It is a micro instruction register. A control circuit 5 generates a control signal for instructing the internal operation of the microcomputer, based on the micro instruction stored in the micro instruction register 4.

【0003】次に動作について説明する。ここで、マイ
クロコンピュータの機械語命令はオペコードとオペラン
ドによって構成されており、オペコードはマイクロコン
ピュータの動作を指示するものであり、オペランドはデ
ータの格納場所やパラメータなどを指示するものであ
る。なお、このオペコードは図示を省略したメモリに記
憶されている。
Next, the operation will be described. Here, the machine language instruction of the microcomputer is composed of an operation code and an operand, the operation code is for instructing the operation of the microcomputer, and the operand is for instructing a data storage location, a parameter and the like. The opcode is stored in a memory (not shown).

【0004】まず、そのメモリに記憶されているオペコ
ードがデータバスを介して読み出され、オペコードラッ
チ回路1にラッチされる。次に、機械語デコーダ2がこ
のオペコードラッチ回路1によってラッチされているオ
ペコードを、当該マイクロコンピュータの内部動作を指
示するマイクロ命令に変換し、それをマイクロ命令レジ
スタ4に格納する。マイクロ命令レジスタ4に格納され
たマイクロ命令は制御回路5に送られ、制御回路5はそ
のマイクロ命令に基づいて、当該マイクロコンピュータ
の内部動作を指示する制御信号を生成・出力する。以降
のマイクロ命令はマイクロプログラムメモリ3から読み
出されてマイクロ命令レジスタ4に格納され、制御回路
5はそのマイクロ命令に応じて制御信号を生成・出力す
る。
First, the operation code stored in the memory is read out via the data bus and latched in the operation code latch circuit 1. Next, the machine language decoder 2 converts the operation code latched by the operation code latch circuit 1 into a micro instruction for instructing the internal operation of the microcomputer, and stores it in the micro instruction register 4. The microinstruction stored in the microinstruction register 4 is sent to the control circuit 5, and the control circuit 5 generates and outputs a control signal instructing the internal operation of the microcomputer based on the microinstruction. Subsequent microinstructions are read from the microprogram memory 3 and stored in the microinstruction register 4, and the control circuit 5 generates and outputs a control signal according to the microinstruction.

【0005】なお、このような従来の機械語命令翻訳方
法に関連のある技術が記載された文献としては、例えば
特開平5−165650号公報、特開昭63−1659
28号公報などがある。
Documents describing techniques related to such a conventional machine language instruction translation method are, for example, Japanese Patent Laid-Open No. 5-165650 and Japanese Patent Laid-Open No. 63-1659.
28 publication.

【0006】[0006]

【発明が解決しようとする課題】従来の機械語命令翻訳
方法は以上のように構成されているので、オペコードの
ビットパターンとコンピュータの動作との関係を固定に
する必要があった。一方、マイクロコンピュータなどの
メモリ容量に制約のあるコンピュータでは、応用プログ
ラムを記憶するメモリの容量を小さなものにするため
に、使用頻度が高いと思われる機械語命令のオペコード
には短いコード長のビットパターンを割り当てるように
工夫していた。しかしながら、実際のマイクロコンピュ
ータにおいては、その応用プログラムでの機械語命令の
使用頻度は応用の内容によってまちまちであり、ビット
パターンの割り当てが前述のように固定的になると、必
ずしもその応用に最適な機械語命令のオペコードがコー
ド長の短いビットパターンに割り当てられなくなるとい
う問題点があった。
Since the conventional machine language instruction translation method is configured as described above, it is necessary to fix the relationship between the bit pattern of the operation code and the operation of the computer. On the other hand, in a computer such as a microcomputer with a limited memory capacity, the operation code of a machine language instruction that is likely to be used frequently has a short code length bit in order to reduce the memory capacity for storing application programs. I was trying to assign a pattern. However, in an actual microcomputer, the frequency of use of machine language instructions in the application program varies depending on the content of the application, and if the bit pattern allocation is fixed as described above, the machine that is most suitable for the application is not necessarily required. There is a problem that the operation code of the word instruction cannot be assigned to the bit pattern having a short code length.

【0007】この発明は上記のような問題点を解消する
ためになされたもので、コンピュータの個々の応用プロ
グラムの実際に使用されている機械語命令の使用頻度を
もとに、使用頻度の高い機械語命令のオペコードを、コ
ード長の短いビットパターンに割り当てることができる
機械語命令翻訳方法を得ることを目的とし、その結果、
コンピュータの応用プログラムを記憶するメモリの容量
を削減することを目的とする。
The present invention has been made in order to solve the above problems, and is frequently used based on the frequency of use of machine language instructions actually used by individual application programs of a computer. The object of the present invention is to obtain a machine language instruction translation method that can assign an operation code of a machine language instruction to a bit pattern with a short code length, and as a result,
The object is to reduce the capacity of the memory that stores the application program of the computer.

【0008】[0008]

【課題を解決するための手段】この発明に係る機械語命
令翻訳方法は、オペコードのコード配置の一部にリザー
ブしておいた定義可能なオペコードについて、その変換
パターンを前もって変換テーブルに定義しておき、読み
込んだオペコードが変換テーブルに定義された定義可能
なオペコードであればそれを定義された変換パターンに
変換した後に、定義可能なオペコードでなければそれを
そのまま、当該コンピュータ内部の動作を指示するマイ
クロ命令にデコードするものである。
A machine language instruction translation method according to the present invention defines a conversion pattern in advance in a conversion table for a definable opcode reserved for a part of the code arrangement of the opcode. If the read opcode is a definable opcode defined in the conversion table, it is converted to a defined conversion pattern, and if it is not a definable opcode, it is used as it is and the internal operation of the computer is instructed. It decodes into microinstructions.

【0009】[0009]

【作用】この発明における機械語命令翻訳方法は、オペ
コードのコード配置の一部を事前に定義可能なオペコー
ドとしてリザーブしておいて、変換テーブルにその定義
可能なオペコードの変換パターンを定義しておき、読み
込まれたオペコードがその変換テーブルに定義された定
義可能なオペコードか否かを判別して、定義可能なオペ
コードであれば、変換テーブルを参照してそれを変換パ
ターンに変換した後に、定義可能なオペコードでなけれ
ばそのオペコードをそのまま、マイクロ命令にデコード
することにより、変換テーブルの定義変更にて、当該応
用プログラム中の使用頻度の高い機械語命令のオペコー
ドを、よりコード長の短い定義可能なオペコードに写像
することを可能にする。
In the machine language instruction translation method according to the present invention, a part of the code arrangement of the opcode is reserved as an opcode that can be defined in advance, and the conversion pattern of the opcode that can be defined is defined in the conversion table. , If the read opcode is a definable opcode defined in the conversion table, and if it is a definable opcode, it can be defined after converting it to a conversion pattern by referring to the conversion table. If the opcode is not a valid opcode, the opcode of the machine instruction that is frequently used in the application program can be defined with a shorter code length by changing the definition of the conversion table by directly decoding the opcode. Allows you to map to an opcode.

【0010】[0010]

【実施例】【Example】

実施例1.以下、この発明の一実施例を図について説明
する。図1はこの発明の実施例1による機械語命令翻訳
方法が適用されたマイクロコンピュータの要部を示すブ
ロック図である。なお、この図1に示すマイクロコンピ
ュータは、機械語命令として基本コード長が16ビット
のオペコードを持つもので、オペコードのコード配置の
一部を定義可能なオペコードとしてリザーブしておき、
使用頻度の高い機械語命令のオペコードをその定義可能
なオペコード(8ビット長のオペコード)に写像して短
縮するものについて示している。図において、1はオペ
コードラッチ回路、2は機械語デコーダ、3はマイクロ
プログラムメモリ、4はマイクロ命令レジスタ、5は制
御回路であり、図5に同一符号を付した従来のそれらと
同一、もしくは相当部分であるため詳細な説明は省略す
る。
Example 1. An embodiment of the present invention will be described below with reference to the drawings. 1 is a block diagram showing a main part of a microcomputer to which a machine language instruction translation method according to a first embodiment of the present invention is applied. The microcomputer shown in FIG. 1 has an opcode having a basic code length of 16 bits as a machine language instruction, and reserves a part of the code arrangement of the opcode as an opcode that can be defined.
The operation code of a machine language instruction that is frequently used is mapped to a definable operation code (8-bit length operation code) and shortened. In the figure, 1 is an operation code latch circuit, 2 is a machine language decoder, 3 is a micro program memory, 4 is a micro instruction register, and 5 is a control circuit. Since it is a part, detailed description is omitted.

【0011】また、6はオペコードラッチ回路1にラッ
チされた機械語命令のオペコードの上位8ビットが入力
され、それが短縮された8ビット長のオペコードである
か否か、すなわちオペコードのコード配置の一部にリザ
ーブされている定義可能なオペコードであるか否かを判
別するオペコード長判別回路である。7は前記定義可能
なオペコードである短縮された8ビット長のオペコード
と、その変換パターンである短縮されていない16ビッ
ト長のオペコードとの対応関係が、応用プログラムの作
成者によって事前に定義された変換テーブルを内蔵し、
オペコード長判別回路6にて短縮された8ビット長のオ
ペコードと判定されたものについては、前記変換テーブ
ルを参照して短縮されていない16ビット長のオペコー
ドに変換するオペコード長変換回路である。8はオペコ
ード長判別回路6の判別結果に基づいて、このオペコー
ド長変換回路7にて8ビット長のオペコードから変換さ
れた16ビット長のオペコード、あるいはオペコードラ
ッチ回路1にラッチされている16ビット長のオペコー
ドの一方を選択し、それを機械語デコーダ2に転送する
セレクタである。
Reference numeral 6 indicates whether or not the upper 8 bits of the operation code of the machine language instruction latched by the operation code latch circuit 1 is input and whether or not the operation code is a shortened operation code of 8 bits, that is, the code arrangement of the operation code. This is an operation code length determination circuit that determines whether or not the operation code can be defined and is partially reserved. Reference numeral 7 indicates the correspondence between the shortened 8-bit opcode, which is the definable opcode, and the 16-bit opcode, which is the conversion pattern and is not shortened, which is defined in advance by the creator of the application program. Built-in conversion table,
The operation code length conversion circuit that converts the operation code that has been shortened by the operation code length determination circuit 6 into the 16-bit operation code that has not been shortened by referring to the conversion table. 8 is a 16-bit length opcode converted from the 8-bit opcode by the opcode length conversion circuit 7 based on the discrimination result of the opcode length discrimination circuit 6 or the 16-bit length latched by the opcode latch circuit 1. Is a selector that selects one of the opcodes and transfers it to the machine language decoder 2.

【0012】図2はこの実施例1によるマイクロコンピ
ュータの応用プログラムのメモリ配置を示す説明図であ
る。図において、10a,10b,10c,10d,・
・・・は個々の機械語命令であり、11a,11b,1
1c,11d,・・・・はそのオペコード、12a,1
2b,12d1 ,12d2 ,・・・・はオペランドであ
る。1つの機械語命令は1個のオペコードと0個から数
個のオペランドから構成されており、図示の例では、機
械語命令10aは8ビットのオペコード11aと1つの
オペランド12aによって、機械語命令10bは16ビ
ットのオペコード11bと1つのオペランド12bによ
って、命令10cは8ビットのオペコード11cのみに
よって、機械語命令10dは8ビットのオペコード10
dと2つのオペランド12d1 、12d2 によってそれ
ぞれ構成されている。
FIG. 2 is an explanatory diagram showing the memory layout of the application program of the microcomputer according to the first embodiment. In the figure, 10a, 10b, 10c, 10d, ...
... are individual machine language instructions, and 11a, 11b, 1
1c, 11d, ... are the opcodes, 12a, 1
2b, 12d 1 , 12d 2 , ... Are operands. One machine language instruction is composed of one opcode and 0 to several operands. In the illustrated example, the machine language instruction 10a consists of an 8-bit opcode 11a and one operand 12a, and a machine language instruction 10b. Is a 16-bit opcode 11b and one operand 12b, the instruction 10c is an 8-bit opcode 11c only, and the machine language instruction 10d is an 8-bit opcode 10
d and two operands 12d 1 and 12d 2 respectively.

【0013】次に動作について説明する。オペコードラ
ッチ回路1はデータバスを介して読み込んだ機械語命令
のオペコードを16ビット単位でラッチする。なお、図
2に示す機械語命令10aのオペコード11aを読み込
んでラッチする場合、この機械語命令10aのオペコー
ド11aは8ビット長であり、ラッチは16ビット単位
で行われるため、オペコードラッチ回路1の残った8ビ
ットにはオペランド12aが格納される。このオペコー
ドラッチ回路1にラッチされたオペコードは、オペコー
ド長判別回路6により、短縮された8ビット長のオペコ
ードか、短縮されていない16ビット長のオペコードか
が判別される。
Next, the operation will be described. The operation code latch circuit 1 latches the operation code of the machine language instruction read via the data bus in units of 16 bits. When the operation code 11a of the machine language instruction 10a shown in FIG. 2 is read and latched, the operation code 11a of the machine language instruction 10a has a length of 8 bits and the latch is performed in units of 16 bits. Operand 12a is stored in the remaining 8 bits. The opcode latched by the opcode latch circuit 1 is discriminated by the opcode length discriminating circuit 6 as a shortened 8-bit opcode or an unshortened 16-bit opcode.

【0014】ここで、図3はオペコードラッチ回路1に
ラッチされた16ビットのデータの上位8ビットのビッ
トパターンをもとに、それが短縮された8ビット長のオ
ペコードか16ビット長のオペコードかを割り振るビッ
ト割り当てを示す説明図である。上記オペコード長判別
回路6による判別は、オペコードラッチ回路1でラッチ
した16ビットのデータの上位8ビットのビットパター
ンの最上位ビット(以下、MSBという)を調べて、そ
れが“0”であれば短縮された8ビット長のオペコード
であり、“1”であれば短縮されていない16ビット長
のオペコードであると判別するものである。なお、この
例によれば、そのMSBを除いた7ビットによって、最
大128パターンの短縮された8ビット長のオペコード
をサポートできる。
Here, FIG. 3 is based on the bit pattern of the upper 8 bits of the 16-bit data latched by the operation code latch circuit 1, and whether it is a shortened 8-bit operation code or a 16-bit operation code. It is explanatory drawing which shows the bit allocation which allocates. The operation code length determination circuit 6 performs the determination by checking the most significant bit (hereinafter referred to as MSB) of the upper 8 bit bit pattern of the 16-bit data latched by the operation code latch circuit 1, and if it is "0". It is a shortened 8-bit opcode, and if it is "1", it is determined to be an unshortened 16-bit opcode. According to this example, a maximum of 128 patterns of shortened 8-bit opcodes can be supported by 7 bits excluding the MSB.

【0015】オペコード長判別回路6による判別の結
果、短縮されていない16ビット長のオペコードであっ
た場合には、その上位8ビットのデータを変換せずに出
力し、オペコードラッチ回路1にラッチされているデー
タの下位8ビットとあわせてセレクタ8に送る。一方、
短縮された8ビット長のオペコードであった場合には、
オペコード長判別回路6はオペコードラッチ回路1から
受けた上位8ビットのデータのMSBを除いた7ビット
をオペコード長変換回路7に送る。この7ビットのデー
タを受けたオペコード長変換回路7は内蔵している変換
テーブルを参照し、それに対応した16ビット長のオペ
コードを読み出してセレクタ8に送る。なお、応用プロ
グラムの作成者はあらかじめ、オペコードのコード配置
の一部にリザーブされている定義可能なオペコード、す
なわち短縮された8ビット長のオペコードと、その変換
パターンである短縮されていない16ビット長のオペコ
ードとの対応関係を定義して、それをオペコード長変換
回路7内の変換テーブルに格納しておく。
As a result of the discrimination by the operation code length discriminating circuit 6, when the operation code is not shortened and has a 16-bit length, the upper 8 bits of the data are output without conversion and are latched by the operation code latch circuit 1. Sent to the selector 8 together with the lower 8 bits of the data. on the other hand,
If the opcode has a shortened 8-bit length,
The operation code length determination circuit 6 sends 7 bits excluding the MSB of the upper 8 bits of data received from the operation code latch circuit 1 to the operation code length conversion circuit 7. Upon receiving this 7-bit data, the operation code length conversion circuit 7 refers to the built-in conversion table, reads the corresponding 16-bit length operation code, and sends it to the selector 8. The creator of the application program has a definable opcode that is reserved in advance as a part of the code arrangement of the opcode, that is, a shortened 8-bit length opcode and its conversion pattern, which is not shortened 16-bit length. The correspondence relation with the operation code of is defined and stored in the conversion table in the operation code length conversion circuit 7.

【0016】オペコード長判別回路6はさらに、前記判
別の結果が短縮されていない16ビット長のオペコード
であれば、オペコード長判別回路6からの8ビットのデ
ータとオペコードラッチ回路1からの8ビットのデータ
を選択させるセレクト信号をセレクタ8に送る。一方、
短縮された8ビット長のオペコードであれば、オペコー
ド長変換回路7の出力する16ビットのデータを選択さ
せるセレクト信号をセレクタ8に送る。従って、オペコ
ードラッチ回路1にラッチされたデータが、短縮されて
いない16ビット長のオペコードであれば、それがその
まま変換されずにセレクタ8を介して機械語デコーダ2
に入力されてマイクロ命令に変換される。また、オペコ
ードラッチ回路1にラッチされたデータが、短縮された
8ビット長のオペコードであれば、オペコード長変換回
路7で対応する16ビット長のオペコードに変換されて
セレクタ8より機械語デコーダ2に入力され、マイクロ
命令に変換される。なお、以降の動作は従来の場合と同
様であるため、ここではその説明を省略する。
The opcode length discriminating circuit 6 further includes 8-bit data from the opcode length discriminating circuit 6 and 8-bit data from the opcode latch circuit 1 if the discriminated result is an opcode of 16-bit length which is not shortened. A select signal for selecting data is sent to the selector 8. on the other hand,
If the operation code has a shortened 8-bit length, a select signal for selecting the 16-bit data output from the operation code length conversion circuit 7 is sent to the selector 8. Therefore, if the data latched in the operation code latch circuit 1 is an unshortened 16-bit-length operation code, it is not converted as it is and is transmitted via the selector 8 to the machine language decoder 2
Are input to and converted into microinstructions. If the data latched in the operation code latch circuit 1 is a shortened 8-bit operation code, the operation code length conversion circuit 7 converts the data to a corresponding 16-bit operation code, and the selector 8 outputs it to the machine language decoder 2. It is input and converted into microinstructions. Since the subsequent operation is the same as in the conventional case, the description thereof is omitted here.

【0017】ここで、図4は短縮された8ビット長のオ
ペコードを対応する16ビット長のオペコードに変換す
る状況を1命令としてみた場合について示す説明図であ
る。なお、この図4に示した例では、機械語命令が8ビ
ットのオペランドを有しているので、マイクロ命令はオ
ペランドを読み出す操作を行う。このときにオペランド
として、この場合にはオペコードラッチ回路1内にオペ
ランドがすでに読み込まれているので、それをオペラン
ドとして命令実行を行う。
Here, FIG. 4 is an explanatory diagram showing a case where a situation in which a shortened 8-bit opcode is converted into a corresponding 16-bit opcode is regarded as one instruction. In the example shown in FIG. 4, since the machine language instruction has an 8-bit operand, the microinstruction performs an operation of reading the operand. At this time, as the operand, in this case, since the operand has already been read into the operation code latch circuit 1, the instruction is executed by using it.

【0018】[0018]

【発明の効果】以上のように、この発明によれば、オペ
コードのコード配置の一部をあらかじめ定義可能なオペ
コードとしてリザーブして、その変換パターンを変換テ
ーブルに定義しておき、読み込まれたオペコードが、変
換テーブルに変換パターンの定義された定義可能なオペ
コードであれば、それを定義された変換パターンに変換
した後に、定義可能なオペコードでなければそのオペコ
ードをそのままマイクロ命令にデコードするように構成
したので、応用プログラムの作成者が変換テーブルをそ
の応用プログラムに合うように定義することにより、当
該応用プログラム中の使用頻度の高い機械語命令のオペ
コードを、よりコード長の短い定義可能なオペコードに
写像することができ、特に、マイクロコンピュータに適
用した場合には、マイクロコンピュータの実際の応用に
即して、使用頻度の高い機械語命令をよりコード長の短
いビットパターンに割り付けることが可能となるので、
応用プログラムを記憶するのに必要なメモリの容量を、
実際の応用に即して削減することができる効果がある。
As described above, according to the present invention, a part of the code arrangement of the opcode is reserved as a predefinable opcode, the conversion pattern is defined in the conversion table, and the read opcode is read. Is a definable opcode in which a conversion pattern is defined in the conversion table, it is converted to a defined conversion pattern, and if it is not a definable opcode, the opcode is directly decoded into a microinstruction. Therefore, the creator of the application program defines the conversion table so that it matches the application program, so that the opcodes of machine language instructions that are frequently used in the application program can be defined as opcodes with shorter code length. Can be mapped, especially when applied to a microcomputer, In line with the actual application of Lee black computer, it becomes possible to assign a high machine instruction frequently used more code shorter bit patterns length,
The amount of memory required to store the application program,
There is an effect that can be reduced according to the actual application.

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

【図1】 この発明の実施例1による機械語命令翻訳方
法が適用されたマイクロコンピュータの要部を示すブロ
ック図である。
FIG. 1 is a block diagram showing a main part of a microcomputer to which a machine language instruction translation method according to a first embodiment of the present invention is applied.

【図2】 上記実施例における応用プログラムのメモリ
配置を示す説明図である。
FIG. 2 is an explanatory diagram showing a memory layout of an application program in the above embodiment.

【図3】 上記実施例におけるオペコードのビットパタ
ーンの割り当てを示す説明図である。
FIG. 3 is an explanatory diagram showing allocation of bit patterns of operation codes in the above embodiment.

【図4】 上記実施例における8ビット長のオペコード
を持つ機械語命令の変換例を示す説明図である。
FIG. 4 is an explanatory diagram showing a conversion example of a machine language instruction having an operation code of 8 bits in the above embodiment.

【図5】 従来の機械語命令翻訳方法をが適用されたマ
イクロコンピュータの要部を示すブロック図である。
FIG. 5 is a block diagram showing a main part of a microcomputer to which a conventional machine language instruction translation method is applied.

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

10a,10b,10c,10d,・・・・ 機械語命
令、11a,11b,11c,11d,・・・・ オペ
コード。
10a, 10b, 10c, 10d, ... Machine instruction, 11a, 11b, 11c, 11d ,.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マイクロプログラム制御方式によるコン
ピュータにて、読み込んだ当該コンピュータの機械語命
令を、当該コンピュータ内部の動作を指示するマイクロ
命令にデコードする機械語命令翻訳方法において、前記
機械語命令のオペコードのコード配置の一部を前もって
定義可能なオペコードとしてリザーブしておくととも
に、前記定義可能なオペコードの変換パターンを変換テ
ーブルにあらかじめ定義しておき、読み込んだ前記機械
語命令のオペコードが前記変換テーブルに定義された定
義可能なオペコードであるか否かを判別し、定義可能な
オペコードであれば、前記変換テーブルを用いて変換パ
ターンに変換した後に、定義可能なオペコードでなけれ
ば、前記読み込んだオペコードをそのまま、当該コンピ
ュータ内部の動作を指示するマイクロ命令にデコードす
ることを特徴とする機械語命令翻訳方法。
1. A machine language instruction translation method for decoding a read machine language instruction of the computer into a microinstruction for instructing an operation inside the computer by a computer using a microprogram control method, wherein an opcode of the machine language instruction is used. A part of the code arrangement of is reserved in advance as a definable opcode, and the conversion pattern of the definable opcode is defined in the conversion table in advance, and the opcode of the read machine language instruction is stored in the conversion table. It is determined whether or not it is a defined definable opcode, and if it is a definable opcode, it is converted into a conversion pattern using the conversion table, and if it is not a definable opcode, the read opcode is As it is, indicate the operation inside the computer. A machine language instruction translation method characterized by decoding into the indicated micro instruction.
JP8553595A 1995-04-11 1995-04-11 Machine word instruction translating method Pending JPH08286911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8553595A JPH08286911A (en) 1995-04-11 1995-04-11 Machine word instruction translating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8553595A JPH08286911A (en) 1995-04-11 1995-04-11 Machine word instruction translating method

Publications (1)

Publication Number Publication Date
JPH08286911A true JPH08286911A (en) 1996-11-01

Family

ID=13861583

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8553595A Pending JPH08286911A (en) 1995-04-11 1995-04-11 Machine word instruction translating method

Country Status (1)

Country Link
JP (1) JPH08286911A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006302272A (en) * 2005-04-21 2006-11-02 Samsung Electronics Co Ltd Method and device for executing instruction in java virtual machine
US7194602B2 (en) 1998-03-11 2007-03-20 Matsushita Electric Industrial Co., Ltd. Data processor
WO2019102662A1 (en) * 2017-11-21 2019-05-31 ソニーセミコンダクタソリューションズ株式会社 Processor, information processing device, and processing method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194602B2 (en) 1998-03-11 2007-03-20 Matsushita Electric Industrial Co., Ltd. Data processor
US7664934B2 (en) 1998-03-11 2010-02-16 Panasonic Corporation Data processor decoding instruction formats using operand data
US7979676B2 (en) 1998-03-11 2011-07-12 Panasonic Corporation Method for instructing a data processor to process data
US8443173B2 (en) 1998-03-11 2013-05-14 Panasonic Corporation Method for instructing a data processor to process data
US8650386B2 (en) 1998-03-11 2014-02-11 Panasonic Corporation Data processor including an operation unit to execute operations in parallel
JP2006302272A (en) * 2005-04-21 2006-11-02 Samsung Electronics Co Ltd Method and device for executing instruction in java virtual machine
US7725879B2 (en) 2005-04-21 2010-05-25 Samsung Electronics Co., Ltd. Method and apparatus for executing instructions of java virtual machine and transforming bytecode
WO2019102662A1 (en) * 2017-11-21 2019-05-31 ソニーセミコンダクタソリューションズ株式会社 Processor, information processing device, and processing method
US11126434B2 (en) 2017-11-21 2021-09-21 Sony Semiconductor Solutions Corporation Processor, information processing apparatus, and processing method for converting a field of an instruction

Similar Documents

Publication Publication Date Title
US5905893A (en) Microprocessor adapted for executing both a non-compressed fixed length instruction set and a compressed variable length instruction set
US4839797A (en) Microprocessor compatible with any software represented by different types of instruction formats
US5896519A (en) Apparatus for detecting instructions from a variable-length compressed instruction set having extended and non-extended instructions
US5867681A (en) Microprocessor having register dependent immediate decompression
JP3898712B2 (en) Instruction set expansion using 3-byte escape opcodes
US5794010A (en) Method and apparatus for allowing execution of both compressed instructions and decompressed instructions in a microprocessor
US20010025337A1 (en) Microprocessor including a mode detector for setting compression mode
EP0083209A2 (en) A microcomputer for processing instructions of different types
JPH096609A (en) Program execution device and program conversion method
EP0220684A2 (en) Data processing system
US5117488A (en) Microprogram controlled microprocessor having a selectively expandable instruction code length including independent description of operand addressing and a type of operation for an operand by single instruction in a common coding scheme
US5964861A (en) Method for writing a program to control processors using any instructions selected from original instructions and defining the instructions used as a new instruction set
US5210833A (en) System for selectively masking data in a branch address register and replacing the microinstruction address register by the masked data
US20020099922A1 (en) Data processing apparatus including a plurality of pipeline processing mechanisms in which memory access instructions are carried out in a memory access pipeline
JPH08286911A (en) Machine word instruction translating method
US5694605A (en) Program translator with selective data value amendment and processor with data extension instructions
JP2003044271A (en) Information processor and information processing method
US8464235B2 (en) Adaptive production of assembler
US20020029329A1 (en) User initiated microcode modification
JPH0447349A (en) Data storage device
JP2002073346A (en) Compiler, storage medium, program conversion device, program conversion method and microcomputer
JP2007004475A (en) Processor and method for executing program
US5463747A (en) Microprogram data processor processing operand address calculation and instruction execution with common hardware
JPH11224199A (en) Translation device, information processor and recording medium
JPS59127154A (en) Instruction decoder of electronic computer