[go: up one dir, main page]

JPH05127870A - Data processor - Google Patents

Data processor

Info

Publication number
JPH05127870A
JPH05127870A JP3288402A JP28840291A JPH05127870A JP H05127870 A JPH05127870 A JP H05127870A JP 3288402 A JP3288402 A JP 3288402A JP 28840291 A JP28840291 A JP 28840291A JP H05127870 A JPH05127870 A JP H05127870A
Authority
JP
Japan
Prior art keywords
register
accumulator
value
data processing
switching
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
JP3288402A
Other languages
Japanese (ja)
Inventor
Daijiro Harada
大次郎 原田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP3288402A priority Critical patent/JPH05127870A/en
Publication of JPH05127870A publication Critical patent/JPH05127870A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To suppress the increase of the data processing time and also the increase of the program size by setting a register at the specific value and switching the register used for execution of an instruction after the specific value is set for the register. CONSTITUTION:A flag register 1 is usueally set at 0, and a 1st gate 21 and a 2nd gate 22 are turned off and on with the outputs (a) and (b) set at 0 and 1 respectively. At the same time, an accumulator A 3 is selected. This state is kept as it is until the set value of the register 1 is changed. Meanwhile the register 1 is set at 1 when the accumulator A 3 is switched. Then the gates 21 and 22 are turned on and off with the outputs (a) and (b) set at 1 and 0 respectively together with selection of an accumulator B 4. This state is kept as it is until the set value of the register 1 is changed. Under such conditions, a single step is provided to set the flag value end a register can be designated for execution of the instructions after the step.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、複数のレジスタを切り
換えて選択的に使用するデータ処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device which selectively uses a plurality of registers by switching them.

【0002】[0002]

【従来の技術】データ処理装置に対する命令は、命令の
種類を示すオペレーションコード(以下、オペコードと
略記する)と、処理対象のメモリにおけるアドレス等を
示すオペランドとから構成される。
2. Description of the Related Art An instruction to a data processing device is composed of an operation code (hereinafter abbreviated as an operation code) indicating the type of instruction and an operand indicating an address or the like in a memory to be processed.

【0003】例えば、演算用のレジスタであるアキュム
レータを用いる演算の命令形式は、オペランドが1つで
ある1アドレス命令形式であって、予めメモリから移動
されているアキュムレータのデータとオペランドとの間
で演算が行われ、結果がアキュムレータに置かれる。
For example, the instruction format of an operation using an accumulator which is a register for operation is a one-address instruction format having one operand, and the data is stored between the data and the operand of the accumulator which has been moved from the memory in advance. The operation is performed and the result is placed in the accumulator.

【0004】従って、複数のアキュムレータを有するデ
ータ処理装置で演算に用いるアキュムレータを選択する
方法としては、2個以上のオペランドを持つ命令を新た
に設ける方法も考えられるが、従来のデータ処理装置で
は命令セット数の増加を避け、すでに設けられている命
令よりなるアキュムレータの切換命令を演算命令の前に
配置したプログラムを作成し、必要に応じてアキュムレ
ータを切り換えている。
Therefore, as a method of selecting an accumulator used for an operation in a data processing device having a plurality of accumulators, a method of newly providing an instruction having two or more operands can be considered. To avoid an increase in the number of sets, a program is created in which an accumulator switching instruction made up of already-provided instructions is placed before an arithmetic instruction, and the accumulator is switched as necessary.

【0005】図1は、2個のアキュムレータを有する従
来のデータ処理装置におけるアキュムレータ切換えの概
念図であって、図1(a) に示すようにオペコードと1つ
のオペランドとからなる演算命令のみの場合はアキュム
レータAを使用し、図1(b)に示すように、アキュムレ
ータの切換命令(1) と演算命令(2) とがセットになって
いる場合はアキュムレータAからアキュムレータBに切
り換える。
FIG. 1 is a conceptual diagram of accumulator switching in a conventional data processor having two accumulators, and in the case of only operation instructions consisting of an opcode and one operand as shown in FIG. 1 (a). 1 uses the accumulator A, and as shown in FIG. 1B, when the accumulator switching instruction (1) and the operation instruction (2) are set, the accumulator A is switched to the accumulator B.

【0006】[0006]

【発明が解決しようとする課題】以上のように、従来の
データ処理装置ではアキュムレータBを使用する都度、
演算命令の前に切換命令を実行しなければならず、デー
タ処理時間の増加及びプログラムサイズの肥大を招くと
いう問題がある。
As described above, in the conventional data processor, every time the accumulator B is used,
Since the switching instruction must be executed before the arithmetic instruction, there is a problem that the data processing time increases and the program size increases.

【0007】本発明はこのような問題点を解決するため
になされたものであって、使用するレジスタを特定する
値を設定して設定後のレジスタをその値が特定するレジ
スタに自動的に切り換えることにより、レジスタ切換え
によるデータ処理時間の増加及びプログラムサイズの肥
大を抑制するデータ処理装置の提供を目的とする。
The present invention has been made to solve such a problem, and sets a value for specifying a register to be used, and automatically switches a register after setting to a register specified by the value. Thus, an object of the present invention is to provide a data processing device that suppresses an increase in data processing time and an increase in program size due to register switching.

【0008】[0008]

【課題を解決するための手段】本発明に係るデータ処理
装置は、レジスタを特定する値を一度設定した後の命令
実行時には設定値により特定されるレジスタに切り換え
て複数のレジスタを選択的に使用することを特徴とす
る。
A data processing apparatus according to the present invention selectively uses a plurality of registers by switching to a register specified by a set value when executing an instruction after setting a value specifying the register once. It is characterized by doing.

【0009】[0009]

【作用】本発明に係るデータ処理装置は、レジスタを特
定する値を記憶部に設定すると、その後のデータ処理時
には記憶部に設定されている値が特定するレジスタを選
択して使用する。
In the data processing apparatus according to the present invention, when a value specifying a register is set in the storage section, the register specified by the value set in the storage section is selected and used in the subsequent data processing.

【0010】[0010]

【実施例】以下、本発明をその実施例を示す図に基づい
て説明する。図2は本発明に係るデータ処理装置の構成
を示すブロック図である。図中1はアキュムレータを特
定する値を記憶するフラグレジスタであって、次に値が
設定されるまで現在の値を保持する。切換回路2はフラ
グレジスタ1が記憶している値に従って、2個のアキュ
ムレータ(A)3及び(B) 4間で演算に使用するアキュム
レータを切り換える。
The present invention will be described below with reference to the drawings showing the embodiments thereof. FIG. 2 is a block diagram showing the configuration of the data processing device according to the present invention. In the figure, 1 is a flag register for storing a value that specifies the accumulator, and holds the current value until the value is set next time. The switching circuit 2 switches the accumulator used for the calculation between the two accumulators (A) 3 and (B) 4 according to the value stored in the flag register 1.

【0011】フラグレジスタ1には切換回路2の第1MO
S-FET21 及び反転回路を介した第2MOS-FET22 が並列に
接続されており、第1MOS-FET21 にはアキュムレータ
(A) 3が、また第2MOS-FET22 にはアキュムレータ(B)
4が接続されている。
The flag register 1 has a first MO of the switching circuit 2.
The S-FET21 and the second MOS-FET22 via an inverting circuit are connected in parallel, and the first MOS-FET21 has an accumulator.
(A) 3 and accumulator (B) on the second MOS-FET 22
4 is connected.

【0012】以上のような構成のデータ処理装置におけ
るレジスタ切換えの動作について説明する。フラグレジ
スタ1には通常“0”が設定されており、出力“a”が
“0”で第1ゲート21がOFF され、出力“b”が“1”
で第2ゲート22がONされてアキュムレータ(A) 3が選択
され、フラグレジスタ1の設定値が変わるまでこの状態
が保持される。
A register switching operation in the data processing apparatus having the above configuration will be described. Normally, "0" is set in the flag register 1, the output "a" is "0", the first gate 21 is turned off, and the output "b" is "1".
Then, the second gate 22 is turned on, the accumulator (A) 3 is selected, and this state is held until the set value of the flag register 1 changes.

【0013】また、アキュムレータを切り換える場合、
フラグレジスタ1に“1”が設定され、出力“a”が
“1”で第1ゲート21がONされ、出力“b”が“0”で
第2ゲート22がOFF されてアキュムレータ(B) 4が選択
され、フラグレジスタ1の設定値が変わるまでこの状態
が保持される。
When switching the accumulator,
The flag register 1 is set to "1", the output "a" is "1" and the first gate 21 is turned on, the output "b" is "0" and the second gate 22 is turned off and the accumulator (B) 4 Is selected, and this state is held until the set value of the flag register 1 changes.

【0014】以上のように、本発明に係るデータ処理装
置のプログラムでは、フラグ値を設定するステップを1
ステップ設けるだけで、このステップ以降の命令実行に
使用するレジスタを指定することができるので、プログ
ラムサイズの肥大及びデータ処理時間の増大が抑制され
る。
As described above, in the program of the data processing apparatus according to the present invention, the step of setting the flag value is 1
The registers used for executing the instructions after this step can be specified only by providing the steps, so that the enlargement of the program size and the increase of the data processing time can be suppressed.

【0015】なお、本実施例ではフラグの値によって2
個のレジスタを切り換える構成について説明したが、2
ビット以上の値を用いて3個以上のレジスタから1個の
レジスタを選択する構成とすることも可能であって、本
実施例と同様の効果が得られる。
In this embodiment, 2 is set depending on the value of the flag.
The configuration for switching individual registers has been described, but 2
It is also possible to adopt a configuration in which one register is selected from three or more registers by using a value of bits or more, and the same effect as this embodiment can be obtained.

【0016】また、本実施例では複数のレジスタから1
個のレジスタを選択する構成について説明したが、複数
のレジスタから所定の組合せのレジスタ群を選択する構
成であってもよく、本実施例と同様の効果が得られる。
Further, in this embodiment, one register is selected from a plurality of registers.
Although the configuration for selecting one register has been described, the configuration may be such that a predetermined combination of register groups is selected from a plurality of registers, and the same effect as that of the present embodiment can be obtained.

【0017】なお、これら他の実施例の場合、切換回路
の構成はそれぞれに応じた回路構成が必要であることは
いうまでもない。
Needless to say, in the case of these other embodiments, the switching circuit must have a circuit configuration corresponding to each of them.

【0018】[0018]

【発明の効果】以上のように、本発明に係るデータ処理
装置は、レジスタを特定する値の設定によって、設定後
の命令実行に使用するレジスタを切り換えるので、複数
のレジスタを選択的に使用する構成におけるデータ処理
時間の増大及びプログラムサイズの肥大を抑制するとい
う優れた効果を奏する。
As described above, the data processing apparatus according to the present invention switches the register used for executing the instruction after the setting by setting the value specifying the register, so that the plurality of registers are selectively used. This has an excellent effect of suppressing an increase in data processing time and an increase in program size in the configuration.

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

【図1】従来のデータ処理装置におけるアキュムレータ
切換えの概念図である。
FIG. 1 is a conceptual diagram of accumulator switching in a conventional data processing device.

【図2】本発明に係るデータ処理装置の構成を示すブロ
ック図である。
FIG. 2 is a block diagram showing a configuration of a data processing device according to the present invention.

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

1 フラグレジスタ 2 切換回路 3 アキュムレータA 4 アキュムレータB 1 Flag register 2 Switching circuit 3 Accumulator A 4 Accumulator B

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数のレジスタを選択的に使用してデー
タ処理する装置において、所定レジスタを特定する値を
記憶する記憶部と、前記所定レジスタの値を前記記憶部
に記憶させる手段と、前記記憶部に記憶されている値が
特定するレジスタを使用してデータ処理する手段とを備
えたことを特徴とするデータ処理装置。
1. A device for processing data by selectively using a plurality of registers, a storage unit for storing a value for specifying a predetermined register, a unit for storing the value of the predetermined register in the storage unit, And a means for processing data using a register whose value stored in the storage section is specified.
JP3288402A 1991-11-05 1991-11-05 Data processor Pending JPH05127870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3288402A JPH05127870A (en) 1991-11-05 1991-11-05 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3288402A JPH05127870A (en) 1991-11-05 1991-11-05 Data processor

Publications (1)

Publication Number Publication Date
JPH05127870A true JPH05127870A (en) 1993-05-25

Family

ID=17729746

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3288402A Pending JPH05127870A (en) 1991-11-05 1991-11-05 Data processor

Country Status (1)

Country Link
JP (1) JPH05127870A (en)

Similar Documents

Publication Publication Date Title
JP3237858B2 (en) Arithmetic unit
KR100188374B1 (en) Processing unit
JPH05127870A (en) Data processor
JP2553200B2 (en) Information processing device
JPH0831033B2 (en) Data processing device
JP3525582B2 (en) Bit operation circuit
JP2001075778A (en) Arithmetic unit and its method
JP2743685B2 (en) Fixed-point processor
JP3088956B2 (en) Arithmetic unit
JP2583614B2 (en) Vector arithmetic unit
JPS63141131A (en) Pipeline control system
JPH02210543A (en) Data processor
JPS6024642A (en) Microprogram controlling system
JPH04358227A (en) Microprocessor
JPH0442328A (en) Interruption control system for information processor
JPS6057440A (en) Information processor
JPS5822455A (en) Data processor
JPH05143326A (en) Bank processor
JPH0353322A (en) Information processor
JPH0269826A (en) Conditional command control method
JPS6031644A (en) Microprogram control device
JPS6373332A (en) Microprogram control system
JPS63245526A (en) Information processor
JPH0683612A (en) Data processor
JPH0644066A (en) Information processor