JPH0267632A - Branch instruction construction method in electronic computers - Google Patents
Branch instruction construction method in electronic computersInfo
- Publication number
- JPH0267632A JPH0267632A JP63218986A JP21898688A JPH0267632A JP H0267632 A JPH0267632 A JP H0267632A JP 63218986 A JP63218986 A JP 63218986A JP 21898688 A JP21898688 A JP 21898688A JP H0267632 A JPH0267632 A JP H0267632A
- Authority
- JP
- Japan
- Prior art keywords
- branch
- instruction
- subroutine
- address
- bcal
- 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
Links
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は電子計算機における分岐命令構成法に係り、特
に電子計算機のチャネル装置に具備されるマイクロプロ
グラム等に好適な条件分岐命令の構成法に関する。[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a method for configuring branch instructions in an electronic computer, and more particularly to a method for configuring a conditional branch instruction suitable for a microprogram, etc. included in a channel device of an electronic computer. .
従来の電子計算機における分岐命令は1分岐を行なうか
/否かを条件により決定される条件分岐命令(BC)と
、分岐を行ないながらリンク情報(次命令アドレス:自
命令アドレスに自命令長を加算した値)を指定したレジ
スタに格納するリンク情報格納可能な分岐命令(B A
L)とに大別される。なお、この種の分岐命令に関し
ては、例えばHITACMシリーズ処理装置マニアル(
マニアル番号;8080−2−001)の197〜19
8頁及び200〜201頁に記述されている。Branch instructions in conventional electronic computers include conditional branch instructions (BC) that determine whether or not to take a branch, and link information (next instruction address: add own instruction length to own instruction address) while branching. A branch instruction that can store link information (B A
It is broadly divided into L). Regarding this type of branch instruction, see, for example, the HITACM series processing unit manual (
Manual number: 8080-2-001) 197-19
8 and pages 200-201.
電子計算機のチャネル装置は一般にマイクロプログラム
を具備し、中央処理装置とは独立に入出力制御を行うが
、このチャネル装置のマイクロプログラムにおける分岐
命令の使用頻度は30〜40%であり、そのうちBCと
BALが90%程度であって、無条件分岐の頻度は小さ
い、特にチャネル装置では、製造コストの増大を防止す
る御坊として、限定された制御記憶容量にマイクロプロ
グラムを格納することを要求されるので、マイクロプロ
グラムはサブルーチンを多用し、限定された容量内で要
求機能を実限している。The channel device of an electronic computer is generally equipped with a microprogram and performs input/output control independently of the central processing unit, but the frequency of use of branch instructions in the microprogram of this channel device is 30 to 40%, of which BC and BAL is about 90%, and the frequency of unconditional branches is small.Especially in channel devices, microprograms are required to be stored in a limited control storage capacity to prevent increases in manufacturing costs. , microprograms make extensive use of subroutines to achieve required functions within a limited capacity.
更に、チャネル装置のマイクロプログラムにおいては、
チャネル指令語(CCW)の内容のテスト、入出力装置
が送信してきた装置状態バイト(DSB)のテスト、サ
ブチャネルやチャネル装置の内部状態のテスト等のため
に、BCの使用頻度が高く、且つBCの条件成立時の分
岐先をサブルーチンとして、該サブルーチンから前記B
Cの次アドレスに戻ることが、前述したサブルーチンの
多用による限定された制御記憶容量へのマイクロプログ
ラムの格納を満足するものである。この−例として、サ
ブルーチン化されたCCW読出し処理から戻ってきて、
読出したCCWの内容がチャネル内飛び越しくT I
C)であるか/否かをBCでテストしたら条件が成立し
たので、再びサブルーチン化されたCCW請出し処理へ
分岐する動作を挙げることができる。Furthermore, in the microprogram of the channel device,
BC is frequently used for testing the contents of the channel command word (CCW), testing the device status byte (DSB) sent by input/output devices, testing the internal status of subchannels and channel devices, etc. The branch destination when the condition of BC is satisfied is set as a subroutine, and the branch from the subroutine to the above B
Returning to the next address of C satisfies the storage of the microprogram in the limited control storage capacity due to the extensive use of subroutines described above. As an example, upon returning from a subroutine CCW read process,
The read CCW contents jump within the channel T I
When testing whether or not C) is true using BC, the condition is established, so the operation of branching back to the subroutine CCW request processing can be cited.
このような処理を従来のBCとBALを用いて実現する
と、BCの分岐先にBALがあって、このBALにより
サブルーチンへ分岐し、サブルーチンからの戻り先は前
記BALの次に存在するBCとなり、このBCの分岐先
を前記BCの次アドレスとするようにプログラムするこ
とになり、BCが直接リンク情報を退避することができ
ない。When such processing is realized using conventional BC and BAL, there is a BAL at the branch destination of BC, a branch is made to a subroutine by this BAL, and the return destination from the subroutine is the BC that exists next to the BAL, Since the branch destination of this BC is programmed to be the next address of the BC, the BC cannot directly save link information.
すなわち、BCの条件成立時の分岐先をサブルーチンと
し、且つ該サブルーチンから戻るために、各々2段階の
分岐を繰返さなければならない。このため、限定された
制御記憶容量にマイクロプログラムを路網するためのサ
ブルーチンを利用するの2つの分岐命令を余計に必要と
してしまい、サブルーチン利用の効果を相殺してしまう
とともに、性能も低下する。That is, in order to set the branch destination when the BC condition is satisfied as a subroutine and return from the subroutine, two steps of branching must be repeated. For this reason, two additional branch instructions are required to utilize the subroutine to route the microprogram to the limited control storage capacity, which cancels out the effect of using the subroutine and also reduces performance.
本発明の目的は、上記問題点を解決するためにリンク情
報格納可能な新たな条件分岐命令を提供し、サブルーチ
ン利用の効果低下と性能低下を防止することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a new conditional branch instruction capable of storing link information in order to solve the above-mentioned problems, and to prevent a decrease in effectiveness and performance when using subroutines.
上記目的を達成するため、本発明は、分岐条件を指定す
る第1オペランドと分岐条件成立時の分岐先アドレスを
指定する第2オペランドとを含む条件分岐命令(B C
)に、分岐条件不成立時に実行されるべき次命令アドレ
スを格納するレジスタを指定するフィールドを設けたこ
とを特徴とするものである。In order to achieve the above object, the present invention provides a conditional branch instruction (B C
) is provided with a field that specifies a register that stores the address of the next instruction to be executed when the branch condition is not satisfied.
従来のBCの条件フィールドである第1オペランドに次
命令アドレスを格納するレジスタを指定するフィールド
を付加した新たな条件分岐命令をBCAL (リンク情
報格納可能な条件分岐命令)と呼ぶことにする。A new conditional branch instruction in which a field specifying a register to store the next instruction address is added to the first operand, which is the condition field of the conventional BC, will be referred to as BCAL (conditional branch instruction capable of storing link information).
BCALが実行されると、該BCALの次命令アドレス
が、指定されたレジスタへ退避される。When BCAL is executed, the next instruction address of BCAL is saved to the designated register.
更に、該BCALの条件フィールドで指定された条件が
成立すると、該BCALの第2オペランドで示されたア
ドレスへ分岐する。この分岐先から実行される処理がサ
ブルーチン化されていると、このサブ−チンの最終命令
は条件フィールドで無条件分岐を指定されたBGであり
、該BCの第2オペランドで、前記BCALがリンク情
報を格納したレジスタを指定することにより、直ちにサ
ブルーチンから前記BCALの次命令へ戻ることができ
る。Further, when the condition specified in the condition field of the BCAL is satisfied, the process branches to the address indicated by the second operand of the BCAL. If the process executed from this branch destination is made into a subroutine, the final instruction of this sub-tine is a BG with an unconditional branch specified in the condition field, and the BCAL is linked in the second operand of the BC. By specifying the register storing the information, it is possible to immediately return from the subroutine to the next instruction of the BCAL.
以下、本発明の一実施例について図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.
なお、対象はチャネル装置のマイクロプログラムとし、
そのマイクロ命令は全て32ビツト長であるとする。ま
た、チャネル装置の制御記憶容量は8に語であるとする
。The target is the microprogram of the channel device,
Assume that all the microinstructions are 32 bits long. It is also assumed that the control storage capacity of the channel device is 8 words.
第1図の(a)は通常の条件分岐命令(B C:)の形
式であって、ビットO〜7はBCであることを識別する
ためのオペレーション・コード(o p)。(a) in FIG. 1 is the format of a normal conditional branch instruction (BC:), and bits 0 to 7 are operation codes (op) for identifying BC.
ビット10〜15は第1オペランドの条件フィールド(
T工)、ビット16〜29は分岐先アドレスを指定する
第2オペランドであって、そのうち、ビット16〜19
(B、)はベース・レジスタ番号を指定し、ビット20
〜29はB2で指定されたベース・レジスタの値からの
変位(B2)を指定する。なお、通常の条件分岐命令で
は、ビット8〜9.30〜31は無視される。Bits 10-15 are the condition field of the first operand (
Bits 16 to 29 are the second operand that specifies the branch destination address;
(B,) specifies the base register number, bit 20
~29 specifies the displacement (B2) from the value of the base register specified by B2. Note that in a normal conditional branch instruction, bits 8 to 9 and bits 30 to 31 are ignored.
第1図の(b)は、本発明により新たに導入されたリン
ク情報格納可能な条件分岐命令(BCAL)の形式であ
って、ピッ1−〇〜7はBCALであることを識別する
ためのオペレーション・コド(OII)、ピッ1〜8〜
9(RL)はBCに対して新たに付加されたリンク情報
格納先レジスタを指定するフィールドであり、ビット1
0〜15の条件フィールド(T工)とビット16〜29
の第2オペランド(B2/D2)、ビット30〜31は
第1図(a)のBCと同じである。FIG. 1(b) shows the format of a conditional branch instruction (BCAL) that can store link information newly introduced by the present invention, and the pins 1-0 to 7 are used to identify BCAL. Operation Kodo (OII), Pi 1~8~
9 (RL) is a field that specifies the link information storage register newly added to BC, and bit 1
Condition field (T) from 0 to 15 and bits 16 to 29
The second operand (B2/D2), bits 30 to 31 are the same as BC in FIG. 1(a).
本実施例においては、チャネル装りなの制御記憶容址は
に語であるので、第2図に示すように、ベース・レジス
タ(B R)はビット01〜15の計13ビットで構成
され、制御記憶をアドレスする6また、第2図に示すよ
うに、マイクロプロクラムはB RO−8までのベース
レジスタを指定可能であるが、BRO〜7はレジスタと
しての実体はなく、13CあるいはBCALの82、D
2パー1−が直接制御記憶のアドレスとなる。B R8
〜Bはレジスタとしての実体があり、各々がBCALの
R1の0〜3に対応して、BCAL実行時、R1の値に
対応してレジスタB R8〜Bのいずれかに次命令アド
レスがリンク情報として格納される。In this embodiment, since the control memory capacity of the channel is two words, the base register (BR) consists of a total of 13 bits, bits 01 to 15, as shown in FIG. Addressing Memory 6Also, as shown in Figure 2, the microprogram can specify base registers up to BRO-8, but BRO-7 do not actually exist as registers; D
2 par 1- becomes the address of direct control storage. B R8
~B has substance as a register, and each corresponds to 0 to 3 of R1 of BCAL, and when BCAL is executed, the next instruction address is stored in one of registers B R8 to B according to the value of R1 as link information. is stored as .
例えばR1=2を指定しているB CA Lが実行され
ると、該BCALの次命令アドレスがレジスタBRAへ
格納され、且つ、第2オペランドB2/D2で指定され
たアドレスへ分岐する。分岐での処理がサブルーチン化
されていると、該サブルーチンの最終命令はいわゆるリ
ターン機能を実現するためのBCであって、該BCのT
4パートは無条件分岐を指定する。該BCのB2パート
がBRAを指定し、B2パートは0とすることにより、
前記BCALにてBRAへ退避されたアドレスが次命令
アドレスとして制御記憶をアドレスするので、サブルー
チンからメインルーチンへリターンできる。For example, when a B CA L specifying R1=2 is executed, the next instruction address of the BCAL is stored in the register BRA, and a branch is made to the address specified by the second operand B2/D2. When processing at a branch is made into a subroutine, the final instruction of the subroutine is a BC for realizing a so-called return function, and the T of the BC is
The 4th part specifies an unconditional branch. By specifying BRA for the B2 part of the BC and setting the B2 part to 0,
Since the address saved to BRA at BCAL addresses the control memory as the next instruction address, it is possible to return from the subroutine to the main routine.
BCの条件成立時の分岐先をサブルーチン化し。The branch destination when the BC condition is met is made into a subroutine.
該サブルーチンからリターンするまでの流れを従来のB
CとBALを用いて実現すると、第3図のようになる。The flow from the subroutine to return is the same as the conventional B.
When realized using C and BAL, it becomes as shown in Fig. 3.
ここで、命令300〜302がメイン・ルーチンであっ
て、それの301がBCで。Here, instructions 300 to 302 are the main routine, and 301 of them is BC.
その条件が成立すると、命令310へ分岐する。If that condition is met, a branch is made to instruction 310.
310はBALであって、サブルーチン320〜32N
へ分岐するとともに命令311のアドレスをペースレジ
スタ(B R)へ退避する。サブルーチンの最終命令3
2Nは無条件のBCであって、そのB2パートで前記B
Rを指定して命令31エヘリターンする。更に、311
も無条件のBCであって、そのB 2/D 2パートで
メイン・ルーチンの命令302へ分岐(リターン)する
。310 is BAL, and subroutines 320 to 32N
At the same time, the address of instruction 311 is saved to the pace register (BR). Final instruction 3 of subroutine
2N is an unconditional BC, and in its B2 part, the above B
Specify R and return to command 31. Furthermore, 311
is also an unconditional BC, and branches (returns) to instruction 302 of the main routine in its B2/D 2 part.
第1図(b)のリンク情報格納可能な新たな条件分岐命
令(BCAL)を用いて第3図と同様の処理を実現する
と、第4図のようになる。ここで、命令301は第3図
ではBCであったが、第4図ではBCALを用いる。命
令301 (BCAL)が実行されると、そのB2/B
2パートでサブルーチンの先頭命令320へ直接分岐す
るとともに、命令302のアドレスを、R1パートで指
定されたペースレジスタ(B R)へ退避する。サブル
ーチンの最終命令32Nは無条件のBCであり、そのB
2パートが上記BRを指定し、B2パートは0とするこ
とにより、該命令32Nが実行されると、メインルーチ
ンの次命令302へ直接リターンできる。If the same process as that shown in FIG. 3 is realized using the new conditional branch instruction (BCAL) in which link information can be stored as shown in FIG. 1(b), the result will be as shown in FIG. 4. Here, the instruction 301 is BC in FIG. 3, but BCAL is used in FIG. 4. When instruction 301 (BCAL) is executed, its B2/B
The second part branches directly to the first instruction 320 of the subroutine, and the address of the instruction 302 is saved to the pace register (BR) specified in the R1 part. The final instruction 32N of the subroutine is an unconditional BC;
By specifying the BR in the second part and setting the B2 part to 0, when the instruction 32N is executed, it is possible to directly return to the next instruction 302 of the main routine.
以上の説明から明らかな如く、本発明の分岐命令構成法
によれば、条件分岐命令でありながらリンク情報を退避
できるので、サブルーチンへの分岐、サブルーチンから
の戻りを実現するためのプログラムの総命令数を低減で
きるとともに処理性能も向上でき、更にプログラム設計
を容易にできる効果がある。As is clear from the above explanation, according to the branch instruction configuration method of the present invention, link information can be saved even though it is a conditional branch instruction, so that the total instructions of a program to realize a branch to a subroutine and a return from a subroutine can be saved. This has the effect of reducing the number of programs, improving processing performance, and facilitating program design.
第1図は通常の条件分岐命令と本発明によるリンク情報
格納可能な条件分岐命令の形式例を示す図、第2図は本
発明の条件分岐命令によるベース・レジスタの割付は表
の一例を示す図、第3図は従来の分岐命令を用いた場合
のフローチャート、第4図は本発明のリンク情報格納可
能な条件分岐命令を用いた場合のフローチャートである
。
300〜302・・・メイン・ルーチン、301・・B
CAL命令、
320〜32N
・サブルーチン。
第1
図
C久)
第2図FIG. 1 is a diagram showing an example of the format of a normal conditional branch instruction and a conditional branch instruction that can store link information according to the present invention, and FIG. 2 is an example of a table for base register allocation according to the conditional branch instruction of the present invention. 3 is a flowchart when a conventional branch instruction is used, and FIG. 4 is a flowchart when a conditional branch instruction capable of storing link information of the present invention is used. 300-302...Main routine, 301...B
CAL command, 320-32N - Subroutine. Figure 1 C) Figure 2
Claims (1)
立時の分岐先アドレスを指定する第2オペランドとを含
む条件分岐命令に、分岐条件不成立時に実行されるべき
次命令アドレスを格納するレジスタを指定するフィール
ドを設けたことを特徴とする電子計算機における分岐命
令構成法。(1) In a conditional branch instruction that includes a first operand that specifies a branch condition and a second operand that specifies a branch destination address when the branch condition is met, add a register that stores the address of the next instruction to be executed when the branch condition is not met. A method for configuring branch instructions in an electronic computer, characterized by providing a field for specifying them.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63218986A JPH0267632A (en) | 1988-09-01 | 1988-09-01 | Branch instruction construction method in electronic computers |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63218986A JPH0267632A (en) | 1988-09-01 | 1988-09-01 | Branch instruction construction method in electronic computers |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0267632A true JPH0267632A (en) | 1990-03-07 |
Family
ID=16728478
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63218986A Pending JPH0267632A (en) | 1988-09-01 | 1988-09-01 | Branch instruction construction method in electronic computers |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0267632A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5290993A (en) * | 1991-05-31 | 1994-03-01 | Hitachi, Ltd. | Microwave plasma processing device |
| US5951887A (en) * | 1996-03-28 | 1999-09-14 | Sumitomo Metal Industries, Ltd. | Plasma processing apparatus and plasma processing method |
| US6046425A (en) * | 1991-05-31 | 2000-04-04 | Hitachi, Ltd. | Plasma processing apparatus having insulator disposed on inner surface of plasma generating chamber |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5520534A (en) * | 1978-07-28 | 1980-02-14 | Nec Corp | Data processor |
-
1988
- 1988-09-01 JP JP63218986A patent/JPH0267632A/en active Pending
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5520534A (en) * | 1978-07-28 | 1980-02-14 | Nec Corp | Data processor |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5290993A (en) * | 1991-05-31 | 1994-03-01 | Hitachi, Ltd. | Microwave plasma processing device |
| US6046425A (en) * | 1991-05-31 | 2000-04-04 | Hitachi, Ltd. | Plasma processing apparatus having insulator disposed on inner surface of plasma generating chamber |
| US5951887A (en) * | 1996-03-28 | 1999-09-14 | Sumitomo Metal Industries, Ltd. | Plasma processing apparatus and plasma processing method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR20010043826A (en) | Microcontroller instruction set | |
| US20130145127A1 (en) | Zero value prefixes for operands of differing bit-widths | |
| US6012138A (en) | Dynamically variable length CPU pipeline for efficiently executing two instruction sets | |
| KR20010072491A (en) | Data processor with an arithmetic logic unit and a stack | |
| JPH0267632A (en) | Branch instruction construction method in electronic computers | |
| JPS623332A (en) | Information processor having instruction containing direct value field | |
| JPS61184643A (en) | Starting control system for virtual computer | |
| US6243798B1 (en) | Computer system for allowing a two word jump instruction to be executed in the same number of cycles as a single word jump instruction | |
| KR20010072490A (en) | Data processor comprising a register stack | |
| JPS62120542A (en) | Information processor | |
| US20020129229A1 (en) | Microinstruction sequencer stack | |
| Franca et al. | Design and realization of MLM: a multilingual machine | |
| JP2883489B2 (en) | Instruction processing unit | |
| JP2883488B2 (en) | Instruction processing unit | |
| JP2657947B2 (en) | Data processing device | |
| JPH01205339A (en) | Microcomputer system | |
| JPS6260034A (en) | Stored program system controller | |
| Eldumiati et al. | MAC-4: A Single-Chip Microcomputer | |
| JPH03257572A (en) | Multiprocessor system | |
| JPS61267133A (en) | Microprogram storage system | |
| JPH0531170B2 (en) | ||
| Deel et al. | Amicroprogrammed AN/UYK-20 (V) emulation | |
| JPS60262244A (en) | Data processor | |
| JPH0731598B2 (en) | Computer | |
| JPS62194545A (en) | Program rewriting device for data flow type computer |