JP3140812B2 - Five-operand shift instruction method - Google Patents

Five-operand shift instruction method

Info

Publication number
JP3140812B2
JP3140812B2 JP03247856A JP24785691A JP3140812B2 JP 3140812 B2 JP3140812 B2 JP 3140812B2 JP 03247856 A JP03247856 A JP 03247856A JP 24785691 A JP24785691 A JP 24785691A JP 3140812 B2 JP3140812 B2 JP 3140812B2
Authority
JP
Japan
Prior art keywords
register
data
shift
destination
stored
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
Application number
JP03247856A
Other languages
Japanese (ja)
Other versions
JPH0588886A (en
Inventor
隆二 境
陽一郎 竹内
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP03247856A priority Critical patent/JP3140812B2/en
Publication of JPH0588886A publication Critical patent/JPH0588886A/en
Application granted granted Critical
Publication of JP3140812B2 publication Critical patent/JP3140812B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、5オペランド型シフ
ト命令方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a five-operand shift instruction system.

【0002】[0002]

【従来の技術】従来、電子計算機における倍語データの
シフトには、図6に示すように最低4命令を必要として
いた。すなわち、ソースレジスタrs1,rs2それぞ
れに格納されているデータa11,a12と、b11,
b12とをnビット右にシフトさせ、デスティネーショ
ンレジスタrd1,rd2に格納することを目的とする
場合、同図(b)に示すように、まずソースレジスタr
s1に格納されているデータa11,a12のうち、デ
ータa12を残すことを目的として、このソースレジス
タrs1を左に(32−n)ビットシフトして、レジス
タrtに格納する。
2. Description of the Related Art Conventionally, shifting of double word data in an electronic computer required at least four instructions as shown in FIG. That is, the data a11 and a12 stored in the source registers rs1 and rs2, and b11,
b12 is shifted to the right by n bits and stored in the destination registers rd1 and rd2, first, as shown in FIG.
Of the data a11 and a12 stored in s1, the source register rs1 is shifted left (32-n) bits and stored in the register rt in order to leave the data a12.

【0003】さらに、ソースレジスタrs1の格納デー
タa11を残すことを目的として、同図(c)に示すよ
うにソースレジスタrs1を右にnビットシフトして、
デスティネーションレジスタrd1に格納する。
Further, for the purpose of leaving the stored data a11 of the source register rs1, the source register rs1 is shifted right by n bits as shown in FIG.
The data is stored in the destination register rd1.

【0004】さらに、同図(d)に示すように、ソース
レジスタrs2に格納されているデータb11,b12
に対して右にnビットシフトしてデスティネーションレ
ジスタrd2に格納することにより、データb11を右
寄せ状態で格納する。
Further, as shown in FIG. 1D, data b11 and b12 stored in a source register rs2 are stored.
Is shifted to the right by n bits and stored in the destination register rd2, thereby storing the data b11 in a right-justified state.

【0005】続いて、同図(e)に示すようにレジスタ
rtとデスティネーションレジスタrd2とのORを取
って、これを、デスティネーションレジスタrd2に改
めて格納する。
Subsequently, as shown in FIG. 1E, the OR of the register rt and the destination register rd2 is ORed, and the result is stored in the destination register rd2 again.

【0006】以上の処理によって、図6(a)に示すよ
うに、ソースレジスタrs1,rs2に格納されている
倍語データを右にnビットシフト処理を行なうことがで
きるのである。
[0006] By the above processing, as shown in FIG. 6 (a), it is possible to perform the n-bit shift processing to the right twice language data stored in the source register rs1, rs2.

【0007】また、図7(a)に示すようにソースレジ
スタrsに格納されている倍語データa11,a12を
ローテートさせるための処理手順としては、まず、同図
(b)に示すように、ソースレジスタrsのデータを左
へ(32−n)ビットシフトしてレジスタrtに格納
し、倍語データa12だけを左寄せの状態で残す処理を
行なう。
As shown in FIG. 7A, the procedure for rotating the double word data a11 and a12 stored in the source register rs is as follows. The data of the source register rs is shifted leftward (32-n) bits and stored in the register rt, and only the double word data a12 is left-justified.

【0008】そして、同図(c)に示すようにソースレ
ジスタrsのデータを右にnビットシフトしてデスティ
ネーションレジスタrdに格納し、倍語データa11を
右寄せ状態にする。
Then, as shown in FIG. 1C, the data in the source register rs is shifted rightward by n bits and stored in the destination register rd, and the double word data a11 is shifted to the right.

【0009】続いて、同図(d)に示すように、レジス
タrtとデスティネーションレジスタrdとのORを取
り、この結果をデスティネーションレジスタrdに格納
することより、倍語データa11,a12が左右入れ
替わったローテート処理が行なえることになる。
[0009] Subsequently, as shown in FIG. 2 (d), taking the OR of register rt and destination register rd, more to store the result in the destination register rd, is doubled word data a11, a12 Left and right
An alternate rotation process can be performed.

【0010】さらに、図8(a)に示すように、従来の
シフト命令でビット列挿入を実現する処理を行なう場合
には、まず、同図(b)に示すように、ソースレジスタ
rs1と(2m+1 −1)とのANDを取ってレジスタr
tに格納することにより、mビットの倍語データa12
を右寄せ状態で取り出す。
Further, as shown in FIG. 8A, when performing a process of realizing bit string insertion by a conventional shift instruction, first, as shown in FIG. 8B, the source registers rs1 and (2) m + 1 -1) and register r
t, the m-bit double word data a12
With the right alignment.

【0011】続いて、同図(c)に示すように、ソース
レジスタrs2に格納されているnビットの倍語データ
bをmビット左へシフトしデスティネーションレジスタ
rdに格納する。
Then, as shown in FIG. 1C, the n-bit double word data b stored in the source register rs2 is shifted left by m bits and stored in the destination register rd.

【0012】さらに、同図(d)に示すように、レジス
タrtとデスティネーションレジスタrdのORを取っ
てその結果をデスティネーションレジスタrdに格納す
ることにより、倍語データb,a12を右寄せ状態でデ
スティネーションレジスタに格納する。
Further, as shown in FIG. 1D, the OR of the register rt and the destination register rd is taken, and the result is stored in the destination register rd. Store it in the destination register.

【0013】続いて、同図(e)に示すように、ソース
レジスタrs1を右へmビットシフトしてレジスタrt
に格納することにより、倍語データa11を右寄せ状態
でレジスタrtに改めて格納する。
Subsequently, as shown in FIG. 2E, the source register rs1 is shifted rightward by m bits to register rt1.
, The double word data a11 is stored in the register rt again in a right-justified state.

【0014】続いて、同図(f)に示すように、このレ
ジスタrtのデータを左へ(m+n)ビットシフトし、
再びレジスタrtに格納し、右側に(n+m)ビット分
の空欄を形成した状態にする。
Subsequently, as shown in FIG. 1F, the data in the register rt is shifted to the left by (m + n) bits.
The data is stored again in the register rt, and a blank space for (n + m) bits is formed on the right side.

【0015】次に、同図(g)に示すように、最終的に
このレジスタrtと先程のデスティネーションレジスタ
rdとのORを取り、これをデスティネーションレジス
タrdに改めて格納することにより、倍語データa1
1,a12の間に倍語データbが挿入された形のデータ
列を得る。
Next, as shown in FIG. 1G, an OR of the register rt and the destination register rd is finally obtained, and the result is stored again in the destination register rd. Data a1
A data string in which double word data b is inserted between 1 and a12 is obtained.

【0016】[0016]

【発明が解決しようとする課題】ところが、このような
従来の電子計算機における倍語データのシフト処理方式
では、倍語シフトに4サイクル、ローテート処理に3サ
イクル、ビット列挿入には6サイクルかかることにな
り、さらにローテート処理やビット列挿入処理にはrt
のワークレジスタが1つ余分に必要となり、処理速度が
遅くなる問題点があった。
However, in such a conventional double word data shift processing method in a computer, it takes four cycles for double word shift, three cycles for rotation processing, and six cycles for bit string insertion. And rt for rotation processing and bit string insertion processing.
However, one extra work register is required, and the processing speed is reduced.

【0017】この発明は、このような従来の問題点に鑑
みてなされたものであって、5オペランド型シフト命令
を用いることにより、倍語データのシフト、ローテート
及びビット列操作が高速に行なえるようにした5オペラ
ンド型シフト命令方式を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of such a conventional problem. By using a five-operand shift instruction, double word data can be shifted, rotated, and bit-string operated at high speed. It is another object of the present invention to provide a five-operand shift instruction system.

【0018】[0018]

【課題を解決するための手段】この発明は、2つの基本
長のソースレジスタと、これらの2つの基本長のデステ
ィネーションレジスタと、シフト量とを指示する合計5
つのオペランドを用いてシフト処理を行う5オペランド
型シフト命令方式であって、(I)ある倍語データをシ
フトさせる場合、前記2つのソースレジスタとして当該
倍語データの格納されている連続する2つのレジスタを
指定し、そのシフト後の倍語データを前記2つのデステ
ィネーションレジスタとして連続する2つのレジスタに
格納させることにより倍語データをシフトさせ、(II)
ある基本長のデータを所定長分だけローテートさせる場
合、前記2つのソースレジスタとして当該基本長のデー
タが格納されている同じレジスタを指定し、一方のデス
ティネーションレジスタにおいてシフトによりオーバー
フローする部分のデータを、他方のデスティネーション
レジスタにおいてシフトにより空きが出るエリアに埋め
込むようにシフトさせ、当該他方のデスティネーション
に所定長分だけローテートされたデータを格納させるこ
とによりデータをローテートさせ、(III)第1のレジ
スタに格納されている第1の長さのデータと第2の長さ
のデータとの間に、第2のレジスタに格納されている第
3の長さのデータを挿入する場合、(1)前記第1のレ
ジスタをソースレジスタ、空の第3のレジスタをデステ
ィネーションレジスタとして指定し、前記第2のデータ
の長さ分だけこれらのレジスタをシフトさせ、このシフ
トによりオーバーフローする前記第1のレジスタの第2
のデータを前記第3のレジスタに格納させ、(2)前記
第2のレジスタをソースレジスタ、前記第3のレジスタ
をデスティネーションレジスタとして指定し、前記第3
のデータの長さ分だけこれらのレジスタをシフトさせ、
このシフトによりオーバーフローする前記第2のレジス
タの第3のデータを前記第3のレジスタに格納させ、
(3)前記第2のデータ分だけシフト済みの前記第1の
レジスタをソースレジスタとし、前記第2と第3のデー
タの格納済みの第3のレジスタをデスティネーションレ
ジスタとして指定して、前記第3の実施の形態の空きデ
ータ長分だけ前記第1のレジスタをシフトさせ、このシ
フトによりオーバーフローする前記第1のデータの一部
を前記第3のレジスタの空きエリアに格納させることに
よりデータを挿入することを特徴とするものである。
According to the present invention, two basic length source registers, these two basic length destination registers, and a total of five indicating a shift amount are provided.
A five-operand shift instruction method for performing a shift process using two operands. (I) In the case of shifting certain double word data, two consecutive word registers in which the double word data are stored are stored as the two source registers. (II) by specifying a register and storing the shifted doubleword data in two consecutive registers as the two destination registers,
When rotating data of a certain basic length by a predetermined length, the same register in which the data of the basic length is stored is designated as the two source registers, and the data of the part which overflows due to shift in one of the destination registers is designated. (3) the data is rotated by embedding the data in the other destination register so that the data is buried in the area where the space is left due to the shift, and storing the data rotated by a predetermined length in the other destination. When inserting data of the third length stored in the second register between data of the first length and data of the second length stored in the register, (1) The first register is a source register, and the empty third register is a destination register. Designated as, by the length of the second data is shifted these registers, the second of said first register to overflow by the shift
And (2) designating the second register as a source register and the third register as a destination register,
Shift these registers by the length of the data in
The third data of the second register that overflows due to this shift is stored in the third register,
(3) The first register shifted by the second data is designated as a source register, and the third register storing the second and third data is designated as a destination register. The first register is shifted by the free data length according to the third embodiment, and a part of the first data that overflows due to this shift is stored in a free area of the third register to insert data. It is characterized by doing.

【0019】[0019]

【作用】この発明の5オペランド型シフト命令方式で
は、任意ビットnだけ倍語データをシフトするに際して
は、ソースレジスタrs1,rs2に設定されている倍
語データを、シフトビットnに設定することにより、n
ビットシフトさせてデスティネーションレジスタrd
1,rd2に格納するだけで、任意のビットnだけのシ
フトを行なうことができる。
In the five-operand shift instruction method of the present invention, when shifting double word data by an arbitrary bit n, double word data set in the source registers rs1 and rs2 is set to the shift bit n. , N
Bit shift to destination register rd
By simply storing the data in 1, rd2, a shift by an arbitrary bit n can be performed.

【0020】また、あるレジスタに格納されているnビ
ットのデータとmビットのデータとをローテートさせる
場合には、ソースレジスタrs1,rs2としてこの同
じレジスタを指定し、シフト量としてmビットを指定し
てシフトさせ、デスティネーションレジスタrd1,r
d2に格納するだけで、デスティネーションレジスタr
d2からソースレジスタrs1に格納されているデータ
をローテートした結果のデータを取り出すことができ
る。
When rotating n-bit data and m-bit data stored in a certain register, the same register is designated as source registers rs1 and rs2, and m bits are designated as a shift amount. To the destination registers rd1, r
d2, the destination register r
Data resulting from rotation of the data stored in the source register rs1 can be extracted from d2.

【0021】さらに、mビットと(32−m)ビットと
で構成されるソースレジスタrs1の倍語データにnビ
ット列のデータを挿入する場合には、ソースレジスタr
s1のデータをmビット右にシフトさせてレジスタrt
とデスティネーションレジスタrd1に格納し、挿入用
のnビットの倍語データの格納されているソースレジス
タrs2と先程のデスティネーションレジスタrd1と
に対してnビットのシフト操作を行ない、デスティネー
ションレジスタrd1にmビットのデータとnビットの
データとを並べて格納させるようにし、第3サイクルで
は先程のレジスタrtのデータとデスティネーションレ
ジスタrd1のデータとに対して、(32−(n+
m))ビットのシフトを行ない、改めてrd1に格納す
ることにより、デスティネーションレジスタrd1から
nビットの倍語データの挿入された新たなデータを取り
出すことができる。
Further, when inserting data of an n-bit string into double word data of the source register rs1 composed of m bits and (32-m) bits, the source register r
The data of s1 is shifted to the right by m bits and the register rt
And a destination register rd1 and an n-bit shift operation is performed on the source register rs2 storing the n-bit double word data for insertion and the destination register rd1 described above. In the third cycle, the data of the register rt and the data of the destination register rd1 are (32− (n +
m)) By shifting the bits and storing them again in rd1, new data with n-bit doubleword data inserted therein can be extracted from the destination register rd1.

【0022】このようにして、任意のビットのシフト、
ローテート及びビット列挿入処理を少ないサイクルのシ
フト操作のみで高速に行なうことができる。
Thus, any bit shift,
Rotation and bit string insertion can be performed at high speed with only a small number of shift operations.

【0023】[0023]

【実施例】以下、この発明の実施例を図に基づいて詳説
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below in detail with reference to the drawings.

【0024】図1はこの発明の5オペランド型シフト命
令方式の構成例を示しており、32×2ビット構成の命
令語形式で構成されており、10ビット長の命令コード
op1と5ビット長の命令コードop2と、64ビット
長命令の第2語である命令コードop3と、6ビット長
のデスティネーションレジスタrd1,rd2と、同じ
く6ビット長のソースレジスタrs1,rs2と、シフ
ト幅指定コードb1とから構成されている。
FIG. 1 shows an example of the configuration of a five-operand shift instruction system according to the present invention, which is configured in a 32 × 2-bit instruction word format, and has a 10-bit instruction code op1 and a 5-bit length instruction code op1. An instruction code op2, an instruction code op3 which is the second word of the 64-bit length instruction, destination registers rd1 and rd2 of 6-bit length, source registers rs1 and rs2 of 6-bit length, and a shift width designation code b1; It is composed of

【0025】この5オペランド型シフト命令方式を用い
た、シフト、ローテート、任意ビット列挿入操作につい
て、次に説明する。
The operation of shifting, rotating, and inserting an arbitrary bit string using the five-operand shift instruction method will be described below.

【0026】図2及び図3にそれぞれ示すようにシフト
コードb1にnをセットし、SRLL(Sift Right Log
ical Long )の操作をシフトコードb1=nで行なう
と、ソースレジスタrs1,rs2それぞれに格納され
ている倍語データa1,b1は、nビット右にシフトさ
れ、デスティネーションレジスタrd1,rd2に格納
され、デスティネーションレジスタrd1には、元の倍
語データa1のnビットだけ右にシフトされた残りの部
分が格納され、デスティネーションレジスタrd2に
は、元の倍語データb1のnビット右にシフトされたも
のと、元の倍語データa1の右のnビット分とが同時に
格納されることになり、この結果として、1サイクルだ
けでnビット右にシフト操作された結果が得られること
になる。
As shown in FIGS. 2 and 3, n is set to the shift code b1 and SRLL (Sift Right Log
ical Long) is performed with the shift code b1 = n, the double word data a1 and b1 stored in the source registers rs1 and rs2 are shifted right by n bits and stored in the destination registers rd1 and rd2. , Destination register rd1 stores the remaining portion shifted right by n bits of original double word data a1, and destination register rd2 shifts n bits right of original double word data b1 to the right. And the right n bits of the original double word data a1 are stored at the same time. As a result, the result of shifting right by n bits in only one cycle is obtained.

【0027】また、図3に示すように、SRAL(Sift
Right Arithmetic Long)の操作を、シフトコードb=
mについて行なうならば、ソースレジスタrs1,rs
2それぞれに格納されている倍語データa1,b1は、
デスティネーションレジスタrd1,rd2において、
右にmビットシフトされ、デスティネーションレジスタ
rd1の左mビットのついては1がセットされることに
なる。
As shown in FIG. 3, SRAL (Sift
Right Arithmetic Long) operation is performed using shift code b =
m, the source registers rs1, rs
The double word data a1 and b1 stored in
In the destination registers rd1 and rd2,
It is shifted right by m bits, and 1 is set for the left m bits of the destination register rd1.

【0028】また、上記実施例の5オペランド型シフト
命令を用いてローテート処理を行なう場合には、図4に
示す方法に従う。すなわち、ソースレジスタrs1,r
s2それぞれに同じ倍語データa11,a12を格納し
ておき、このソースレジスタrs1,rs2について、
データa12のビット数nだけ右にシフトさせるSRL
L操作を行なうことにより、デスティネーションレジス
タrd1には倍語データa11だけが格納され、デステ
ィネーションレジスタrd2には、ソースレジスタrs
1の倍語データa12と、元のソースレジスタrs2の
倍語データa11だけが格納されることになり、この結
果としてデスティネーションレジスタrd2にローテー
トした結果が格納されることになる。
In the case where the rotation process is performed using the five-operand shift instruction of the above embodiment, the method shown in FIG. 4 is followed. That is, the source registers rs1, r
The same double word data a11 and a12 are stored in each of s2, and for these source registers rs1 and rs2,
SRL that shifts to the right by n bits of data a12
By performing the L operation, only the double word data a11 is stored in the destination register rd1, and the source register rs is stored in the destination register rd2.
Only the double word data a12 of 1 and the double word data a11 of the original source register rs2 are stored, and as a result, the rotated result is stored in the destination register rd2.

【0029】次に、ビット列挿入処理の実現方法につい
て説明する。
Next, a method of implementing the bit string insertion processing will be described.

【0030】図5はビット列挿入処理の実現方法を示し
ており、同図(a)に示すように、ソースレジスタrs
1に格納されているデータa11,a12に対しソース
レジスタrs2に格納されているデータa13を挿入す
る場合には、まず、同図(b)に示すようにソースレジ
スタrs1とデスティネーションレジスタrd1に対し
てSLLL(Shift Left Logical Long)の操作をmビ
ット分行ない、レジスタrtとデスティネーションレジ
スタrd1に格納することにより、レジスタrtには倍
語データa11を右詰めで格納し、デスティネーション
レジスタrd1にはmビットのデータa12を左詰めで
格納する。
FIG. 5 shows a method of implementing the bit string insertion process. As shown in FIG.
When the data a13 stored in the source register rs2 is inserted into the data a11 and a12 stored in the first register rs1, first, as shown in FIG. By performing SLLL (Shift Left Logical Long) operation for m bits and storing the result in the register rt and the destination register rd1, the double word data a11 is stored in the register rt right-justified, and the destination register rd1 is stored in the destination register rd1. The m-bit data a12 is stored left-justified .

【0031】続く第2サイクルでは、ソースレジスタr
s2とデスティネーションレジスタrd1に対してデー
タa13のビット長n分のシフト操作、SLLLを行な
い、デスティネーションレジスタrd1にデータa13
とa12を格納する。
In the subsequent second cycle, the source register r
s2 and the destination register rd1 are shifted by the bit length n of the data a13 and SLLL is performed.
And a12 are stored.

【0032】続いて、同図(d)に示す第3サイクルに
おいて、先程のレジスタrtとデスティネーションレジ
スタrd1に対して(32−(m+n))のシフト操
作、SLLLを行ない、最終的にデスティネーションレ
ジスタrd1にデータa11,a12の間にnビットの
データa13が挿入された形のデータを得ることができ
る。
Subsequently, in the third cycle shown in FIG. 4D, the (32- (m + n)) shift operation and the SLLL are performed on the register rt and the destination register rd1, and finally the destination Data in which n-bit data a13 is inserted between the data a11 and a12 in the register rd1 can be obtained.

【0033】このようにしてこの実施例の5オペランド
型シフト命令方式では、任意のビット数のシフト操作及
びローテート操作がただ1サイクルのシフト操作で行な
うことができ、ビット列挿入操作も3サイクルという数
少ないシフト操作によって行なうことができ、高速な処
理を実現することができることになる。
Thus, in the five-operand shift instruction system of this embodiment, the shift operation and the rotate operation of an arbitrary number of bits can be performed by only one cycle of shift operation, and the bit string insertion operation is as few as three cycles. This can be performed by a shift operation, and high-speed processing can be realized.

【0034】[0034]

【発明の効果】以上のようにこの発明によれば、2つの
ソースレジスタを任意のビットだけシフトした結果を2
つのデスティネーションレジスタに格納するようにした
5オペランド型シフト命令方式であるため、単にシフト
ビット数を適当に設定するだけで任意のシフトやローテ
ートを1サイクルのシフト処理で完了することができ、
またビット列挿入処理も少ないサイクルで実行すること
ができ、高速なシフト処理を実現することができる。
As described above, according to the present invention, the result obtained by shifting two source registers by an arbitrary bit is represented by 2
Since it is a five-operand type shift instruction system in which data is stored in one destination register, an arbitrary shift or rotate can be completed in one cycle of shift processing simply by appropriately setting the number of shift bits.
Also, the bit string insertion processing can be executed in a small number of cycles, and a high-speed shift processing can be realized.

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

【図1】この発明の一実施例の命令語形式を示す説明
図。
FIG. 1 is an explanatory diagram showing a command word format according to an embodiment of the present invention.

【図2】上記実施例におけるSRLL操作を示す説明
図。
FIG. 2 is an explanatory diagram showing an SRLL operation in the embodiment.

【図3】上記実施例におけるSRAL操作を示す説明
図。
FIG. 3 is an explanatory diagram showing an SRAL operation in the embodiment.

【図4】上記実施例によるローテート操作を示す説明
図。
FIG. 4 is an explanatory view showing a rotation operation according to the embodiment.

【図5】上記実施例によるビット列挿入処理を示す説明
図。
FIG. 5 is an explanatory diagram showing a bit string insertion process according to the embodiment.

【図6】従来例におけるシフト操作を示す説明図。FIG. 6 is an explanatory diagram showing a shift operation in a conventional example.

【図7】従来例のローテート操作を示す説明図。FIG. 7 is an explanatory view showing a rotation operation of a conventional example.

【図8】従来例のビット列挿入処理を示す説明図。FIG. 8 is an explanatory diagram showing a conventional bit string insertion process.

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

op1,op2,op3 命令コード rs1,rs2 ソースレジスタ rd1,rd2 デスティネーションレジスタ b シフトコード a1,a11,a12,a13 倍語データ b1,b11,b12 倍語データ rt レジスタ op1, op2, op3 instruction code rs1, rs2 source register rd1, rd2 destination register b shift code a1, a11, a12, a13 double word data b1, b11, b12 double word data rt register

フロントページの続き (56)参考文献 特開 昭58−184649(JP,A) 特開 昭62−143130(JP,A) 特開 平2−130634(JP,A) 特開 昭59−180732(JP,A) 特開 平3−189728(JP,A) 特開 昭57−27336(JP,A) 特開 昭59−62950(JP,A) 特開 昭59−79495(JP,A) 特開 昭57−50049(JP,A) 特開 昭57−76634(JP,A) 特開 平3−55629(JP,A) 特開 昭62−85327(JP,A) 特開 昭64−81033(JP,A) 特開 平5−88887(JP,A) 金田悠紀夫,「マイクロプロセッサと RISC」,オーム社,平成3年5月25 日,第94頁−第132頁 (58)調査した分野(Int.Cl.7,DB名) G06F 9/30 - 9/42 G06F 7/00 Continued on the front page (56) References JP-A-58-184649 (JP, A) JP-A-62-143130 (JP, A) JP-A-2-130634 (JP, A) JP-A-59-180732 (JP, A) JP-A-3-189728 (JP, A) JP-A-57-27336 (JP, A) JP-A-59-62950 (JP, A) JP-A-59-79495 (JP, A) JP-A-57-50034 (JP, A) JP-A-57-76634 (JP, A) JP-A-3-55629 (JP, A) JP-A-62-85327 (JP, A) JP-A-64-81033 (JP, A) A) JP-A-5-88887 (JP, A) Yukio Kaneda, "Microprocessors and RISC", Ohmsha, May 25, 1991, pp. 94-132 (58) Fields investigated (Int. Cl 7, DB name) G06F 9/30 -. 9/42 G06F 7/00

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 2つの基本長のソースレジスタと、これ
らの2つの基本長のデスティネーションレジスタと、シ
フト量とを指示する合計5つのオペランドを用いてシフ
ト処理を行う5オペランド型シフト命令方式であって、 ある倍語データをシフトさせる場合、前記2つのソース
レジスタとして当該倍語データの格納されている連続す
る2つのレジスタを指定し、そのシフト後の倍語データ
を前記2つのデスティネーションレジスタとして連続す
る2つのレジスタに格納させ、 ある基本長のデータを所定長分だけローテートさせる場
合、前記2つのソースレジスタとして当該基本長のデー
タが格納されている同じレジスタを指定し、一方のデス
ティネーションレジスタにおいてシフトによりオーバー
フローする部分のデータを、他方のデスティネーション
レジスタにおいてシフトにより空きが出るエリアに埋め
込むようにシフトさせ、当該他方のデスティネーション
に所定長分だけローテートされたデータを格納させ、 第1のレジスタに格納されている第1の長さのデータと
第2の長さのデータとの間に、第2のレジスタに格納さ
れている第3の長さのデータを挿入する場合、 (1)前記第1のレジスタをソースレジスタ、空の第3
のレジスタをデスティネーションレジスタとして指定
し、前記第2のデータの長さ分だけこれらのレジスタを
シフトさせ、このシフトによりオーバーフローする前記
第1のレジスタの第2のデータを前記第3のレジスタに
格納させ、 (2)前記第2のレジスタをソースレジスタ、前記第3
のレジスタをデスティネーションレジスタとして指定
し、前記第3のデータの長さ分だけこれらのレジスタを
シフトさせ、このシフトによりオーバーフローする前記
第2のレジスタの第3のデータを前記第3のレジスタに
格納させ、 (3)前記第2のデータ分だけシフト済みの前記第1の
レジスタをソースレジスタとし、前記第2と第3のデー
タの格納済みの第3のレジスタをデスティネーションレ
ジスタとして指定して、前記第3のレジスタの空きデー
タ長分だけ前記第1のレジスタをシフトさせ、このシフ
トによりオーバーフローする前記第1のデータの一部を
前記第3のレジスタの空きエリアに格納させる、 ことを特徴とする5オペランド型シフト命令方式。
1. A five-operand shift instruction method for performing a shift process using two basic length source registers, a destination register having these two basic lengths, and a total of five operands indicating a shift amount. When shifting certain double word data, two consecutive registers storing the double word data are designated as the two source registers, and the shifted double word data is stored in the two destination registers. In the case where data of a certain basic length is rotated by a predetermined length, the same register storing the data of the basic length is designated as the two source registers, and one destination The data in the register that overflows due to the shift is The first destination data stored in the first register is shifted by a predetermined length in the other destination by shifting the data so as to be embedded in an area where the shift becomes empty in the destination register. When inserting the third length data stored in the second register between the first register and the second length data, (1) the first register is a source register and an empty third
Are designated as destination registers, these registers are shifted by the length of the second data, and the second data of the first register that overflows due to this shift is stored in the third register. (2) the second register is a source register, and the third register is
Are designated as destination registers, these registers are shifted by the length of the third data, and the third data of the second register that overflows due to this shift is stored in the third register. (3) specifying the first register shifted by the second data as a source register, and specifying the third register storing the second and third data as a destination register, Shifting the first register by an empty data length of the third register, and storing a part of the first data that overflows due to the shift in an empty area of the third register. 5 operand type shift instruction method.
JP03247856A 1991-09-26 1991-09-26 Five-operand shift instruction method Expired - Fee Related JP3140812B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03247856A JP3140812B2 (en) 1991-09-26 1991-09-26 Five-operand shift instruction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03247856A JP3140812B2 (en) 1991-09-26 1991-09-26 Five-operand shift instruction method

Publications (2)

Publication Number Publication Date
JPH0588886A JPH0588886A (en) 1993-04-09
JP3140812B2 true JP3140812B2 (en) 2001-03-05

Family

ID=17169668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03247856A Expired - Fee Related JP3140812B2 (en) 1991-09-26 1991-09-26 Five-operand shift instruction method

Country Status (1)

Country Link
JP (1) JP3140812B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6332188B1 (en) * 1998-11-06 2001-12-18 Analog Devices, Inc. Digital signal processor with bit FIFO
JP5433621B2 (en) * 2011-04-11 2014-03-05 株式会社東芝 Hash function calculation device and calculation program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
金田悠紀夫,「マイクロプロセッサとRISC」,オーム社,平成3年5月25日,第94頁−第132頁

Also Published As

Publication number Publication date
JPH0588886A (en) 1993-04-09

Similar Documents

Publication Publication Date Title
US4219874A (en) Data processing device for variable length multibyte data fields
US6397319B1 (en) Process for executing highly efficient VLIW
US5053953A (en) Apparatus for aligning arithmetic operands during fetch
US4814976A (en) RISC computer with unaligned reference handling and method for the same
CN102007469A (en) Method to accelerate null-terminated string operations
GB2130767A (en) Vector processor
US6978359B2 (en) Microprocessor and method of aligning unaligned data loaded from memory using a set shift amount register instruction
JP3414209B2 (en) Processor
JPH063584B2 (en) Information processing equipment
JPH06332695A (en) Data processor and control circuit thereof
JP3140812B2 (en) Five-operand shift instruction method
US20020065860A1 (en) Data processing apparatus and method for saturating data values
US4754424A (en) Information processing unit having data generating means for generating immediate data
US4924377A (en) Pipelined instruction processor capable of reading dependent operands in parallel
EP0334131B1 (en) Data processor performing operation on data having length shorter than one-word length
US20020083307A1 (en) System and method for partial merges for sub-register data operations
GB1593136A (en) Data processing
US5646874A (en) Multiplication/multiplication-accumulation method and computing device
JP2803788B2 (en) Fast pipeline shifter element with parity prediction and string control
JPH0778723B2 (en) Information processing equipment
JP3476618B2 (en) Barrel shift arithmetic unit
JPS6138493B2 (en)
JPS63115229A (en) Element shift system
JP2755260B2 (en) Disassembly device of machine language
JPH0426494B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees