JPH0588890A - Data processing method - Google Patents

Data processing method

Info

Publication number
JPH0588890A
JPH0588890A JP25120691A JP25120691A JPH0588890A JP H0588890 A JPH0588890 A JP H0588890A JP 25120691 A JP25120691 A JP 25120691A JP 25120691 A JP25120691 A JP 25120691A JP H0588890 A JPH0588890 A JP H0588890A
Authority
JP
Japan
Prior art keywords
operand
specified
parts
storage destination
instruction
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
JP25120691A
Other languages
Japanese (ja)
Inventor
Akira Katsuno
昭 勝野
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 JP25120691A priority Critical patent/JPH0588890A/en
Publication of JPH0588890A publication Critical patent/JPH0588890A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To further decrease the number of program steps by parallel calcula tion. CONSTITUTION:This data processing method executes designated operations to an operand at the designated storage destination while containing a part to designate the kind of the operation and a part to designate the storage destination of the operand in one instruction word, the part to designate the storage destination of the operand is defined as 1st, 2nd, 3rd and 4th parts rd1, rs1, rd2 and rs2, the designated operations are executed to the operands at the two storage destinations designated by the first and second parts rd1 and rs1, and the designated operations are also executed to the operands at the two storage destinations designated by the third and fourth parts rd2 and rs2.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、データ処理方法に関す
る。コンピュータ等、データ処理装置で用いられる命令
語は、動作(処理や演算)の種類を指定する部分(op
code:オペレーションコード)と、演算の対象とな
るオペランド(operand:演算数)を指定する部
分(メモリ直接指定の場合にはアドレス部)とを含んで
構成される。
FIELD OF THE INVENTION The present invention relates to a data processing method. An instruction word used in a data processing device such as a computer is a part (op) that specifies a type of operation (processing or operation).
code: operation code) and a part (address part in the case of direct memory specification) for designating an operand (operand: number of operations) to be operated.

【0002】命令語中のアドレス部の数により、1アド
レス方式、2アドレス方式、または、3アドレス方式に
分けられる。1アドレス方式 演算はアキュムレータとアドレス部(1個)の指定する
オペランド間で行われ、演算結果はアキュムレータに格
納される。命令語が短く解読も容易なために、簡易なシ
ステムに用いられることが多い。2アドレス方式 1つの命令語中に2つのアドレス部があり、これらによ
って2個のレジスタ(またはメモリ、以下レジスタで代
表)を指定する。演算は2個のレジスタ内のオペランド
に対して行われ、結果は2個のレジスタの一方に書き戻
される。3アドレス方式 2アドレス方式を拡張して3つのアドレスを持ち、例え
ば (A)+(B)→(C) の形で演算を行う。すなわち、アドレスAのオペランド
とアドレスBのオペランドに対して演算を行い、その結
果をアドレスCに格納する。1命令の機能が高くなり、
プログラムステップ数を少なくできる反面、命令語が長
くなる短所を持つ。
Depending on the number of address parts in a command word, it can be classified into a 1-address system, a 2-address system, or a 3-address system. The one-address method operation is performed between the accumulator and the operand designated by the address part (one), and the operation result is stored in the accumulator. It is often used in simple systems because the instruction words are short and easy to decipher. Two-address method There are two address parts in one instruction word, and two registers (or memory, hereinafter referred to as a register) are designated by these. The operation is performed on the operands in the two registers and the result is written back to one of the two registers. Three-address method The two-address method is expanded to have three addresses, and the operation is performed in the form of (A) + (B) → (C), for example. That is, the operation is performed on the operand of address A and the operand of address B, and the result is stored in address C. The function of one instruction becomes high,
While it can reduce the number of program steps, it has the disadvantage of lengthening the command word.

【0003】[0003]

【従来の技術】図6は32ビット長の従来の命令語であ
る。この図において、opcodeは命令コード部、r
d、rs1およびrs2は3つのアドレス部であり、o
pcodeはビット24からビット31までの8ビット
に割り当てられ、rs1、rs2およびrdは、それぞ
れビット0からビット4、ビット14からビット18、
あるいは、ビット19からビット23までの各5ビット
づつに割り当てられている。なお、ビット5からビット
12までの8ビットは、使用されない無効ビット(ig
nored)である。また、この命令語は、図7に示す
ように、ビット0からビット12までを既値とすること
もある。
2. Description of the Related Art FIG. 6 shows a conventional instruction word having a length of 32 bits. In this figure, opcode is an instruction code part, r
d, rs1 and rs2 are three address parts, and
pcode is assigned to 8 bits from bit 24 to bit 31, and rs1, rs2 and rd are bit 0 to bit 4, bit 14 to bit 18, respectively.
Alternatively, it is assigned to each 5 bits from bit 19 to bit 23. The 8 bits from bit 5 to bit 12 are unused unused bits (ig
nored). Further, as shown in FIG. 7, this instruction word may have bits 0 to 12 as the existing values.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、かかる
命令語形式は、アドレス部が3つのいわゆる3アドレス
方式であるため、例えば (rs1)+(rs2)→(rd) のように1命令/1演算しか行うことができず、プログ
ラムステップをより一層減少しようとする場合に限界が
ある。
However, since such an instruction word format is a so-called three-address system having three address parts, for example, one instruction / one operation such as (rs1) + (rs2) → (rd). However, there is a limit when trying to further reduce the program steps.

【0005】そこで、本発明は、並列演算により、プロ
グラムステップ数の一層の減少を図ることを目的とす
る。
Therefore, an object of the present invention is to further reduce the number of program steps by parallel operation.

【0006】[0006]

【課題を解決するための手段】本発明は、上記目的を達
成するために、1つの命令語中に、動作の種類を指定す
る部分とオペランドの格納先を指定する部分とを含み、
指定された格納先のオペランドに対して指定された動作
を実行するデータ処理方法であって、前記オペランドの
格納先を指定する部分を第1から第4までの4つの部分
とし、第1の部分と第2の部分で指定された2つの格納
先のオペランドに対して指定された動作を実行するとと
もに、第3の部分と第4の部分で指定された2つの格納
先のオペランドに対しても指定された動作を実行するこ
とを特徴とする。
In order to achieve the above object, the present invention includes, in one instruction word, a part for designating a type of operation and a part for designating a storage destination of an operand,
A data processing method for executing a specified operation on an operand of a specified storage destination, wherein a part specifying a storage destination of the operand is four parts from a first part to a fourth part. And performs the operation specified for the two storage destination operands specified in the second part, and also for the two storage destination operands specified in the third and fourth parts. Characterized by performing a specified operation.

【0007】[0007]

【作用】本発明では、1つの命令語で1度に4つのオペ
ランドが指定され、例えば、4つのオペランドをa、
b、c、dとし、当該命令語の命令種別を加算とする
と、a+b=bおよびc+d=dが演算される。すなわ
ち、かかる2つの式の並列演算が可能になる。
In the present invention, four operands are designated at one time by one instruction word. For example, four operands are a,
If b, c, and d are added and the instruction types of the instruction words are added, a + b = b and c + d = d are calculated. That is, the parallel calculation of these two expressions becomes possible.

【0008】[0008]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。図1〜図5は本発明に係るデータ処理方法を適用
したデータ処理装置の一実施例を示す図である。このデ
ータ処理装置で使用する命令語mは、例えば32ビット
長であり、その形式は図1に示すように、動作の種類を
指定する命令コード部分opcodeとオペランドの格
納先(レジスタまたはメモリ)を指定する4つの部分r
d1、rs1、rd2、rs2を含むものである。
Embodiments of the present invention will be described below with reference to the drawings. 1 to 5 are diagrams showing an embodiment of a data processing device to which a data processing method according to the present invention is applied. The instruction word m used in this data processing device has, for example, a 32-bit length, and its format is as shown in FIG. 1 with an instruction code portion opcode for specifying the type of operation and an operand storage destination (register or memory). 4 parts to specify r
It includes d1, rs1, rd2, and rs2.

【0009】opcodeはビット24からビット31
までの8ビットに割り当てられ、また、rd1はビット
19からビット23までの5ビットに割り当てられ、r
s1はビット14からビット18までの5ビットに割り
当てられる。さらに、rd2はビット8からビット12
までの5ビットに割り当てられ、rs2はビット0から
ビット4までの5ビットに割り当てられる。
Opcode is from bit 24 to bit 31
Up to 8 bits, and rd1 is assigned to 5 bits from bit 19 to bit 23, r
s1 is assigned to 5 bits from bit 14 to bit 18. Furthermore, rd2 is bit 8 to bit 12
5 bits to rs2, and rs2 is allocated to 5 bits from bit 0 to bit 4.

【0010】4つの部分rd1、rs1、rd2、rs
2の内容に従って4つの格納先が指定され、全部で4つ
のオペランドが取り出される。以下、rd1、rs1、
rd2、rs2に括弧付きの添字Vを付した場合はその
部分の内容(例えばレジスタ指定値やメモリアドレス
値)を表すものとし、あるいは、括弧付きの添字Oを付
した場合はその部分の内容に従って取り出されたオペラ
ンド(演算数)を表すものとする。
The four parts rd1, rs1, rd2, rs
Four storage destinations are designated according to the contents of 2, and a total of four operands are extracted. Hereinafter, rd1, rs1,
When the subscript V with parentheses is added to rd2 and rs2, the contents of the part (for example, register specified value or memory address value) are shown, or when the subscript O with parentheses is added, the contents of the part are followed. It shall represent the fetched operand (operation number).

【0011】図2はデータ処理装置の要部構成図であ
り、10はレジスタファイル、11は第1演算ユニッ
ト、12はマルチプレクサ、13は第2演算ユニットで
ある。レジスタファイル10は、上記形式の命令語を格
納する命令レジスタや多数の汎用レジスタ等を含み、第
1演算ユニット11は、レジスタファイル10から取り
出された4つのオペランドrd1(O)、rs1(O)、rd
(O)、rs2(O)のうちの1組「rd2(O)、rs
(O)」に対し、opcodeによって指定された種類
の演算を実行する。マルチプレクサ12は、rd1(O)
とrs2(O)の一方を選択し、第2演算ユニット13
は、マルチプレクサ12の出力「rd1(O)/rs
(O)」と「rs1(O)」に対し、opcodeで指定さ
れた種類の演算を実行する。
FIG. 2 is a block diagram of the main parts of the data processing apparatus. 10 is a register file, 11 is a first arithmetic unit, 12 is a multiplexer, and 13 is a second arithmetic unit. The register file 10 includes an instruction register that stores an instruction word in the above format, a large number of general-purpose registers, and the like, and the first arithmetic unit 11 has four operands rd1 (O) and rs1 (O) extracted from the register file 10. , Rd
One set of 2 (O) and rs2 (O) "rd2 (O) , rs
2 (O) ", the type of operation specified by opcode is executed. The multiplexer 12 is rd1 (O)
And rs2 (O) are selected, the second arithmetic unit 13
Is the output of the multiplexer 12 "rd1 (O) / rs
2 (O) "and" rs1 (O) "are subjected to the type of operation specified by opcode.

【0012】図3は演算ユニット11、13に共通の図
であり、2つのオペランドに対してALU14による演
算および乗算器15による演算を実行し、演算の種類
(例えば加算や乗算)に応じてマルチプレクサを切り換
え、どちらか一方の演算結果を出力する。ここで、演算
の種類が「乗算」(mlt命令)の場合には、次の2つ
の演算が実行される。
FIG. 3 is a diagram common to the arithmetic units 11 and 13. The arithmetic operation by the ALU 14 and the arithmetic operation by the multiplier 15 are executed with respect to two operands, and the multiplexer is operated according to the type of operation (for example, addition or multiplication). To output the result of either operation. Here, when the type of operation is "multiplication" (mlt instruction), the following two operations are executed.

【0013】 (rs1(V))×(rd1(V))→(rd1(V)) (rs2(V))×(rd2(V))→(rd2(V)) すなわち、 (1) 1つの演算は、rs1の内容rs1(V)で指定
された格納先(例えばレジスタファイル10内の所定レ
ジスタr0)から取り出されたオペランドrs1
(O)と、rd1の内容rd1(V)で指定された格納先(例
えばレジスタファイル10内の所定レジスタr2)から
取り出されたオペランドrd1(O)とに対し、乗算を実
行してその結果を再びレジスタr2に書き戻すという一
連の処理である。 (2) また、他の1つの演算は、rs2の内容rs2
(V)で指定された格納先(例えばレジスタファイル10
内の所定レジスタr0)から取り出されたオペランドr
s2(O)と、rd1の内容rd2(V)で指定された格納先
(例えばレジスタファイル10内の所定レジスタr4)
から取り出されたオペランドrd2(O)とに対し、乗算
を実行してその結果を再びレジスタr4に書き戻すとい
う一連の処理である。
(Rs1(V)) × (rd1(V)) → (rd1(V)) (Rs2(V)) × (rd2(V)) → (rd2(V)) That is, (1) One operation is the content rs1 of rs1.(V)Specified by
Storage destination (for example, a predetermined file in the register file 10)
Operand rs1 extracted from register r0)
(O)And the contents of rd1 rd1(V)Storage destination specified in (example
For example, from the predetermined register r2) in the register file 10
The fetched operand rd1(O)And for the multiplication
And write the result back to register r2.
It is a series of processes. (2) Also, another operation is the content rs2 of rs2.
(V)The storage destination specified in (for example, register file 10
Operand r fetched from a predetermined register r0) in
s2(O)And the contents of rd1 rd2(V)Storage destination specified in
(For example, the predetermined register r4 in the register file 10)
Operand rd2 extracted from(O)And against
And write the result back to register r4.
It is a series of processes.

【0014】図4はかかる2つの演算を含むいくつかの
命令ステップを示す図であり、4つのmlt命令(乗算
命令)の後にadd命令(加算命令)を続けた例であ
る。1行目に書かれたmlt命令が上記2つの演算
(1)(2)に対応する。なお、命令の右側に書かれた
コードは、各命令の内容を2進数で表したものである。
例えばopcodeコードの[11101000]は乗
算を表し、rd1コードの[00010]はレジスタ番
号[r2]を表し、rs1コードの[00000]はレ
ジスタ番号[r0]を表し、rd2コードの[0010
0]はレジスタ番号[r4]を表し、rs2コードの
[00000]はレジスタ番号[r0]を表している。
FIG. 4 is a diagram showing some instruction steps including these two operations, and is an example in which four mlt instructions (multiplication instructions) are followed by add instructions (addition instructions). The mlt instruction written in the first line corresponds to the above two operations (1) and (2). The code written on the right side of the instruction represents the content of each instruction in a binary number.
For example, the opcode code [11101000] represents multiplication, the rd1 code [00010] represents the register number [r2], the rs1 code [00000] represents the register number [r0], and the rd2 code [0010].
0] represents the register number [r4], and [00000] of the rs2 code represents the register number [r0].

【0015】以上述べたように、本実施例では、1つの
命令語mのオペランドの格納先を指定する部分を、rs
1、rd1、rs2、rd2、すなわち第1から第4ま
での4つの部分とし、第1の部分(rs1)と第2の部
分(rd1)で指定された2つの格納先のオペランドに
対し、opcodeによって指定された演算を実行する
とともに、第3の部分(rs2)と第4の部分(rd
2)で指定された2つの格納先のオペランドに対して
も、指定された演算を同時並行的に実行することができ
る。したがって、並列演算により、プログラムステップ
数の一層の減少を図ることができる。
As described above, in this embodiment, the portion for specifying the storage destination of the operand of one instruction word m is rs
1, rd1, rs2, rd2, that is, the four parts from the first to the fourth, and the opcode for the two storage destination operands specified by the first part (rs1) and the second part (rd1) Performs the operation specified by the third part (rs2) and the fourth part (rd
The specified operation can be simultaneously executed in parallel for the two storage destination operands specified in 2). Therefore, the parallel operation can further reduce the number of program steps.

【0016】なお、オペランドの格納先を指定する4つ
の部分の1つ(rs2)を、図5に示すように、既値と
しても構わない。
Note that one of the four parts (rs2) for designating the storage destination of the operand may be an existing value as shown in FIG.

【0017】[0017]

【発明の効果】本発明によれば、1つの命令語のオペラ
ンドの格納先を指定する部分を第1から第4までの4つ
の部分としたので、第1の部分と第2の部分で指定され
た2つの格納先のオペランドに対して指定された動作を
実行するとともに、第3の部分と第4の部分で指定され
た2つの格納先のオペランドに対しても指定された動作
を実行することができ、並列演算により、プログラムス
テップ数の一層の減少を図ることができる。
According to the present invention, the parts for designating the storage destination of the operand of one instruction word are the four parts from the first to the fourth, so that the parts are designated by the first part and the second part. The specified operation is performed on the operands of the specified two storage destinations, and the specified operation is also executed on the operands of the two storage destinations specified by the third and fourth parts. Therefore, the parallel operation can further reduce the number of program steps.

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

【図1】一実施例の命令フォーマットである。FIG. 1 is an instruction format according to an embodiment.

【図2】一実施例のデータ処理装置の要部構成図であ
る。
FIG. 2 is a main part configuration diagram of a data processing device according to an embodiment.

【図3】一実施例の演算ユニットの構成図である。FIG. 3 is a configuration diagram of an arithmetic unit according to an embodiment.

【図4】一実施例の命令コード図である。FIG. 4 is an instruction code diagram of an example.

【図5】一実施例の他の命令フォーマットである。FIG. 5 is another instruction format according to an embodiment.

【図6】従来例の命令フォーマットである。FIG. 6 is an instruction format of a conventional example.

【図7】従来例の他の命令フォーマットである。FIG. 7 is another instruction format of the conventional example.

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

m:命令語 opcode:命令コード部分 rd1、rs1、rd2、rs2:4つの部分 m: instruction word opcode: instruction code part rd1, rs1, rd2, rs2: four parts

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】1つの命令語中に、動作の種類を指定する
部分とオペランドの格納先を指定する部分とを含み、指
定された格納先のオペランドに対して指定された動作を
実行するデータ処理方法であって、 前記オペランドの格納先を指定する部分を第1から第4
までの4つの部分とし、 第1の部分と第2の部分で指定された2つの格納先のオ
ペランドに対して指定された動作を実行するとともに、 第3の部分と第4の部分で指定された2つの格納先のオ
ペランドに対しても指定された動作を実行することを特
徴とするデータ処理方法。
1. Data for executing a specified operation on an operand of a specified storage destination, including a part for specifying a type of operation and a part for specifying a storage destination of an operand in one instruction word. In the processing method, a part for designating a storage destination of the operand is divided into first to fourth parts.
Up to four parts, the specified operation is executed for the two storage destination operands specified in the first part and the second part, and the specified parts are specified in the third part and the fourth part. A data processing method characterized in that a specified operation is executed also for two operands of storage destinations.
JP25120691A 1991-09-30 1991-09-30 Data processing method Withdrawn JPH0588890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25120691A JPH0588890A (en) 1991-09-30 1991-09-30 Data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25120691A JPH0588890A (en) 1991-09-30 1991-09-30 Data processing method

Publications (1)

Publication Number Publication Date
JPH0588890A true JPH0588890A (en) 1993-04-09

Family

ID=17219277

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25120691A Withdrawn JPH0588890A (en) 1991-09-30 1991-09-30 Data processing method

Country Status (1)

Country Link
JP (1) JPH0588890A (en)

Similar Documents

Publication Publication Date Title
JPH04172533A (en) Electronic computer
KR940015852A (en) Handler with long instruction word
JPS6217252B2 (en)
KR950033803A (en) Multiple bit shift device, data processor using same, and multiple bit shift method
US4833640A (en) Register bank change including register to register transfer in a data processing system
US7546442B1 (en) Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions
JPH0248931B2 (en)
JPH05150979A (en) Immediate operand expansion system
JPH034936B2 (en)
JPH0588890A (en) Data processing method
JPS62156742A (en) Data writing control system
JP2883488B2 (en) Instruction processing unit
JPS61235985A (en) Vector processor
JP2671161B2 (en) Register interference check method
JP2511063B2 (en) Pipeline control method
JPS59223846A (en) Arithmetic processor
JP2883489B2 (en) Instruction processing unit
JPS6149695B2 (en)
JP2657947B2 (en) Data processing device
JPH0553804A (en) Parallel processor
JPS61143850A (en) Processor
JPH0546389A (en) Parallel processor
JPH03119424A (en) Information processing system and its device
JPS61194566A (en) Vector data reference control system
JPH0619713B2 (en) Logic type data processor

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: 19981203