JPH02297627A - System for transfer of immediate data and execution of arithmetic instruction - Google Patents

System for transfer of immediate data and execution of arithmetic instruction

Info

Publication number
JPH02297627A
JPH02297627A JP1119304A JP11930489A JPH02297627A JP H02297627 A JPH02297627 A JP H02297627A JP 1119304 A JP1119304 A JP 1119304A JP 11930489 A JP11930489 A JP 11930489A JP H02297627 A JPH02297627 A JP H02297627A
Authority
JP
Japan
Prior art keywords
register
bits
immediate
data
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.)
Pending
Application number
JP1119304A
Other languages
Japanese (ja)
Inventor
Yuko Ninomiya
二宮 優子
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1119304A priority Critical patent/JPH02297627A/en
Publication of JPH02297627A publication Critical patent/JPH02297627A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To reduce the numbers of instruction bytes in the transfer and the arithmetic operation of immediate data by setting the (m) high-order bits of the immediate data of (n) bits on a dedicated register. CONSTITUTION:An immediate register 4 to store the (m) high-order bits of the immediate data of (n) bits(m<n) is provided. A register 2 stores the data of (n) bits calculated at an ALU 7 transiently, and a register 3 stores the (n-m) low-order bits of the data of (n) bits transiently, and the immediate register 4 stores the (m) high-order bits of the immediate of (n) bits. Also, the ALU 7 sets the data of (n) bits stored in the register 2 with an immediate data arithmetic instruction which designates only the (n-m) low-order bits of the data of (n) bits and a numeric value stored in the register 3 as the low-order bits, and executes an arithmetic operation with the data of (n) bits setting the numeric value stored in the immediate register 4 as the high-order bit. In such a way, the numbers of instruction bytes in the transfer and the arithmetic instruction can be reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はイミーディエト・データの転送、゛演算命令実
行方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to immediate data transfer and arithmetic instruction execution methods.

〔従来の技術〕[Conventional technology]

マイクロコンピュータの命令には、データ転送命令、算
術演算命令、論理演算命令1分岐命令。
Microcomputer instructions include data transfer instructions, arithmetic operation instructions, logical operation instructions, and one branch instruction.

スタック、Ilo、制御命令などがあり、その命令系を
構成するバイト数は、命令によって異なる。
There are stacks, Ilo, control instructions, etc., and the number of bytes making up the instruction system varies depending on the instruction.

従来のイミーディエト・データの転送、演算命令実行方
式について図面を参照して詳細に説明する。
A conventional immediate data transfer and arithmetic instruction execution method will be described in detail with reference to the drawings.

第3図は従来のイミーディエト・データの転送、演算命
令実行方式の一例を示すブロック図である。
FIG. 3 is a block diagram showing an example of a conventional immediate data transfer and arithmetic instruction execution method.

第3図に示すイミーディエト・データの転送。Immediate data transfer shown in FIG.

演算命令実行方式は、ALU7において演算される16
ビツト・データを一時的に格納するレジスタ1.2と1
6ビツト・データを格納するレジスタ3とを含んで構成
される。
The calculation instruction execution method is 16, which is calculated in ALU7.
Registers 1.2 and 1 that temporarily store bit data
The register 3 stores 6-bit data.

次に、その動作について簡単なイミーディエト・データ
の転送命令、および加算命令を用いて説明する。
Next, its operation will be explained using a simple immediate data transfer instruction and an addition instruction.

MOVI  R3,9723・・・−(1)ADDI 
 R3,0147−・−−+2)まず、式(1)におい
て、レジスタ3は、9723(H)の16ビツトデータ
を格納する0式(1)の命令バイト数はく命令コード数
+2バイト)である。
MOVI R3,9723...-(1) ADDI
R3,0147-・--+2) First, in formula (1), register 3 stores 16-bit data of 9723(H). be.

つぎに、式(2)において、レジスタ1は9723(H
)の16とットデータを格納し、レジスタ2は0147
(H)の16とットデータを格納する。
Next, in equation (2), register 1 is 9723 (H
), and register 2 is 0147.
(H) 16 and cut data are stored.

そして、ALU7は、レジスタ1の内容とレジスタ2の
内容とを加算して、その結果をレジスタレジスタ3に格
納する。
Then, the ALU 7 adds the contents of register 1 and the contents of register 2 and stores the result in register 3.

式■の命令バイト数はく命令コード数+2バイト)であ
る。
The number of instruction bytes in equation (2) is (the number of instruction codes + 2 bytes).

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のイミーディエト・データの転送、演算命
令実行方式は、16とットデータの上位8ビツトが0の
ときの命令バイト数は、(命令コード数+1)バイトで
あるが、それ以外のときの命令バイト数は(命令コード
数+2)バイトとなる。
In the conventional immediate data transfer and arithmetic instruction execution method described above, when the upper 8 bits of 16-bit data are 0, the number of instruction bytes is (number of instruction codes + 1) bytes; The number of bytes is (number of instruction codes + 2) bytes.

そのため、上位8ビツトが0以外のある一定値の転送命
令や演算命令が多い場合でも、命令バイト数は(命令コ
ード数+2)バイトになってしまうという欠点があった
Therefore, even if there are many transfer instructions or arithmetic instructions in which the upper 8 bits have a certain value other than 0, the number of instruction bytes is (number of instruction codes + 2) bytes, which is a drawback.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のイミーディエト・データの転送、演算命令実行
方式は、算術演算と論理演算を行なうALUと前記AL
Uにおいて演算される数値を一時的に格納する第1と第
2のレジスタを有するnビット・プロセッサにおいて、
nビット・イミーディエト・データの上位mビット(m
an)を格納するイミーディエトレジスタを有し、前記
第1のレジスタは前記ALUにおいて演算されるnビッ
ト・データを一時的に格納し、前記第2のレジスタは前
記んLUにおいて演算されるnビット・データの下位(
n−m)ビットを一時的に格納し、前記イミーディエト
レジスタは前記nビット・データの上位mビットを格納
し、前記ALUは前記nビット・データの下位(n−m
)ビットだけを指定するイミーディエト・データ演算命
令で前記第1のレジスタに格納された前記nビット・デ
ータと、前記第2のレジスタに格納された数値を下位ビ
ット、前記イミーディエトレジスタに格納された数値を
上位ビットとするnビット・データとの演算を実行する
ことにより、nビット・イミーディエト・データの転送
、演算命令の命令バイト数を少なくする。
The immediate data transfer and arithmetic instruction execution method of the present invention is based on an ALU that performs arithmetic operations and logical operations, and an ALU that performs arithmetic operations and logical operations.
In an n-bit processor having first and second registers for temporarily storing numerical values to be operated on in U,
Upper m bits of n-bit immediate data (m
an), the first register temporarily stores the n-bit data calculated in the ALU, and the second register stores the n-bit data calculated in the ALU. Lower bit data (
n-m) bits, the immediate register stores the upper m bits of the n-bit data, and the ALU stores the lower m bits of the n-bit data.
) The n-bit data stored in the first register by an immediate data operation instruction that specifies only bits, and the numerical value stored in the second register as lower bits, are stored in the immediate register. By executing an operation with n-bit data using a numerical value as the upper bit, the number of instruction bytes of the n-bit immediate data transfer and operation instruction is reduced.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の第1の実施例を示すブロック図である
FIG. 1 is a block diagram showing a first embodiment of the present invention.

第1図に示すイミーディエト・データの転送。Immediate data transfer shown in FIG.

演算命令実行方式は、ALUにおいて演算される16ビ
ツトデータを一時的に格納するレジスタ1と、ALUに
おいて演算される16とットデータの下位8ビツトを一
時的に格納するレジスタ2と、16とットデータを格納
するレジスタ3と、16ビツト・イミーディエト・デー
タの上位8ビツトを格納するイミーディエトレジスタ4
と、算術演算と論理演算を行なうALU7とを含んで構
成される。
The arithmetic instruction execution method uses register 1 to temporarily store the 16-bit data calculated in the ALU, register 2 to temporarily store the lower 8 bits of the 16-bit data calculated in the ALU, and register 2 to temporarily store the 16-bit data calculated in the ALU. register 3 for storing, and immediate register 4 for storing the upper 8 bits of 16-bit immediate data.
and an ALU 7 that performs arithmetic operations and logical operations.

次に、その動作について簡単な転送命令、および加算命
令を用いて説明する。
Next, the operation will be explained using a simple transfer instruction and an addition instruction.

MOVI   IM、   01)I  ・ ・ ・ 
・(3)MOVI   R3,94H−−−−+4)A
DDI   R3,7LH・ ・ ・ ・ (5)まず
、弐〇において、イミーディエトレジスタ4は01(H
)の16ビツト・イミーディエト・データの上位7ビツ
トを格納する。0式の命令バイト数は(命令コード数+
1)バイトである。
MOVI IM, 01)I ・ ・ ・
・(3) MOVI R3,94H---+4)A
DDI R3,7LH ・ ・ ・ ・ (5) First, in 20, immediate register 4 is 01 (H
) stores the upper 7 bits of 16-bit immediate data. The number of instruction bytes for formula 0 is (number of instruction codes +
1) It is a part-time job.

つぎに、弐G41において、レジスタ3は、イミーディ
エトレジスタ4の内容を上位8ビツトとする16ビツト
データ0194(H)を格納する。式■の命令バイト数
はく命令コード数+1)バイトである。
Next, in G41, the register 3 stores 16-bit data 0194 (H) whose upper 8 bits are the contents of the immediate register 4. The number of instruction bytes in equation (2) is (the number of instruction codes + 1) bytes.

弐〇において、レジスタ1は0194(H)の16ビツ
トデータを格納し、レジスタ2はイミーディエトレジス
タ4の内容を上位8ビツトとする16とットデータ01
71 (H)を格納する。
In 20, register 1 stores 16-bit data of 0194 (H), and register 2 stores 16-bit data 01 with the contents of immediate register 4 as the upper 8 bits.
71 (H) is stored.

そして、ALtJ7はレジスタ1の内容とレジスタ2の
内容を加算して、この結果をレジスタ3に格納する。
Then, ALtJ7 adds the contents of register 1 and register 2 and stores this result in register 3.

式■の命令バイト数は(命令コード数+1)バイトであ
る。
The number of instruction bytes in formula (2) is (number of instruction codes + 1) bytes.

第2図は本発明の第2の実施例を示すプロ・ンク図であ
る。
FIG. 2 is a diagram showing a second embodiment of the present invention.

第2図に示すイミーデイエト・データの転送。Immediate data transfer shown in FIG.

演算命令実行方式は、ALUにおいて演算される16と
ットデータを一時的に格納するレジスタ1と、ALUに
おいて演算される16とットデータの下位8ビツトを一
時的に格納するレジスタ2と、16ビツトデータを格納
するレジスタ3と、16ビツト・イミーデイエト・デー
タの上位8ビツトを格納するイミーディエトレジスタ4
.5と、イミーディエトレジスタ4とイミーディエトレ
ジスタ5のどちらか一方を選択するマルチプレクサ6と
、算術演算と論理演算を行なうA L U 7とを含ん
で構成される。
The arithmetic instruction execution system uses register 1 to temporarily store the 16 bit data calculated in the ALU, register 2 to temporarily store the lower 8 bits of the 16 bit data calculated in the ALU, and register 2 to temporarily store the 16 bit data calculated in the ALU. register 3 for storing, and immediate register 4 for storing the upper 8 bits of 16-bit immediate data.
.. 5, a multiplexer 6 for selecting either immediate register 4 or immediate register 5, and ALU 7 for performing arithmetic operations and logical operations.

次に、その動作について簡単な転送命令、および加算命
令を用いて説明する。
Next, the operation will be explained using a simple transfer instruction and an addition instruction.

MOVI  IMI、  OIH・−−−+6)MOV
I  IM2. 20H・・・・(TMVII  R3
,86H−−−・(81ADI2   R3,37H・
 ・ ・ ・(9)まず、式(6)において、イミーデ
ィエトレジスタ4は、16ビツト・イミーディエト・デ
ータの上位8ビツト01 (H)を格納する。
MOVI IMI, OIH・---+6)MOV
I IM2. 20H...(TMVII R3
,86H---・(81ADI2 R3,37H・
(9) First, in equation (6), the immediate register 4 stores the upper 8 bits 01 (H) of the 16-bit immediate data.

そして、弐■において、イミーディエトレジスタらは、
16ビツト・イミーディエト・データの上位8ビツト2
0(H)を格納する。
And in Part 2, Immediate Register et al.
Upper 8 bits of 16-bit immediate data2
Store 0(H).

式(6)および式(7)の命令バイト数はく命令コード
数+1)バイトである。
The number of instruction bytes in equations (6) and (7) is (the number of instruction codes + 1) bytes.

つぎに、弐因において、マルチプレクサ6はイミーディ
エトレジスタ4を選択し、レジスタ3はイミーディエト
レジスタ4の内容を上位8ビツトとする16とットデー
タ0186 (H)を格納する。弐Hの命令バイト数は
(命令コード数+1)バイトである。
Next, in the second case, multiplexer 6 selects immediate register 4, and register 3 stores 16 bit data 0186 (H) whose upper 8 bits are the contents of immediate register 4. The number of instruction bytes for 2H is (number of instruction codes + 1) bytes.

式(9)において、レジスタ1は、レジスタ3の内容を
格納し、マルチプレクサ6はイミーディエトレジスタ5
を選択し、レジスタ2はイミーディエトレジスタ5の内
容を上位8ビツトとする16ビツトデータ2037 (
H)を格納する。
In equation (9), register 1 stores the contents of register 3, and multiplexer 6 stores the contents of register 5.
is selected, and register 2 stores 16-bit data 2037 (
H) is stored.

そして、ALU7は、レジスタ1の内容とレジスタ2の
内容とを加算して、その結果をレジスタ3に格納する0
式(9)の命令バイト数はく命令コード数+1)バイト
である。
Then, ALU7 adds the contents of register 1 and register 2 and stores the result in register 3.
The number of instruction bytes in equation (9) is (the number of instruction codes + 1) bytes.

〔発明の効果〕〔Effect of the invention〕

本発明のイミーディエト・データの転送、演算命令実行
方式は、nビット・イミーディエト・データの上位mビ
ットを専用レジスタに設定することにより、イミーディ
エト・データの転送、算術演算の命令バイト数を少なく
できるという効果がある。
The immediate data transfer and arithmetic instruction execution method of the present invention reduces the number of instruction bytes for immediate data transfer and arithmetic operations by setting the upper m bits of n-bit immediate data to a dedicated register. effective.

図面の簡単な説明 第1図は本発明の第1の実施例を示すブロック図、第2
図は本発明の第2の実施例を示すブロック図、第3図は
従来の一例を示すブロック図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a first embodiment of the present invention;
The figure is a block diagram showing a second embodiment of the present invention, and FIG. 3 is a block diagram showing a conventional example.

Claims (1)

【特許請求の範囲】[Claims] 算術演算と論理演算を行なうALUと前記ALUにおい
て演算される数値を一時的に格納する第1と第2のレジ
スタを有するnビット・プロセッサにおいて、nビット
・イミーディエト・データの上位mビット(m<n)を
格納するイミーディエトレジスタを有し、前記第1のレ
ジスタは前記ALUにおいて演算されるnビット・デー
タを一時的に格納し、前記第2のレジスタは前記ALU
において演算されるnビット・データの下位(n−m)
ビットを一時的に格納し、前記イミーディエトレジスタ
は前記nビット・データの上位mビットを格納し、前記
ALUは前記nビット・データの下位(n−m)ビット
だけを指定するイミーディエト・データ演算命令で前記
第1のレジスタに格納された前記nビット・データと、
前記第2のレジスタに格納された数値を下位ビット、前
記イミーディエトレジスタに格納された数値を上位ビッ
トとするnビット・データとの演算を実行することによ
り、nビット・イミーディエト・データの転送、演算命
令の命令バイト数を少なくすることを特徴とするイミー
ディエト・データの転送、演算命令実行方式。
In an n-bit processor having an ALU that performs arithmetic and logical operations, and first and second registers that temporarily store numerical values calculated in the ALU, the upper m bits (m< n), the first register temporarily stores n-bit data operated on in the ALU, and the second register stores n-bit data operated on in the ALU.
Lower (n-m) of n-bit data operated on
The immediate register stores the upper m bits of the n-bit data, and the ALU stores immediate data that specifies only the lower (n-m) bits of the n-bit data. the n-bit data stored in the first register by an arithmetic instruction;
Transferring n-bit immediate data by performing an operation with n-bit data in which the lower bit is the numerical value stored in the second register and the upper bit is the numerical value stored in the immediate register. , an immediate data transfer and arithmetic instruction execution method characterized by reducing the number of instruction bytes of an arithmetic instruction.
JP1119304A 1989-05-11 1989-05-11 System for transfer of immediate data and execution of arithmetic instruction Pending JPH02297627A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1119304A JPH02297627A (en) 1989-05-11 1989-05-11 System for transfer of immediate data and execution of arithmetic instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1119304A JPH02297627A (en) 1989-05-11 1989-05-11 System for transfer of immediate data and execution of arithmetic instruction

Publications (1)

Publication Number Publication Date
JPH02297627A true JPH02297627A (en) 1990-12-10

Family

ID=14758111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1119304A Pending JPH02297627A (en) 1989-05-11 1989-05-11 System for transfer of immediate data and execution of arithmetic instruction

Country Status (1)

Country Link
JP (1) JPH02297627A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009183500A (en) * 2008-02-07 2009-08-20 Daito Giken:Kk Game stand
JP2010194368A (en) * 2010-06-17 2010-09-09 Daito Giken:Kk Game machine
JP2010259837A (en) * 2010-08-23 2010-11-18 Daito Giken:Kk Game machine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009183500A (en) * 2008-02-07 2009-08-20 Daito Giken:Kk Game stand
JP2010194368A (en) * 2010-06-17 2010-09-09 Daito Giken:Kk Game machine
JP2010259837A (en) * 2010-08-23 2010-11-18 Daito Giken:Kk Game machine

Similar Documents

Publication Publication Date Title
JP2003044273A (en) Data processor and data processing method
JPH1049369A (en) Data processor
JPH04260927A (en) Data processor
US4598359A (en) Apparatus for forward or reverse reading of multiple variable length operands
JPH02297627A (en) System for transfer of immediate data and execution of arithmetic instruction
JP2007122626A (en) Microprocessor
JPH034936B2 (en)
JP2551167B2 (en) Microcomputer
JP2001243063A (en) Method and device for emulating simd instruction
EP0936540B1 (en) Information processing apparatus having a CPU and an auxiliary arithmetic unit
CA1155231A (en) Pipelined digital processor arranged for conditional operation
JPH11312085A (en) Processor
JP2567134B2 (en) Bit field logical operation processing device and monolithic microprocessor having the same
JPH0560629B2 (en)
JPH0546379A (en) Data transfer system
JP3332606B2 (en) Microprocessor
JP2000284962A (en) Microcomputer
JPH03201133A (en) Information processor
JPH02297628A (en) System for executing data transfer instruction and branch instruction
US20070055847A1 (en) Operational processor with a status information register serving as a data register
JPS62293432A (en) Information processor
JP3060917B2 (en) Processor
JPH0635669A (en) Central arithmetic processing unit
JPS61147333A (en) Register select circuit
JP2003044272A (en) Processor, data type specifying method, data loading method, computing method, data type updating method and instruction program