[go: up one dir, main page]

JP2920698B2 - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JP2920698B2
JP2920698B2 JP1674491A JP1674491A JP2920698B2 JP 2920698 B2 JP2920698 B2 JP 2920698B2 JP 1674491 A JP1674491 A JP 1674491A JP 1674491 A JP1674491 A JP 1674491A JP 2920698 B2 JP2920698 B2 JP 2920698B2
Authority
JP
Japan
Prior art keywords
instruction
stack
stack pointer
microprocessor
instruction decoder
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 - Lifetime
Application number
JP1674491A
Other languages
Japanese (ja)
Other versions
JPH04236628A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP1674491A priority Critical patent/JP2920698B2/en
Publication of JPH04236628A publication Critical patent/JPH04236628A/en
Application granted granted Critical
Publication of JP2920698B2 publication Critical patent/JP2920698B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マイクロプロセッサに
係わり、詳細にはスタックポインタの移動を高速化した
マイクロプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor, and more particularly, to a microprocessor having a high-speed movement of a stack pointer.

【0002】[0002]

【従来の技術】従来から、マイクロプロセッサでは、ス
タックを参照して、スタックポインタを1だけ正の方向
または負の方向に1つずつ移動させるようになってい
た。
2. Description of the Related Art Conventionally, in a microprocessor, a stack pointer is moved one by one in a positive direction or a negative direction by referring to a stack.

【0003】図3は、従来のこのようなマイクロプロセ
ッサの構成を表わしたものである。マイクロプロセッサ
11は、命令を図示しない主記憶装置から取り出す命令
フェッチ部12を備えている。この命令フェッチ部12
から取り出された命令は命令デコーダ13に入力され、
解読される。解読された命令はスタック14の参照に用
いられ、次にスタックポインタ15が1だけインクリメ
ントまたはデクリメントされる。そして、同様に次の命
令が取り出されて命令デコーダ13で解読されると、ス
タックポインタ15で示された位置のスタック14が参
照され、スタックポインタ15が更に1だけインクリメ
ントまたはデクリメントされることになる。以下同様で
ある。
FIG. 3 shows the configuration of such a conventional microprocessor. The microprocessor 11 includes an instruction fetch unit 12 that fetches an instruction from a main storage device (not shown). This instruction fetch unit 12
The instruction fetched from is input to the instruction decoder 13,
Will be decrypted. The decoded instruction is used to reference the stack 14, and then the stack pointer 15 is incremented or decremented by one. When the next instruction is similarly fetched and decoded by the instruction decoder 13, the stack 14 at the position indicated by the stack pointer 15 is referred to, and the stack pointer 15 is further incremented or decremented by one. . The same applies hereinafter.

【0004】[0004]

【発明の解決しようとする課題】このように従来のマイ
クロプロセッサでは、スタックポインタの操作とスタッ
クの参照が連動するようになっていた。これは、棚構造
のメモリとしてのスタックに順にデータを格納したり、
順にデータを取り出すときに必要な動作であった。
As described above, in the conventional microprocessor, the operation of the stack pointer and the reference of the stack are linked. This means that data can be stored sequentially in a stack as a shelf-structured memory,
This operation was necessary when data was taken out in order.

【0005】しかしながら、例えばスタックに格納され
たあるデータから幾つか飛び越えて所望のデータを読み
出すようにスタックポインタを移動させるような場合に
は、スタックの参照とスタックポインタの移動という動
作を繰り返して所望のデータまでたどりつかなければな
らない。すなわち、この場合にはスタックの参照という
操作が無駄に行われ、このためにスタックポインタの移
動を十分高速化することができないという問題があっ
た。
However, for example, when the stack pointer is moved so as to jump out of some data stored in the stack and read out the desired data, the operation of referring to the stack and moving the stack pointer is repeated. You have to get to the data. That is, in this case, the operation of referring to the stack is uselessly performed, so that there is a problem that the speed of moving the stack pointer cannot be sufficiently increased.

【0006】そこで本発明の目的は、スタックを参照す
る必要がない場合には、スタックポインタを高速で移動
させることのできるマイクロプロセッサを提供すること
にある。
An object of the present invention is to provide a microprocessor which can move a stack pointer at a high speed when it is not necessary to refer to the stack.

【0007】[0007]

【課題を解決するための手段】本発明では、データを後
入れ先出し法で積み重ねて収容するスタックと、このス
タックにおける参照するデータの位置を示すスタックポ
インタと、例えば主記憶装置から命令の取り出しを行う
命令フェッチ部と、取り出された命令における第1のフ
ィールドに属する部分を解読してスタックの参照とスタ
ックポインタの移動操作とをそれぞれ1回ずつ行わせる
ようにした命令を出力する第1の命令デコーダと、取り
出された命令における第2のフィールドに属する部分を
解読してスタックポインタの移動操作を更に1回行わせ
るか否かを表わした命令を出力する第2の命令デコーダ
とをマイクロプロセッサに具備させる。
According to the present invention, a stack for storing data in a stacking manner by a last-in first-out method, a stack pointer indicating a position of data to be referred to in the stack, and, for example, fetching an instruction from a main storage device. An instruction fetch unit to execute, and a first instruction for decoding a portion belonging to the first field in the fetched instruction and outputting an instruction for performing a stack reference and a stack pointer moving operation once each A microprocessor and a second instruction decoder that decodes a portion belonging to the second field in the fetched instruction and outputs an instruction indicating whether or not to perform one more stack pointer moving operation are provided to the microprocessor. To equip it.

【0008】すなわち本発明では、スタックの参照を行
なってはスタックポインタを1つずつ移動させていく通
常の操作のとき、取り出された命令における第1のフィ
ールドに属する部分のみを使用する。これ以外のときに
は、第2のフィールドに属する部分も使用して、取り出
された1つの命令に対してスタックポインタを2つずつ
移動させるようにする。
In other words, according to the present invention, at the time of the normal operation of moving the stack pointer one by one by referring to the stack, only the part belonging to the first field in the fetched instruction is used. In other cases, the portion belonging to the second field is also used to move the stack pointer by two for one fetched instruction.

【0009】[0009]

【実施例】以下、実施例につき本発明を詳細に説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to embodiments.

【0010】図1は本発明の一実施例におけるマイクロ
プロセッサの構成を表わしたものである。マイクロプロ
セッサ21は、命令を図示しない主記憶装置から取り出
す命令フェッチ部22を備えている。この命令フェッチ
部22から取り出された命令は第1のフィールドと第2
のフィールドの2つのフィールドから構成されている。
このうち第1のフィールドは、従来の命令と同一構成の
もので、その内容は第1の命令デコーダ23に入力され
るようになっている。第2のフィールドは命令のビット
長を従来のものよりも増やすことで追加されたもので、
その内容は第2の命令デコーダ24に入力されるように
なっている。
FIG. 1 shows a configuration of a microprocessor according to an embodiment of the present invention. The microprocessor 21 includes an instruction fetch unit 22 that fetches an instruction from a main storage device (not shown). The instruction fetched from the instruction fetch unit 22 includes a first field and a second field.
Field is composed of two fields.
The first field has the same configuration as that of the conventional instruction, and its contents are input to the first instruction decoder 23. The second field was added by increasing the bit length of the instruction from the previous one,
The contents are input to the second instruction decoder 24.

【0011】第1の命令デコーダ23は、図3に示した
従来の命令デコーダ13と基本的に同一のものである。
すなわち、第1の命令デコーダ23の解読する命令は、
スタック25の参照とスタックポインタ26を1だけイ
ンクリメントまたはデクリメントするためのものであ
る。
The first instruction decoder 23 is basically the same as the conventional instruction decoder 13 shown in FIG.
That is, the instruction decoded by the first instruction decoder 23 is
This is for incrementing or decrementing the reference of the stack 25 and the stack pointer 26 by one.

【0012】第2の命令デコーダ24は、スタックポイ
ンタ26のみの制御に用いられる。すなわち第2の命令
デコーダ24の解読する命令は、スタックポインタ26
を更に1だけインクリメントまたはデクリメントする
か、このような移動操作を行わないことを表わしてい
る。
The second instruction decoder 24 is used for controlling only the stack pointer 26. That is, the instruction decoded by the second instruction decoder 24 is the stack pointer 26
Is incremented or decremented by one, or such a moving operation is not performed.

【0013】これら2種類の命令を組み合わせると、次
のような3通りの操作が可能になる。
When these two types of instructions are combined, the following three operations can be performed.

【0014】(イ)スタック25の参照に連動したスタ
ックポインタ26の操作。
(A) Operation of the stack pointer 26 in conjunction with reference to the stack 25.

【0015】(ロ)スタック25を参照せずにスタック
ポインタ26を移動させる操作。
(B) An operation of moving the stack pointer 26 without referring to the stack 25.

【0016】(ハ)以上の(イ)および(ロ)を同時に
行って、スタック25を参照しながら、スタックポイン
タ26を一度に正または負の方向に2つずつ移動させる
操作。
(C) An operation for simultaneously moving the stack pointer 26 by two in the positive or negative direction while referring to the stack 25 by simultaneously performing the above (a) and (b).

【0017】図2は、本実施例のマイクロプロセッサの
このような制御の様子を表わしたものである。図1と共
に、これを説明する。
FIG. 2 shows a state of such control of the microprocessor of the present embodiment. This will be described with reference to FIG.

【0018】まず、命令フェッチ部22が主記憶装置あ
るいは図示しないキャッシュメモリから命令を取り出す
(ステップS101)。この命令における第1のフィー
ルドに属する部分は第1の命令デコーダ23に送られ
(ステップS102)、第2のフィールドに属する部分
は第2の命令デコーダ24に送られる(ステップS10
3)。
First, the instruction fetch unit 22 fetches an instruction from a main storage device or a cache memory (not shown) (step S101). The part of this instruction belonging to the first field is sent to the first instruction decoder 23 (step S102), and the part belonging to the second field is sent to the second instruction decoder 24 (step S10).
3).

【0019】第1の命令デコーダ23では、この命令が
スタック参照であるかどうかをチェックし(ステップS
104)、そうであれば(Y)、スタックデータの参照
を行う(ステップS105)。そして、次にスタックポ
インタ26のインクリメントまたはデクリメントの操作
が指示されているかどうかをチェックし(ステップS1
06)、指示されている場合には(Y)、その操作を行
って(ステップS107)、制御を終了させる。先のス
テップS104でスタック参照を行わない場合、および
ステップS106でスタックポインタ26の操作が行わ
れない場合には、そのまま制御を終了させる(エン
ド)。
The first instruction decoder 23 checks whether this instruction is a stack reference (step S).
104), if so (Y), the stack data is referenced (step S105). Then, it is checked whether an operation of incrementing or decrementing the stack pointer 26 is instructed (step S1).
06) If instructed (Y), the operation is performed (step S107), and the control is terminated. When the stack reference is not performed in the previous step S104, and when the operation of the stack pointer 26 is not performed in the step S106, the control is terminated as it is (end).

【0020】一方、第2の命令デコーダ24では命令が
スタックポインタ26のインクリメントまたはデクリメ
ントの操作が指示されているかどうかをチェックし(ス
テップS108)、指示されている場合には(Y)、そ
の操作を行って(ステップS109)、制御を終了させ
る。指示されていない場合には(N)、そのまま制御を
終了させる(エンド)。
On the other hand, the second instruction decoder 24 checks whether or not the instruction instructs the operation of incrementing or decrementing the stack pointer 26 (step S108). Is performed (step S109), and the control is terminated. If not instructed (N), the control is terminated as it is (END).

【0021】以上の制御の結果、第1および第2の命令
デコーダ23、24が共にスタックポインタ26の操作
の指示を解読した場合には、これが一度に正または負の
方向に2つずつ移動することになる。
As a result of the above control, when both the first and second instruction decoders 23 and 24 decode the operation instruction of the stack pointer 26, they move two at a time in the positive or negative direction. Will be.

【0022】[0022]

【発明の効果】このように本発明によれば、従来から備
えられた第1の命令デコーダの他に第2の命令デコーダ
を設け、この第2の命令デコーダでもスタックポインタ
の操作の指示を解読することにしたので、スタックポイ
ンタのインクリメントまたはデクリメントを一度に2回
分行うことが可能になる。この場合、ダミーのスタック
参照の分だけ実行ステップ数を削減することができる。
また、本発明では第2の命令デコーダの解読結果だけを
用いてスタックを参照せずにスタックポインタのみを操
作することも可能になる。
As described above, according to the present invention, a second instruction decoder is provided in addition to the conventionally provided first instruction decoder, and the second instruction decoder also decodes the instruction for operating the stack pointer. Therefore, the stack pointer can be incremented or decremented twice at a time. In this case, the number of execution steps can be reduced by the amount corresponding to the dummy stack reference.
Further, according to the present invention, it is possible to operate only the stack pointer without referring to the stack using only the decoding result of the second instruction decoder.

【図面の詳細な説明】[Detailed description of drawings]

【図1】本発明の一実施例におけるマイクロプロセッサ
の回路構成の要部を示すブロック図である。
FIG. 1 is a block diagram illustrating a main part of a circuit configuration of a microprocessor according to an embodiment of the present invention.

【図2】マイクロプロセッサの制御の様子を表わした流
れ図である。
FIG. 2 is a flowchart illustrating a state of control of a microprocessor.

【図3】従来のマイクロプロセッサの構成の一例を示す
ブロック図である。
FIG. 3 is a block diagram illustrating an example of a configuration of a conventional microprocessor.

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

21 マイクロプロセッサ 22 命令フェッチ部 23 第1の命令デコーダ 24 第2の命令デコーダ 25 スタック 26 スタックポインタ 21 Microprocessor 22 Instruction Fetch Unit 23 First Instruction Decoder 24 Second Instruction Decoder 25 Stack 26 Stack Pointer

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 データを後入れ先出し法で積み重ねて収
容するスタックと、このスタックにおける参照するデー
タの位置を示すスタックポインタと、命令の取り出しを
行う命令フェッチ部と、取り出された命令における第1
のフィールドに属する部分を解読して前記スタックの参
照と前記スタックポインタの移動操作とをそれぞれ1回
ずつ行わせるようにした命令を出力する第1の命令デコ
ーダと、前記取り出された命令における第2のフィール
ドに属する部分を解読してスタックポインタの移動操作
を更に1回行わせるか否かを表わした命令を出力する第
2の命令デコーダとを具備することを特徴とするマイク
ロプロセッサ。
A stack for storing data in a last-in first-out manner; a stack pointer indicating a position of data to be referred to in the stack; an instruction fetch unit for fetching an instruction;
A first instruction decoder that decodes a portion belonging to the field of the first instruction and outputs an instruction for performing the reference of the stack and the operation of moving the stack pointer once each, and a second instruction decoder in the extracted instruction. A second instruction decoder which decodes a portion belonging to the field and outputs an instruction indicating whether or not the operation of moving the stack pointer is performed once more.
JP1674491A 1991-01-18 1991-01-18 Microprocessor Expired - Lifetime JP2920698B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1674491A JP2920698B2 (en) 1991-01-18 1991-01-18 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1674491A JP2920698B2 (en) 1991-01-18 1991-01-18 Microprocessor

Publications (2)

Publication Number Publication Date
JPH04236628A JPH04236628A (en) 1992-08-25
JP2920698B2 true JP2920698B2 (en) 1999-07-19

Family

ID=11924780

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1674491A Expired - Lifetime JP2920698B2 (en) 1991-01-18 1991-01-18 Microprocessor

Country Status (1)

Country Link
JP (1) JP2920698B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1887462A1 (en) * 2006-07-26 2008-02-13 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device, memory circuit, and machine language program generation device, and method for operating semiconductor device and memory circuit

Also Published As

Publication number Publication date
JPH04236628A (en) 1992-08-25

Similar Documents

Publication Publication Date Title
US5241679A (en) Data processor for executing data saving and restoration register and data saving stack with corresponding stack storage for each register
EP1241567B1 (en) Method and apparatus for executing coprocessor instructions
JPH056894B2 (en)
JP2920698B2 (en) Microprocessor
JPH08212075A (en) Information processor
JPH0290349A (en) Virtual memory system address space controller
US6880066B2 (en) Central processing unit and system having a prefetch queue and a command cache to perform an efficient information reading operation
JP2553200B2 (en) Information processing device
JPH01291327A (en) Processing mode prefetch control system
JP2005275703A (en) Processor, and context switching method
JPS60117335A (en) information processing equipment
JPH1020959A (en) Low power consumption micro processor
JPS62115541A (en) Microinstruction branch address generating system
JPS61294548A (en) Executing device for machine instruction
JPH04255995A (en) Instruction cache
JPS62145430A (en) Data processor
JP2581298B2 (en) Memory access right information supply mechanism
JP2002297378A (en) Signal processor
JPS63276126A (en) Instruction decoding circuit
JPS62151936A (en) Cache circuit built in microprocessor
JPH04305736A (en) Microprocessor
JPH04283833A (en) Instruction decoding method
JPH07210385A (en) Spill data processing method
JPH04362737A (en) Data processing system
JPH04358227A (en) Microprocessor