JPH06124207A - サブルーチン分岐命令実行方法 - Google Patents
サブルーチン分岐命令実行方法Info
- Publication number
- JPH06124207A JPH06124207A JP4301692A JP30169292A JPH06124207A JP H06124207 A JPH06124207 A JP H06124207A JP 4301692 A JP4301692 A JP 4301692A JP 30169292 A JP30169292 A JP 30169292A JP H06124207 A JPH06124207 A JP H06124207A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- subroutine
- branch
- program counter
- destination address
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3802—Instruction prefetching
- G06F9/3804—Instruction prefetching for branches, e.g. hedging, branch folding
- G06F9/3806—Instruction prefetching for branches, e.g. hedging, branch folding using address prediction, e.g. return stack, branch history buffer
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/32—Address formation of the next instruction, e.g. by incrementing the instruction counter
- G06F9/322—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/32—Address formation of the next instruction, e.g. by incrementing the instruction counter
- G06F9/322—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
- G06F9/323—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for indirect branch instructions
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
- Advance Control (AREA)
Abstract
減し、その命令を高速に実行できるようにしたサブルー
チン分岐命令実行方法を提供する。 【構成】 命令読出し用とデータの読み書き用にデータ
バス4を共用し、少なくとも命令フェッチと命令実行の
間に1つ以上のステージがあるパイプライン処理装置に
おいて、サブルーチン分岐時に、アドレスバス5に分岐
先アドレスを載せて、分岐先命令をフェッチし、プログ
ラムカウンタA7の内容をプログラムカウンタB8に一
時的に退避し、次いで新しい分岐先アドレスでプログラ
ムカウンタA7の内容を更新し、しかる後プログラムカ
ウンタB8の内容(=復帰先アドレス)をメモリ3上に
退避する。
Description
実行方法に関し、特に命令読出し用とデータの読み書き
用のバスを共用し、少なくとも命令フェッチと命令実行
の間に1つ以上のステージがあるパイプライン処理装置
におけるサブルーチン分岐命令実行方法に関する。
行方法が適用されるパイプライン処理装置の構成の一例
を示すブロック図である。ここで、図3に示すような構
造を持つCPU1において、図4のようなパイプライン
をもってサブルーチン分岐命令を実行する場合を考え
る。図4においては、第2番目の命令がサブルーチン分
岐命令であり、第3番目の命令はサブルーチン分岐後の
最初の命令である。サブルーチン分岐命令では、 プログラムカウンタ7が新しい分岐先アドレスで更
新される前のプログラムカウンタの内容(=復帰先アド
レス)をメモリ3上に退避する。すなわち、プログラム
カウンタ7に格納されている復帰先アドレスは、経路
d、データバス4および経路eを経てメモリ3上に退避
される。このとき、このとき、スタックポインタ9のス
タックアドレスが、経路h、アドレスバス5および経路
fを経てメモリ3に与えられる。
ウンタ7を更新する。すなわち、分岐先アドレス発生器
6で発生された分岐先アドレスは、経路a、アドレスバ
ス5および経路bを経てプログラムカウンタ7に供給さ
れることにより、プログラムカウンタ7の内容を更新す
る。 アドレスバス(AB)5に分岐先アドレスを載せ
て、分岐先命令をフェッチする。すなわち、分岐先アド
レス発生器6で発生された分岐先アドレスは、経路a、
アドレスバス5および経路fを経てメモリ3に与えら
れ、またメモリ3から読み出された分岐先の命令は、経
路c、データバス4および経路gを経て命令レジスタ2
に取り込まれる。
ブルーチン分岐命令実行方法では、サブルーチン分岐を
行う際に、サブルーチンからの復帰先アドレスをメモリ
3上に退避した後、分岐先の命令フェッチを行っていた
ので、図4の例のように、上記,の各動作を同時に
行った場合には、サブルーチン分岐命令3サイクル後に
しか次の命令(第3番目の命令)を実行できなかった。
すなわち、サブルーチンからの復帰先アドレスの退避と
命令フェッチは同一のバスを使用することから、同一サ
イクルに実行できないため、復帰先アドレスの退避から
次の命令の実行までには4サイクル必要であった。
のであり、サブルーチン分岐命令の実行サイクル数を削
減し、その命令を高速に実行できるようにしたサブルー
チン分岐命令実行方法を提供することを目的とする。
ン分岐命令実行方法は、命令読出し用とデータの読み書
き用のバスを共用し、少なくとも命令フェッチと命令実
行の間に1つ以上のステージがあるパイプライン処理装
置において、サブルーチン分岐時に、サブルーチンから
の復帰先アドレスの退避に先立って分岐先の命令フェッ
チを行い、分岐先の命令フェッチとその命令実行の間に
サブルーチンからの復帰先アドレスの退避を行うように
する。
帰先アドレスの退避に先立って分岐先の命令フェッチを
行い、分岐先の命令フェッチとその命令実行の間にサブ
ルーチンからの復帰先アドレスの退避を行うことで、分
岐先の命令フェッチとその命令実行の間のステージであ
るデコードと並行してサブルーチンからの復帰先アドレ
スの退避を行えることになるので、サブルーチン分岐命
令2サイクル後に次の命令を実行できる。その結果、従
来よりもサブルーチン分岐命令の実行サイクル数が少な
くて済むため、その命令を高速に実行できる。
に説明する。図1は、本発明によるサブルーチン分岐処
理実行方法が適用されるパイプライン処理装置の構成の
一例を示すブロック図である。図1において、CPU
(中央処理装置)1は、命令レジスタ2からの命令読出
し用とメモリ3に対するデータの読み書き用としてデー
タバス(DB)4を共用した構成となっている。そし
て、CPU1内の処理は、少なくとも命令フェッチと命
令実行の間に1つ以上のステージがあるパイプライン処
理構造を採っている。
いて、次のような順序〜でサブルーチン分岐命令を
実行することとする。 アドレスバス(AB)5に分岐先アドレスを載せ
て、分岐先命令をフェッチする。すなわち、分岐先アド
レス発生器6で発生された分岐先アドレスは、経路a、
アドレスバス5および経路fを経てメモリ3に与えら
れ、またメモリ3から読み出された分岐先の命令は経路
c、データバス4および経路gを経て命令レジスタ2に
取り込まれる。
グラムカウンタB8に一時的に退避する。すなわち、プ
ログラムカウンタA7に格納されている復帰先アドレス
は、経路cを経てプログラムカウンタB8に一時的に退
避される。 新しい分岐先アドレスでプログラムカウンタA7の
内容を更新する。すなわち、分岐先アドレス発生器6で
発生された分岐先アドレスは、経路a、アドレスバス5
および経路bを経てプログラムカウンタA7に供給され
ることにより、プログラムカウンタA7を更新する。 プログラムカウンタB8の内容(=復帰先アドレ
ス)をメモリ3上に退避する。すなわち、プログラムカ
ウンタB8に一時的に退避された復帰先アドレスは、経
路d、データバス4および経路eを経てメモリ3上に退
避される。このとき、スタックポインタ9のスタックア
ドレスが、経路h、アドレスバス5および経路fを経て
メモリ3に与えられる。
全く問題ない。また、プログラムカウンタA7,B8が
いわゆるフリップフロップ動作をなすので、の動作も
同時に行うことができる。結局、 ,,→ のような順序でサブルーチン分岐命令を実行すれば、図
2に示すような実行が得られる。図2においても、第2
番目の命令がサブルーチン分岐命令であり、第3番目の
命令はサブルーチン分岐後の最初の命令である。
し用とデータ読み書き用に共用し、命令フェッチと命令
実行の間にステージ(本例では、デコード)があるパイ
プライン処理装置において、サブルーチン分岐時に、分
岐先の命令フェッチをサブルーチンからの復帰先アドレ
スの退避に先立って行うようにしたことにより、分岐先
の命令フェッチとその命令実行の間のデコードと並行し
てサブルーチンからの復帰先アドレスの退避を行えるこ
とになるので、分岐先命令の実行までのサイクル数は3
サイクルで済む。すなわち、サブルーチン分岐命令2サ
イクル後に次の命令(第3番目の命令)を実行できるた
め、従来よりも、サブルーチン分岐命令の実行サイクル
数が少なくて済み、命令実行の高速化が図れる。
命令読出し用とデータの読み書き用のバスを共用し、少
なくとも命令フェッチと命令実行の間に1つ以上のステ
ージがあるパイプライン処理装置において、サブルーチ
ン分岐時に、サブルーチンからの復帰先アドレスの退避
に先立って分岐先の命令フェッチを行い、分岐先の命令
フェッチとその命令実行の間にサブルーチンからの復帰
先アドレスの退避を行うようにしたことにより、サブル
ーチン分岐命令2サイクル後に次の命令を実行できるの
で、サブルーチン分岐命令の実行サイクル数が少なくて
済み、その命令を高速に実行できることになる。
適用されるパイプライン処理装置の構成の一例を示すブ
ロック図である。
れるパイプライン処理装置の構成の一例を示すブロック
図である。
Claims (2)
- 【請求項1】 命令読出し用とデータの読み書き用のバ
スを共用し、少なくとも命令フェッチと命令実行の間に
1つ以上のステージがあるパイプライン処理装置におい
て、 サブルーチン分岐時に、サブルーチンからの復帰先アド
レスの退避に先立って分岐先の命令フェッチを行い、 分岐先の命令フェッチとその命令実行の間にサブルーチ
ンからの復帰先アドレスの退避を行うことを特徴とする
サブルーチン分岐命令実行方法。 - 【請求項2】 前記パイプライン処理装置は、分岐先ア
ドレスを格納する第1のプログラムカウンタと、前記第
1のプログラムカウンタに格納された分岐先アドレスを
復帰先アドレスとして一時的に退避する第2のプログラ
ムカウンタとを具備したことを特徴とする請求項1記載
のサブルーチン分岐命令実行方法。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30169292A JP3211423B2 (ja) | 1992-10-13 | 1992-10-13 | 分岐命令実行方法および分岐命令実行装置 |
| KR1019930020686A KR100301391B1 (ko) | 1992-10-13 | 1993-10-07 | 서브루틴분기명령실행방법및그장치 |
| US08/862,842 US5819081A (en) | 1992-10-13 | 1997-05-23 | Method of executing a branch instruction of jumping to a subroutine in a pipeline control system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30169292A JP3211423B2 (ja) | 1992-10-13 | 1992-10-13 | 分岐命令実行方法および分岐命令実行装置 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06124207A true JPH06124207A (ja) | 1994-05-06 |
| JP3211423B2 JP3211423B2 (ja) | 2001-09-25 |
Family
ID=17900001
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30169292A Expired - Fee Related JP3211423B2 (ja) | 1992-10-13 | 1992-10-13 | 分岐命令実行方法および分岐命令実行装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US5819081A (ja) |
| JP (1) | JP3211423B2 (ja) |
| KR (1) | KR100301391B1 (ja) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100381876B1 (ko) * | 1995-07-03 | 2003-07-18 | 텍사스 인스트루먼츠 인코포레이티드 | 프로그램카운팅시스템및카운터의동작방법 |
| KR100413674B1 (ko) * | 1996-12-05 | 2004-02-14 | 삼성전자주식회사 | 하드와이어드 서브루틴 생성장치 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3211423B2 (ja) | 1992-10-13 | 2001-09-25 | ソニー株式会社 | 分岐命令実行方法および分岐命令実行装置 |
| KR100480384B1 (ko) * | 1997-11-22 | 2005-07-18 | 엘지산전 주식회사 | 피엘씨전용마이크로프로세서의프로그램제어방법 |
| EP0953898A3 (en) * | 1998-04-28 | 2003-03-26 | Matsushita Electric Industrial Co., Ltd. | A processor for executing Instructions from memory according to a program counter, and a compiler, an assembler, a linker and a debugger for such a processor |
| US20040167786A1 (en) * | 2002-03-08 | 2004-08-26 | Grace John J. | System for optimizing selection of a college or a university and a method for utilizing the system provided by a program |
Family Cites Families (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US3789365A (en) * | 1971-06-03 | 1974-01-29 | Bunker Ramo | Processor interrupt system |
| US3967104A (en) * | 1974-11-26 | 1976-06-29 | Texas Instruments Incorporated | Direct and indirect addressing in an electronic digital calculator |
| US4003033A (en) * | 1975-12-22 | 1977-01-11 | Honeywell Information Systems, Inc. | Architecture for a microprogrammed device controller |
| US4179737A (en) * | 1977-12-23 | 1979-12-18 | Burroughs Corporation | Means and methods for providing greater speed and flexibility of microinstruction sequencing |
| US4394729A (en) * | 1980-10-16 | 1983-07-19 | Ncr Corporation | Jump return stack |
| US4399507A (en) * | 1981-06-30 | 1983-08-16 | Ibm Corporation | Instruction address stack in the data memory of an instruction-pipelined processor |
| US4488227A (en) * | 1982-12-03 | 1984-12-11 | Honeywell Information Systems Inc. | Program counter stacking method and apparatus for nested subroutines and interrupts |
| US4821183A (en) * | 1986-12-04 | 1989-04-11 | International Business Machines Corporation | A microsequencer circuit with plural microprogrom instruction counters |
| DE3726192A1 (de) * | 1987-08-06 | 1989-02-16 | Otto Mueller | Stacksteuerung |
| US4910664A (en) * | 1987-11-27 | 1990-03-20 | Mitsubishi Denki Kabushiki Kaisha | Data processor with apparatus for reducing loop processing time |
| US5193205A (en) * | 1988-03-01 | 1993-03-09 | Mitsubishi Denki Kabushiki Kaisha | Pipeline processor, with return address stack storing only pre-return processed address for judging validity and correction of unprocessed address |
| US5202967A (en) * | 1988-08-09 | 1993-04-13 | Matsushita Electric Industrial Co., Ltd. | Data processing apparatus for performing parallel decoding and parallel execution of a variable word length instruction |
| JPH0778735B2 (ja) * | 1988-12-05 | 1995-08-23 | 松下電器産業株式会社 | キャッシュ装置と命令読出し装置 |
| US5127091A (en) * | 1989-01-13 | 1992-06-30 | International Business Machines Corporation | System for reducing delay in instruction execution by executing branch instructions in separate processor while dispatching subsequent instructions to primary processor |
| JP2570859B2 (ja) * | 1989-05-25 | 1997-01-16 | 日本電気株式会社 | データ処理装置 |
| US5317700A (en) * | 1992-05-01 | 1994-05-31 | Unisys Corporation | Program history for pipelined processor including temporary storage queues for storing branch addresses |
| JP3211423B2 (ja) | 1992-10-13 | 2001-09-25 | ソニー株式会社 | 分岐命令実行方法および分岐命令実行装置 |
-
1992
- 1992-10-13 JP JP30169292A patent/JP3211423B2/ja not_active Expired - Fee Related
-
1993
- 1993-10-07 KR KR1019930020686A patent/KR100301391B1/ko not_active Expired - Fee Related
-
1997
- 1997-05-23 US US08/862,842 patent/US5819081A/en not_active Expired - Lifetime
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100381876B1 (ko) * | 1995-07-03 | 2003-07-18 | 텍사스 인스트루먼츠 인코포레이티드 | 프로그램카운팅시스템및카운터의동작방법 |
| KR100413674B1 (ko) * | 1996-12-05 | 2004-02-14 | 삼성전자주식회사 | 하드와이어드 서브루틴 생성장치 |
Also Published As
| Publication number | Publication date |
|---|---|
| US5819081A (en) | 1998-10-06 |
| KR940009822A (ko) | 1994-05-24 |
| JP3211423B2 (ja) | 2001-09-25 |
| KR100301391B1 (ko) | 2001-10-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0592404B1 (en) | Apparatus and method for providing a stall cache | |
| JPS62226232A (ja) | 分岐先アドレス算出回路 | |
| JPH06124207A (ja) | サブルーチン分岐命令実行方法 | |
| JP2006515446A (ja) | 関連アプリケーションを相互参照するカルテシアンコントローラを有するデータ処理システム | |
| JP2812610B2 (ja) | パイプライン制御方式 | |
| JP3325309B2 (ja) | サブルーチンリターン命令処理装置 | |
| JPH08272608A (ja) | パイプライン処理装置 | |
| KR100246465B1 (ko) | 마이크로프로세서 스택 명령어의 수행사이클을 줄이기 위한 장치 및 그 방법 | |
| JPS6086625A (ja) | デ−タ処理装置 | |
| JP2738683B2 (ja) | データ処理装置 | |
| JP2522562B2 (ja) | プログラマブルコントロ―ラ | |
| JPS5995646A (ja) | 演算制御装置 | |
| JPS61161509A (ja) | 高速シ−ケンス演算方式及びその装置 | |
| JPH0353322A (ja) | 情報処理装置 | |
| JPH0342721A (ja) | 情報処理装置 | |
| JPS58205256A (ja) | データ処理方法 | |
| JPH023822A (ja) | データ処理装置 | |
| JPH03154929A (ja) | 中央処理装置 | |
| JPS58154045A (ja) | 情報処理装置 | |
| JPH0236421A (ja) | シーケンサの基本命令処理方式 | |
| JPH04287227A (ja) | 演算処理装置 | |
| JPH0442327A (ja) | 先行制御装置 | |
| JPS60176155A (ja) | アクセス制御方式 | |
| JPH0792902A (ja) | プログラマブルコントローラ | |
| JPH02294829A (ja) | メモリオペランド取出しシステム |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080719 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090719 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090719 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100719 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100719 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110719 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110719 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120719 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |