JPH0290228A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH0290228A
JPH0290228A JP24271788A JP24271788A JPH0290228A JP H0290228 A JPH0290228 A JP H0290228A JP 24271788 A JP24271788 A JP 24271788A JP 24271788 A JP24271788 A JP 24271788A JP H0290228 A JPH0290228 A JP H0290228A
Authority
JP
Japan
Prior art keywords
register
instruction
microprocessor
holding device
instructions
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
JP24271788A
Other languages
Japanese (ja)
Inventor
Katsutoshi 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.)
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 JP24271788A priority Critical patent/JPH0290228A/en
Publication of JPH0290228A publication Critical patent/JPH0290228A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To remove the much existence of instructions which are meaningless in spite of execution by allocating different operations to several instructions whose internal states are not changed by an ordinary microprocessor while keeping interchangeability between the ordinary microprocessor and instruction codes. CONSTITUTION:The title microprocessor is provided with a data bus 101, general registers (GRs) 102 to 104, a register specifying information holding device 105, a register specifying information holding device changing instruction detecting circuit 106, and a constant generator 107. The microprocessor dynamically changes a register to be made access by effectively using a meaningless instruction code equivalent to a no-operation instruction while keeping the interchangeability with an ordinary microprocessor. Consequently, instructions equivalent to the no-operation instruction whose internal state is not changed in spite of execution and having no change to be used can be reduced.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はマイクロプロセッサに関し、特に命令コードに
よるレジスタ指定方式をプログラム実行中に変更できる
マイクロプロセッサに関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a microprocessor, and more particularly to a microprocessor in which a register specification method using an instruction code can be changed during program execution.

(従来の技術) 従来、マイクロプロセッサにとって、実行しても内部の
状態が変化せず、実質的に意味の無い命令が複数存在す
る。例えば、M(JV  regl、 reg 2のよ
うにreg2の内容’fr: reg 1に転送するよ
うな命令で、reglとreg 2によって指定される
レジスタが同一である場合などである。
(Prior Art) Conventionally, a microprocessor has a plurality of instructions that do not change the internal state even when executed and are essentially meaningless. For example, in an instruction such as M(JV regl, reg 2, which transfers the contents of reg2 to 'fr: reg 1', the registers specified by regl and reg 2 are the same.

以下に、このように実質的な無効命令を実行するマイク
ロプロセッサの構成ならびに動作について図面を用いて
説明する。
The configuration and operation of a microprocessor that executes such a substantially invalid instruction will be described below with reference to the drawings.

第4図は、一般的な汎用マイクロプロセッサのレジスタ
及びデータバスの構成を表した図である。
FIG. 4 is a diagram showing the configuration of registers and data bus of a general-purpose microprocessor.

第4図において、301はデータバス、302は汎用レ
ジスタAX、303は汎用レジスタBX。
In FIG. 4, 301 is a data bus, 302 is a general-purpose register AX, and 303 is a general-purpose register BX.

304は汎用レジスタCX、305はテンポラリレジス
タである。
304 is a general-purpose register CX, and 305 is a temporary register.

次に本従来例の動作について例を挙げて説明する。Next, the operation of this conventional example will be explained by giving an example.

N3図において、 M(JV  AX、 AX という命令を実行した場合、汎用レジスタAXリード信
号とテンポラリレジスタライト信号がアクティブとなシ
、データバス301を介して汎用レジスタAXの値がテ
ンポラリレジスタ305に書き込まれ、その後テンポラ
リレジスタリード信号と汎用レジスタAXライト信号が
アクティブとな、り、7’−pハス301’t−介して
テンポラリレジスタ305の値が汎用レジスタAX30
2に書き込まれる。このような命令は、マイクロプロセ
ッサの状態を保持したまま、クロック数を費やすための
No−uperatton”命令と同じ効果を持つこと
になる。同様に、 MOV  BX、BX M(JV  OX、UX という命令を実行した場合も、  −No−(Jper
atton”命令と同様の効果を持つ。
In figure N3, when the instruction M(JV AX, AX is executed, the general-purpose register AX read signal and temporary register write signal are active, and the value of general-purpose register AX is written to the temporary register 305 via the data bus 301. After that, the temporary register read signal and the general-purpose register AX write signal become active, and the value of the temporary register 305 is transferred to the general-purpose register AX30 via 7'-p has301't-.
Written to 2. Such an instruction would have the same effect as the "No-upperatton" instruction to consume clocks while preserving the state of the microprocessor.Similarly, the instructions MOV BX, BX M (JV OX, UX) -No- (Jper
It has the same effect as the "atton" command.

以下、具体的な動作例について述べる。A specific example of operation will be described below.

本従来例に対して、 AX=0001H BX=0002H cx=o003H の状態で MOV  AX、AX−−−−−−−−−(1)ADD
  AX、BX・用旧・・(2)MOV  AX、AX
・−−−−−−−−(3)という命令列を実行すると、 MOV  AX、AX−−・−−−−−−(1)では何
も変化しないので、 AX=0001H nx=oOO2H cx=ooo3)1 となシ、 ADD  AX、BX・・・・旧・・(2)によってA
XKBXの値が加算され Ax=oO03H BX=0002H CX=OO03H となル、 MOV  AX、AX・・・・・・・・・(3)では何
も変化しないので、 AX=OO03H BX=0002H cx=ooo3)( となる。
For this conventional example, MOV AX, AX---(1) ADD in the state of AX=0001H BX=0002H cx=o003H
AX, BX/Old use... (2) MOV AX, AX
・When you execute the instruction sequence (3), MOV AX, AX--・-- Nothing changes in (1), so AX=0001H nx=oOO2H cx= ooo3) 1 Tonashi, ADD AX, BX...old...A by (2)
The value of XKBX is added and becomes Ax=oO03H BX=0002H CX=OO03H, MOV AX, AX... Since nothing changes in (3), AX=OO03H BX=0002H cx= ooo3)( becomes.

(発明が解決しようとする課題) 前記従来例のようなマイクロプロセッサは、実行しても
内部状態が全く何も変化しない“No−0perati
on”命令と同等で、しかも使用されることのない命令
が多数ある、という欠点t−有していた。
(Problem to be Solved by the Invention) A microprocessor like the one in the conventional example has a “No-0 perity” state in which the internal state does not change at all even when executed.
It has the disadvantage that there are many instructions that are equivalent to the "on" instruction but are never used.

本発明の目的は、マイクロプロセッサに於て、従来のマ
イクロプロセッサと命令コードでの互換性を保ちつつ、
なおかつ、従来のマイクロプロセッサで内部状態を変化
させないような命令の幾つかに対して異なった動作を割
夛当て、上記欠点を除去し得るマイクロプロセッサを提
供する事に有る。
An object of the present invention is to provide a microprocessor that maintains compatibility with conventional microprocessors in instruction code.
Furthermore, it is an object of the present invention to provide a microprocessor that can eliminate the above-mentioned drawbacks by allocating different operations to some of the instructions that do not change the internal state in conventional microprocessors.

(課題を解決するための手段) 本発明の構成は、命令コードの一部分を用いてアクセス
対象のレジスタを指定するマイクロプロセッサに於て、
そのレジスタ指定の変更情報を保持する記憶手段と、前
記命令コードの一部分によってアクセスすべきレジスタ
を指定する信号及び前記記憶手段の内容に従って前記レ
ジスタに対するリード/ライト信号を生成する信号発生
器と、前記命令コードが無効であることを検出する手段
とを具備し、前記検出手段により無効命令であることを
検出したとき前記記憶手段の内容を変更し、前記信号発
生器によって以降の命令コードによるアクセス対象のレ
ジスタ指定とは異なるレジスタに対してリード/ライト
信号を発生する事を特徴とする。
(Means for Solving the Problems) The configuration of the present invention provides a microprocessor that uses a part of an instruction code to specify a register to be accessed.
a storage means for holding change information of the register designation; a signal generator for generating a signal for designating a register to be accessed by a part of the instruction code and a read/write signal for the register according to the contents of the storage means; means for detecting that the instruction code is invalid, and when the detection means detects that the instruction is invalid, the contents of the storage means are changed, and the signal generator changes the contents of the storage means to be accessed by a subsequent instruction code. The feature is that a read/write signal is generated to a register different from the register specified by .

(実施例] 次に、本発明の構成並びに動作について図面を用いて説
明する。
(Example) Next, the configuration and operation of the present invention will be explained using the drawings.

本発明の第1の実施例のブロック図を第1図に示す。A block diagram of a first embodiment of the present invention is shown in FIG.

第1図において、101はデータバス、102〜104
は汎用レジスタ、105はレジスタ指定情報保持装置、
106はレジスタ指定情報保持装置変更命令検出回路、
107は定数発生器である。
In FIG. 1, 101 is a data bus, 102 to 104
is a general-purpose register, 105 is a register specification information holding device,
106 is a register designation information holding device change command detection circuit;
107 is a constant generator.

また、第3図はレジスタ指定情報保持装置105の値と
、汎用レジスタ102,104がそれぞれ割シ当てられ
るレジスタの関係を示す一例の図である。
Further, FIG. 3 is a diagram showing an example of the relationship between the values of the register designation information holding device 105 and the registers to which the general-purpose registers 102 and 104 are respectively allocated.

次に、本実施例の動作について説明する。Next, the operation of this embodiment will be explained.

W、1図に於て、レジスタ指定情報保持装置105の値
が、“001010100”の状態に設定しであるとす
ると、ii1!3図に従って、汎用レジスタ102が従
来例84図のレジスタAX302に、汎用レジスタ10
3が従来例第4図のレジスタBX303に、汎用レジス
タ104が従来例第4図のレジスタCX304に相当す
る。
W. In Fig. 1, if the value of the register designation information holding device 105 is set to the state of "001010100", according to Fig. ii1!3, the general-purpose register 102 is changed to the register AX302 of the conventional example 84, General purpose register 10
3 corresponds to the register BX303 in the conventional example shown in FIG. 4, and the general-purpose register 104 corresponds to the register CX304 in the conventional example shown in FIG.

また、従来例に於ては MOV  AX、AX という命令は、実行前と実行後でマイクロプロセッサの
内部状態は変わらないが、本実施例に於ては MOV  AX  AX という命令をレジスタ指定情報保持装置変更命令検出回
路120が受は取ると、レジスタ指定情報保持装置リー
ド信号をアクティブにし、例えば、レジスタ指定情報保
持装置の値が@″001010100”ならば、BXと
CXの指定を入れ換えるような動作、すなわち、定数発
生器121にデータバス101にイミディエートデータ
”001100010”を発生させ、レジスタ指定情報
保持装置ライト信号をアクティブにして、レジスタ指定
情報保持装置105に書き込むような動作t−蔵こす。
In addition, in the conventional example, the internal state of the microprocessor does not change before and after execution of the instructions MOV AX, AX, but in this embodiment, the instructions MOV AX, AX are stored in the register specification information holding device. When the change command detection circuit 120 accepts the request, it activates the register designation information holding device read signal and, for example, if the value of the register designation information holding device is @"001010100", it performs an operation of exchanging the designations of BX and CX. That is, the constant generator 121 generates immediate data "001100010" on the data bus 101, activates the register designation information holding device write signal, and performs an operation of writing to the register designation information holding device 105.

MOV  BX、BX MOV  CX  CX も、それぞれ第3図に従ってAXとCXの指定の入れ換
え、AXとBXの入れ換えを行い、従来例とは異なった
動作をする。
MOV BX, BX MOV CX CX also perform operations different from the conventional example by exchanging the designations of AX and CX and exchanging AX and BX, respectively, according to FIG.

次に、具体例を挙げて従来例との違いを示す。Next, a specific example will be given to show the difference from the conventional example.

本実施例に於て、 (AXに割シ当てられたレジスタ)=OO01H(BX
に割り当てられたレジスタ) =0002H(CXに割
シ当てられたレジスタ)=OO03Hの状態で、 MOV  AX、AX・・・・・・・・・(0)ADD
  AX、BX・・・・・・・・・(0)MOV  A
X、AX・−−−−・・・・(0)という3命令から収
る命令列を実行したときの結果は、 (AXに割勺当てられたレジスタ)=OO04H(BX
に割シ当てられたレジスタ)=OO02H(CXに割り
当てられたレジスタ) =0003Hとなり、前記従来
例の動作と異なる。これは、MOV  AX、AX−旧
旧−・(1)によって、 (AXに割り当てられたレジスタ)=0001H(BX
に割シ当てられたレジスタ)”0003)((CXに割
シ当てられたレジスタ) =0002Hとな夛、 ADD  AX、BX・・・・・・・・・(2)によっ
て、(AXに割り当てられたレジスタ)に(BXに割夛
当てられたレジスタンが加算され、(AXに割り当てら
れたレジスタ)=0004H(BXに割g当てられ九レ
ジスタ) =0003H(CXに割り当てられたレジス
タ) =0002Hとな夛、2度目の MOV  AX、AX・・・・・・・・・(3)によっ
て、 (AXに割り当てられたレジスタ)=0004H(BX
に割プ当てられたレジスタ) =0002H(CXに割
り当てられたレジスタ) =0003Hとなるからであ
る。
In this embodiment, (register assigned to AX)=OO01H(BX
(register assigned to CX) = 0002H (register assigned to CX) = OO03H, MOV AX, AX (0) ADD
AX, BX・・・・・・・・・(0)MOV A
The result when executing the instruction sequence consisting of the three instructions X, AX... (0) is (register allocated to AX) = OO04H (BX
(register assigned to CX) = OO02H (register assigned to CX) = 0003H, which is different from the operation of the conventional example. This is done by MOV AX, AX - old and old - (1), (register assigned to AX) = 0001H (BX
0003) ((register assigned to CX) = 0002H), ADD AX, BX...... (2) The registers allocated to BX are added to (registers allocated to BX), (registers allocated to AX) = 0004H (9 registers allocated to BX) = 0003H (registers allocated to CX) = 0002H Tonataku, second MOV AX, AX...... (3), (register assigned to AX) = 0004H (BX
This is because (register assigned to CX) =0002H (register assigned to CX) =0003H.

また、本実施例ではMOV命令を用いたが、XCHG 
 BX  BX 命令等を用いても同様の効果を得ることができる。
In addition, although the MOV instruction was used in this embodiment, the XCHG
A similar effect can be obtained by using the BX BX command or the like.

本実施例で述べたような、 MOV  AX、AX XCHG  BX  BX のような命令は、マイクロプロセッサの内部状態を変化
させない命令であシ、従来のマイクロプロセッサで通常
用いられることがなく、単にクロックを費やすときには
”No−0peration”命令を用いるが、本実施
例では”’No−0perat 1on−命令に対して
は従来と同じ動作をする丸め、命令互換性を保つことが
できる。
Instructions such as MOV AX, AX A "No-0peration" instruction is used when the data is to be spent, but in this embodiment, for the "No-0perat 1on-" instruction, rounding operates in the same manner as in the conventional method, and instruction compatibility can be maintained.

また、第3図も一例であって、別の論理に従ってもよい
ことは明らかである。
Moreover, FIG. 3 is also an example, and it is clear that other logic may be followed.

次に、本発明の別の実施例について説明する。Next, another embodiment of the present invention will be described.

第2の実施例では、第1の実施例で、 MOV  AX、AX のような意味の無い命令を用いていたのに対し、従来の
マイクロプロセッサでは未定義命令コードとなっている
命令コードを検出した時に、レジスタ指定情報保持装置
205の値を変更するように、レジスタ指定情報保持装
置変更命令検出回路1060代わりに未定義命令検出回
路206t−置いた構成となってお9、他は第1の実施
例と同様である。
The second embodiment uses meaningless instructions such as MOV AX, AX in the first embodiment, whereas the conventional microprocessor detects instruction codes that are undefined instruction codes. The configuration is such that an undefined instruction detection circuit 206t is placed in place of the register specification information holding device change instruction detection circuit 1060 so as to change the value of the register specification information holding device 205 when This is similar to the example.

第2の実施例の構成を第2図に示す。第2図に於て、2
01はデータバス、202.204は汎用レジスタ、2
05はレジスタ指定情報保持装置、206は未定義命令
検出回路である。
The configuration of the second embodiment is shown in FIG. In Figure 2, 2
01 is a data bus, 202.204 is a general-purpose register, 2
05 is a register designation information holding device, and 206 is an undefined instruction detection circuit.

次に、M2の実施例の動作を説明する。Next, the operation of the M2 embodiment will be explained.

未定義命令以外の命令を実行する場合は、前記従来例の
動作と全く同一であるが、未定義命令コードが命令コー
ド入力線を介して未定義命令検出回路206に入力され
た場合、未定義命令コードの種類によって、定められた
値をレジスタ指定情報保持装置205に送シ、汎用レジ
スタ202〜204の指定を変更する。
When executing an instruction other than an undefined instruction, the operation is exactly the same as that of the conventional example, but if an undefined instruction code is input to the undefined instruction detection circuit 206 via the instruction code input line, an undefined instruction Depending on the type of instruction code, a predetermined value is sent to the register designation information holding device 205, and the designations of the general-purpose registers 202 to 204 are changed.

以降、命令コードによるアクセス対象のレジスタとは異
なるレジスタに対してリード/ライト動作を行う。
Thereafter, read/write operations are performed on a register different from the register to be accessed by the instruction code.

尚、iii!2の実施例は、第1の実施例と同様に”N
o−0peration−命令に対して前記従来例と同
じ動作をし、前記従来例における一No−Operat
i。
Furthermore, iii! In the second embodiment, like the first embodiment, “N
The same operation as in the conventional example is performed for the o-0operation-instruction, and one No-Operation in the conventional example is
i.

n”命令と同等の意味のない命令に対しても前記従来例
と同一の動作をするため、前記従来例の上位互換性を持
つ、というところが前記第1の実施例と比較して特徴的
である。
Compared to the first embodiment, this embodiment has upward compatibility with the conventional example because it operates in the same way as the conventional example even for meaningless instructions equivalent to the n'' instruction. be.

(発明の効果) 以上のように本発明を用いれば、従来のマイクロプロセ
ッサとの命令互換性を保ちつつ、なおかつ、従来のマイ
クロプロセッサで複数存在した、@No−0perat
ion″命令と同等の意味の無い命令コードtV効に用
い、アクセス対象のレジスタを動的に変化させる、とい
う従来のマイクロプロセッサよル有効な命令を動作させ
ることができる。
(Effects of the Invention) As described above, by using the present invention, it is possible to maintain instruction compatibility with conventional microprocessors, and to solve the @No-0perat
It is possible to operate a more effective instruction than a conventional microprocessor, which uses a meaningless instruction code equivalent to the "ion" instruction to dynamically change the register to be accessed.

107・・・定数発生器、206・・・未定義命令検出
回路、302・・・汎用レジスタAX、303・・・汎
用レジスタBX、304・・・汎用レジスタCX、30
5・・・テンポラリレジスタ。
107... Constant generator, 206... Undefined instruction detection circuit, 302... General purpose register AX, 303... General purpose register BX, 304... General purpose register CX, 30
5... Temporary register.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はW、1の実施例の構成図、第2図は第2の実施
例の構成図、第3図は実施例におけるレジスタ指定情報
保持装置の値と汎用レジスタとの対応を示す一例の図、
第4図は従来例の構成図である。
Fig. 1 is a block diagram of the embodiment of W, 1, Fig. 2 is a block diagram of the second embodiment, and Fig. 3 is an example showing the correspondence between the value of the register designation information holding device and the general-purpose register in the embodiment. diagram,
FIG. 4 is a configuration diagram of a conventional example.

Claims (1)

【特許請求の範囲】[Claims] 命令コードの一部分を用いてアクセス対象のレジスタを
指定するマイクロプロセッサに於て、そのレジスタ指定
の変更情報を保持する記憶手段と、前記命令コードの一
部分によってアクセスすべきレジスタを指定する信号及
び前記記憶手段の内容に従って前記レジスタに対するリ
ード/ライト信号を生成する信号発生器と、前記命令コ
ードが無効であることを検出する手段とを具備し、前記
検出手段により無効命令であることを検出したとき前記
記憶手段の内容を変更し、前記信号発生器によって以降
の命令コードによるアクセス対象のレジスタ指定とは異
なるレジスタに対してリード/ライト信号を発生する事
を特徴とするマイクロプロセッサ。
In a microprocessor that specifies a register to be accessed using a part of an instruction code, a storage means for holding change information of the register specification, a signal for specifying a register to be accessed by the part of the instruction code, and the memory a signal generator for generating a read/write signal for the register according to the contents of the means; and means for detecting that the instruction code is invalid; and when the detecting means detects that the instruction code is invalid; A microprocessor characterized in that the contents of a storage means are changed and the signal generator generates a read/write signal to a register different from a register to be accessed by a subsequent instruction code.
JP24271788A 1988-09-27 1988-09-27 Microprocessor Pending JPH0290228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24271788A JPH0290228A (en) 1988-09-27 1988-09-27 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24271788A JPH0290228A (en) 1988-09-27 1988-09-27 Microprocessor

Publications (1)

Publication Number Publication Date
JPH0290228A true JPH0290228A (en) 1990-03-29

Family

ID=17093192

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24271788A Pending JPH0290228A (en) 1988-09-27 1988-09-27 Microprocessor

Country Status (1)

Country Link
JP (1) JPH0290228A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007105337A (en) * 2005-10-17 2007-04-26 Dainippon Printing Co Ltd Lunch box

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007105337A (en) * 2005-10-17 2007-04-26 Dainippon Printing Co Ltd Lunch box

Similar Documents

Publication Publication Date Title
US5812868A (en) Method and apparatus for selecting a register file in a data processing system
US6178482B1 (en) Virtual register sets
US4777588A (en) General-purpose register file optimized for intraprocedural register allocation, procedure calls, and multitasking performance
US3778776A (en) Electronic computer comprising a plurality of general purpose registers and having a dynamic relocation capability
US6338134B1 (en) Method and system in a superscalar data processing system for the efficient processing of an instruction by moving only pointers to data
US5615348A (en) Microprocessor having register bank architecture
JPS61123959A (en) Electronics equipment having attachable/detachable memory module
JPH0290228A (en) Microprocessor
US20020184473A1 (en) Method and system for tracking and recycling physical register assignment
US4816992A (en) Method of operating a data processing system in response to an interrupt
JP3539984B2 (en) Processor
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
JP2000029690A (en) Method and device for data processing
US6711655B1 (en) Finding available memory space by finding its associated memory transfer controller
EP1139214A1 (en) System for allowing a two word instruction to be executed in a single cycle and method therefor
JP2883488B2 (en) Instruction processing unit
JP2933569B2 (en) Central processing unit
JP4116752B2 (en) Computer and its control method
JPS62151942A (en) Task changing-over system
JP2679603B2 (en) Microcomputer
JPS62120543A (en) Switching system for memory bank
JP2657947B2 (en) Data processing device
JPS63237143A (en) Programmable controller
JPH03127126A (en) Information processor
JPH0259933A (en) Microprocessor