JPS62191933A - Register control system - Google Patents

Register control system

Info

Publication number
JPS62191933A
JPS62191933A JP3303786A JP3303786A JPS62191933A JP S62191933 A JPS62191933 A JP S62191933A JP 3303786 A JP3303786 A JP 3303786A JP 3303786 A JP3303786 A JP 3303786A JP S62191933 A JPS62191933 A JP S62191933A
Authority
JP
Japan
Prior art keywords
register
module
instruction
mapping
arithmetic
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
JP3303786A
Other languages
Japanese (ja)
Inventor
Masao Kato
加藤 政夫
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP3303786A priority Critical patent/JPS62191933A/en
Publication of JPS62191933A publication Critical patent/JPS62191933A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To facilitate a call to the modules of different types of language processing systems by giving an instruction modifying the contents of a mapping register. CONSTITUTION:A processor is roughly constituted with three parts. A man memory device 7 has the module 9, and an instruction controller 6 fetches the instruction, translates and transmits it to an arithmetic unit 8 through the main memory device 7 as it is. After the arithmetic unit completes the arithmetic, it stores the result in the main memory device 7. When an ALU 10 to execute the actual arithmetic in the arithmetic unit handles a register, it is converted by the mapping register 4 to handle a physical register 5.

Description

【発明の詳細な説明】 〔産業上の利用分野1 本発明は、汎用レジスタ方式の処理装置におけるレジス
タ制御方式に係り、異なる言語処理系のモジュール呼び
出しを容易にすることを目的としtレジスタ制御方式に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field 1] The present invention relates to a register control method in a general-purpose register type processing device, and the present invention is directed to a register control method for facilitating module calls of different language processing systems. Regarding.

〔従来の技術〕[Conventional technology]

レジスタのマツピングを行うものとしてハ、オーバラッ
プ・レジスタ・ウィンドウ方式(元岡達他著「vLSI
コンピュータIJ、岩波書店、P44〜45)があるが
、大容量のレジスタが必要とされる点や、大域レジスタ
の番号が固定であり、異なル言語処理系からのモジュー
ル呼び出しについては配慮されていない。
Overlap register window method (vLSI by Tatsu Motooka et al.
Computer IJ, Iwanami Shoten, pp. 44-45), but it requires large-capacity registers, the number of global registers is fixed, and it does not take into account module calls from different language processing systems. .

〔発明が解決しよ、うとする問題点〕[Problem that the invention seeks to solve]

本発明の目的は、汎用レジスタ方式の処理装置において
のレジスタ制御方式に係り、特に異なる言語処理系間の
モジュール呼び出しに好適なレジスタ制御方式を提供す
ることにある。
An object of the present invention is to provide a register control method in a general-purpose register type processing device, and particularly to provide a register control method suitable for module calls between different language processing systems.

〔問題点を解決する之めの手段〕[Means for solving problems]

本発明のキーとなる、レンスタマツビングの方式を、第
1図を用いて説明する。命令1のオペランド2で、論理
レジスタ3(rO,rl・・・rN)のrlを指定して
いtとする。このとき、どの物理レジスタ5 (l(,
01R1・・・RN)に対応しているかを示すマツピン
グレジスタ4(MO,、Ml・・・MN)により、論理
レジスタ3から物理レジスタ5への変換を行う。本図で
は、Mlは几Nを指しているので、r1→R,Nと変換
され、命令が実行される。
The method of lane mating, which is the key to the present invention, will be explained with reference to FIG. Operand 2 of instruction 1 specifies rl of logical register 3 (rO, rl . . . rN) and assumes that it is t. At this time, which physical register 5 (l(,
Conversion from the logical register 3 to the physical register 5 is performed using the mapping register 4 (MO, , Ml . In this figure, Ml points to 几N, so it is converted as r1→R,N, and the instruction is executed.

一般には、Mi = jとすると、ri−+Rjと変換
し、命令の実行をする。
Generally, when Mi = j, it is converted to ri-+Rj and the instruction is executed.

本発明では、マツピングレジスタ4の値を変更する命令
を装備することにより、各モジュールを論理レジスタ3
で動作可能にさせる。
In the present invention, by equipping each module with an instruction to change the value of the mapping register 4, the logic register 3
to enable operation.

一般に異なる言語処理系では、モジュール呼出しのリン
ケージ(たとえば、ワークレジスタやリターン値格納レ
ジスタ等)が異なることが多い。
In general, different language processing systems often have different module call linkages (for example, work registers, return value storage registers, etc.).

従って、異なる言語処理系間でモジュール呼出しを行う
ときは、レジスタの交換をしなければ、ならない。この
レジスタ交換に、マツピングレジスタの内容変更により
、高速に行うことができる。
Therefore, when calling modules between different language processing systems, registers must be exchanged. This register exchange can be performed at high speed by changing the contents of the mapping register.

また、モジュール呼出しと復帰時に自動的にマツピング
レジスタの内容変更を行えば、さらに高速化でき、モジ
ュール呼び出しが効率的に行える。
Further, if the contents of the mapping register are automatically changed when the module is called and returned, the speed can be further increased and the module call can be made more efficient.

〔実施列〕[Implementation row]

以下、本発明の内容を実施例を用いて説明する。 Hereinafter, the content of the present invention will be explained using examples.

第2図により、実施例の構成を示す。処理装置は、大き
く分けて、3つの部分から構成されている。
FIG. 2 shows the configuration of the embodiment. The processing device is roughly divided into three parts.

主記憶装置7上には、モジュール9があり、その命令を
、命令ルリ御装置6がフェッチし、それを解釈して、オ
ペランドを主記憶装置7経由で、命令はそのまま、演算
装置8に送る。演算装置は、演算終了後、結果を主記憶
装置7にストアする。演算装置内では、実際の演算を行
うALUIOI−j、レジスタを扱うときは、マツピン
グレジスタ4により変換されて、物理レジスタ5を扱う
ことになる。
There is a module 9 on the main memory 7 , the instruction is fetched by the instruction control unit 6 , interpreted, and the operands are sent via the main memory 7 to the arithmetic unit 8 as they are. . After the arithmetic operation is completed, the arithmetic device stores the result in the main storage device 7. In the arithmetic unit, when handling ALUIOI-j and registers that perform actual calculations, they are converted by the mapping register 4 and used as the physical registers 5.

次に、モジュール9の構成とモジュール呼び出しを、第
3図によシ説明する。モジュール9はそれごとに、モジ
ュールディスクリブタ11をもち、その中に1マツピン
グレジスタ値(MR)12と、静的変数エリア16への
ベースポインタ(SB)13と、プログラムコード15
へのベースポインタ(PB)14とをもつ。実行中のモ
ジュールディスクリブタ11へのポインタをMOD19
に入れる。モジュール人の中で、モジュールBの呼び出
しを行ったときのリンケージを以下に示す。
Next, the configuration of module 9 and module calling will be explained with reference to FIG. Each module 9 has a module disk 11 containing a mapping register value (MR) 12, a base pointer (SB) 13 to a static variable area 16, and a program code 15.
It has a base pointer (PB) 14 to. MOD19 pointer to the module disc libter 11 that is being executed
Put it in. The linkage when module B is called in the module person is shown below.

ここで、モジュール人とモジエールBとは異なる言語処
理系とし、モジュールのリンケージは、次のようになっ
ているとする。
Here, it is assumed that the module person and the module B are different language processing systems, and the module linkage is as follows.

モジュールA:ワークレジスタnrO,rl、リターン
値格納レジスタはr7゜ モジュールB:ワークレジスタはr5、r7、リターン
値格納レジスタはrOo 第3図におけるモジュールBの呼び出し17と、モジュ
ールBからの復帰18での処理を、第4図と第5図によ
って示す。
Module A: Work registers nrO, rl, return value storage register is r7. Module B: Work registers are r5, r7, return value storage register is rOo. The processing is shown in FIGS. 4 and 5.

1ず、モジュール呼び出しをすると、第4図のように、
MODの内容(Aのモジュールディスクリブタへのポイ
ンタ値)及びリターンアドレスをスタックに退避し、B
のディスクリブタアドレスをMODに格納する。これに
より、Bのディスクリブタ中のMRをマツピングレジス
タにロードし、物理レジスタと論理レジスタの対応をモ
ジュールB用に変更する。そして、PBの値をプログラ
ムカウンタに設定し、モジュールBの実行に入る。
1. When you call the module, as shown in Figure 4,
Save the contents of MOD (pointer value to A's module descriptor) and return address to the stack, and
The disc libter address of is stored in MOD. As a result, the MR in the disc libter of B is loaded into the mapping register, and the correspondence between the physical register and the logical register is changed for module B. Then, the value of PB is set in the program counter and execution of module B begins.

一方、モジュールBからモジュールAに復帰するときは
、第5図のように、リターンアドレスをスタックから取
り出し、プログラムカウンタにセットし、またスタック
から退避したMODの値を取り出しもとにもどす。さら
にモジュールAのMRf、マツピングレジスタにロード
し、物理レジスタと論理レジスタの対応をモジュールA
用にもどし、モジュールAの実行に復帰する。
On the other hand, when returning from module B to module A, as shown in FIG. 5, the return address is taken out from the stack and set in the program counter, and the MOD value saved from the stack is taken out and restored. Furthermore, module A's MRf and mapping register are loaded, and the correspondence between physical registers and logical registers is determined by module A.
and returns to execution of module A.

このようにして、第6図で示すように、モジュ(A) 一ルA1行中の論理レジスタをrO、rl(Aン・・・
、7(A)  とし、モジュールB実行中の論理レジス
タをrO(B)  、  (B)、・・・r7(8)ト
スルト、以下の式が成り立つ。
In this way, as shown in FIG.
, 7(A), and the logical registers during module B execution are rO(B), (B), . . . r7(8) tosult, the following equation holds true.

ro(A):r7(I!I):几。ro(A):r7(I!I):几.

r 1(A)= r 6(”  =R,1r7(A+ 
 = 、 □CB)  = B 7従って、モジュール
AとBとの間のワークレジスタの使い方とリターン値格
納レジスタの使い方がうまくリンケージされていること
がわかる。
r 1(A) = r 6(” = R, 1r7(A+
= , □CB) = B 7 Therefore, it can be seen that the usage of the work register and the usage of the return value storage register between modules A and B are well linked.

同様に、モジュール八及びBとも言語処理系がちがい、
モジュールのリンケージが異なるモジュールCがあった
場合も、モジュールCからモジエールBt−呼ぶとき、
モジュールCのディスクリブタのMRの愼をうまく設定
すれば、正しくリンケージされる。つまりモジュールデ
ィスクリブタのMRの値をうまく設定すれば、モジュー
ル間のリンケージの違いを吸収することができ、自由に
呼び出すことができる。
Similarly, the language processing systems of modules 8 and B are different.
Even if there is a module C with a different module linkage, when calling module Bt- from module C,
If the MR capacity of the module C disc libter is properly set, the linkage will be correct. In other words, if the MR value of the module discriminator is properly set, differences in linkage between modules can be absorbed and calls can be made freely.

以上かられかるように、本実施列によれば、言語処理系
のモジュール呼び出しによるレジスタの使用法の違いを
、モジュールディスクリブタ内のMR値に吸収すること
ができ、モジュールの自由な呼び出しが可能となる。
As can be seen from the above, according to this implementation sequence, differences in register usage due to module calls in the language processing system can be absorbed into the MR value in the module descriptor, and modules can be called freely. becomes.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、異った言語処理系のモジュールに対す
る呼び出しを、レジスタのマツピングにより、容易にで
きるので、プログラムの負担が小さくなり、また効率も
よくなるので、ソフトウェアの生産性向上の効果がある
According to the present invention, calls to modules of different language processing systems can be easily made by mapping registers, which reduces the burden on the program and improves efficiency, which has the effect of improving software productivity. .

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

第1図は本発明のレジスタマツピングを示す図、第2図
は、本発明の実施例における構成図、第3図はモジュー
ルの構成とモジエール呼び出しを示す図、第4図はモジ
ュール呼出し時のフロー図、第5図はモジュールからの
復帰時のフロー図、第6図は物理レジスタと論理レジス
タの対応を示す図である。 1・・・命令、2・・・オペランド、3・・・論理レジ
スタ、4・・・マツピングレジスタ、5・・・物理レジ
スタ、6第1 図 第2図 拓3図
Fig. 1 is a diagram showing register mapping of the present invention, Fig. 2 is a block diagram in an embodiment of the present invention, Fig. 3 is a diagram showing the module structure and module call, and Fig. 4 is a diagram showing the module call. FIG. 5 is a flowchart at the time of return from the module, and FIG. 6 is a diagram showing the correspondence between physical registers and logical registers. 1... Instruction, 2... Operand, 3... Logical register, 4... Mapping register, 5... Physical register, 6 Figure 1 Figure 2 Raku 3

Claims (1)

【特許請求の範囲】 1、汎用レジスタ方式の処理装置において、命令のオペ
ランド中の汎用レジスタ番号と、それに対応する汎用レ
ジスタとの間の、マッピングを行うマッピングレジスタ
を持ち、そのマッピングレジスタの内容を変更する命令
を設けたことを特徴とするレジスタ制御方式。 2、特許請求の範囲第1項において、モジュール呼び出
しと復帰の際、マッピングレジスタの内容を自動的に変
更する機能を持たせたことを特徴とするレジスタ制御方
式。
[Claims] 1. A general-purpose register type processing device has a mapping register that performs mapping between a general-purpose register number in an operand of an instruction and a corresponding general-purpose register, and stores the contents of the mapping register. A register control method characterized by providing a changing instruction. 2. The register control system according to claim 1, characterized in that the system has a function of automatically changing the contents of the mapping register when calling and returning a module.
JP3303786A 1986-02-19 1986-02-19 Register control system Pending JPS62191933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3303786A JPS62191933A (en) 1986-02-19 1986-02-19 Register control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3303786A JPS62191933A (en) 1986-02-19 1986-02-19 Register control system

Publications (1)

Publication Number Publication Date
JPS62191933A true JPS62191933A (en) 1987-08-22

Family

ID=12375591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3303786A Pending JPS62191933A (en) 1986-02-19 1986-02-19 Register control system

Country Status (1)

Country Link
JP (1) JPS62191933A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01152538A (en) * 1987-12-09 1989-06-15 Fujitsu Ltd Data referring method
JPH06274339A (en) * 1993-03-24 1994-09-30 Nec Corp Central processing unit
JP2020025760A (en) * 2018-08-13 2020-02-20 株式会社ソフイア Game machine
JP2020025761A (en) * 2018-08-13 2020-02-20 株式会社ソフイア Game machine
JP2020130376A (en) * 2019-02-15 2020-08-31 株式会社ソフイア Game machine

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01152538A (en) * 1987-12-09 1989-06-15 Fujitsu Ltd Data referring method
JPH06274339A (en) * 1993-03-24 1994-09-30 Nec Corp Central processing unit
JP2020025760A (en) * 2018-08-13 2020-02-20 株式会社ソフイア Game machine
JP2020025761A (en) * 2018-08-13 2020-02-20 株式会社ソフイア Game machine
JP2020130376A (en) * 2019-02-15 2020-08-31 株式会社ソフイア Game machine

Similar Documents

Publication Publication Date Title
US4715013A (en) Coprocessor instruction format
US4729094A (en) Method and apparatus for coordinating execution of an instruction by a coprocessor
JPH03653B2 (en)
JPS5841538B2 (en) Multiprocessor system instructions
US4731736A (en) Method and apparatus for coordinating execution of an instruction by a selected coprocessor
US4750110A (en) Method and apparatus for executing an instruction contingent upon a condition present in another data processor
US5021991A (en) Coprocessor instruction format
WO1985001136A1 (en) Processor with depictor-linked microcode and logic circuitry
EP0525831B1 (en) Method and apparatus for enabling a processor to coordinate with a coprocessor in the execution of an instruction which is in the intruction stream of the processor.
US4758950A (en) Method and apparatus for selectively delaying an interrupt of a coprocessor
US4821231A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
US4914578A (en) Method and apparatus for interrupting a coprocessor
JPS62191933A (en) Register control system
EP0240108A2 (en) A data processing system
JPH0380324A (en) Central processing unit
US4994961A (en) Coprocessor instruction format
US4758978A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
JPH0754467B2 (en) Data processing device
JPS6314275A (en) Scalar data operating system of vector operating processor
US4811274A (en) Method and apparatus for selectively evaluating an effective address for a coprocessor
JP3140028B2 (en) Subroutine argument passing method
JPS6122818B2 (en)
EP0333365A3 (en) Method and apparatus for handling asynchronous memory management exceptions by a vector processor
JP2006515446A (en) Data processing system with Cartesian controller that cross-references related applications
JPS5856040A (en) Data processor