JPH04138528A - Common data accessing system in contracted instruction setting computer - Google Patents

Common data accessing system in contracted instruction setting computer

Info

Publication number
JPH04138528A
JPH04138528A JP26138990A JP26138990A JPH04138528A JP H04138528 A JPH04138528 A JP H04138528A JP 26138990 A JP26138990 A JP 26138990A JP 26138990 A JP26138990 A JP 26138990A JP H04138528 A JPH04138528 A JP H04138528A
Authority
JP
Japan
Prior art keywords
register
common data
program
allocation
execution
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
JP26138990A
Other languages
Japanese (ja)
Inventor
Koji Okumura
奥村 公史
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 Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP26138990A priority Critical patent/JPH04138528A/en
Publication of JPH04138528A publication Critical patent/JPH04138528A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To improve the execution speed of a program by fixedly storing a common data address in a register prior to the execution of the program. CONSTITUTION:A register storing means 14 is constituted of an execution program recognizing means 51 and a register value setting means 52. In the case of storing a connectionally edited executable type program in a memory in order to execute the program, the means 14 starts the means 51, 52 and extracts names in each translation unit from an allocating state table 80. At the time of transferring execution control to the translation unit, contents specified by the name are executed. Thus, the address of common data is fixedly allocated to a prescribed register by a register allocating means 12 and the contents of the register are set up prior to their execution. Thus, the execution speed of the program can be improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は縮小命令セットコンピュータにおける共通デー
タアクセス方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a common data access scheme in reduced instruction set computers.

〔従来の技術〕[Conventional technology]

従来のこの種の共通データアクセス方式は、メモリ上に
共通データの連係編集後の論理アドレスを格納し、共通
データの参照時に当該論理アドレスをレジスタに格納し
、そのレジスタ上の論理アドレスを起点とするメモリを
アクセスするという第1の方式と、機械語命令中のメモ
リを表す領域に対して再配置情報を生成し、実行時にそ
の領域に連係編集後の論理アドレスを格納して共通デー
タのアクセスをするという第2の方式が知られている。
This type of conventional common data access method stores the logical address of the common data after link editing in memory, stores the logical address in a register when referencing the common data, and uses the logical address on the register as the starting point. The first method is to access the memory that is to be stored, and the second method is to generate relocation information for the area representing the memory in the machine language instruction, store the logical address after link editing in that area at the time of execution, and access common data. A second method is known.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来の第1の方式の場合、実行速度の遅いメモ
リアクセス命令が共通データの参照ごとに現れるため、
共通データを多数参照するプログラムでは実行速度が低
下する。また第2の方式では、共通データの参照ごとに
再配置情報が生成されるため、翻訳単位のファイルが大
きくなるという欠点がある。
In the case of the first conventional method described above, since a memory access instruction with a slow execution speed appears every time common data is referenced,
Programs that reference a lot of common data will run slower. Furthermore, in the second method, relocation information is generated each time common data is referenced, so there is a drawback that the translation unit file becomes large.

本発明は、このような従来の欠点を解消するもので、共
通データのアドレスをプログラムの実行に先立ってレジ
スタに固定的に格納することにより、実行速度を向上し
、かつ翻訳単位のファイルサイズを縮小することができ
るレジスタ割付は方式を提供する事を目的とする。
The present invention solves these conventional drawbacks by fixedly storing the address of common data in a register prior to program execution, thereby improving execution speed and reducing the file size of a translation unit. The purpose is to provide a method for register allocation that can be reduced.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の共通データアクセス方式は、縮小命令セットコ
ンピュータ上で動作するプログラムの共通データのアク
セス回数をプログラムの翻訳時に計測するためのアクセ
ス管理手段と、アクセス回数と共通データの名称とを情
報として持つアクセス管理テーブルを使用して共通デー
タのレジスタへの割付けをプログラムの翻訳時に制御す
るレジスタ割付は手段と、共通データの名称とその共通
データに対するレジスタの割付は状態とを情報として持
つレジスタ割付はテープを使用してプログラムの連係編
集時に仮想メモリ上の論理アドレスとレジスタの対応を
情報として持つ割付は状態テーブルを生成する割付は状
態情報生成手段と、連係編集後の実行可能プログラムを
実行に先立ってメモリに格納する際に割付は状態テーブ
ルを使用して上記論理アドレス値をレジスタに格納する
レジスタ格納手段とを含むことを特徴とする。
The common data access method of the present invention includes an access management means for measuring the number of accesses to common data of a program running on a reduced instruction set computer at the time of program translation, and information containing the number of accesses and the name of the common data. Register allocation is a method that uses an access management table to control the allocation of common data to registers during program translation, and a tape is used for register allocation that has the name of common data and the status of register allocation for that common data as information. When link editing a program using , the assignment that has the correspondence between logical addresses and registers on virtual memory as information generates a state table. When storing the logical address value in the memory, the allocation includes register storage means for storing the logical address value in a register using a state table.

〔実施例〕〔Example〕

以下、本発明につき図面をに基づいて説明する。 Hereinafter, the present invention will be explained based on the drawings.

第1図は、本発明の一実施例を示すブロック構造図であ
る。本実施例は、コンパイラの構成要素として起動され
るアクセス管理手段11、コンパイラの構成要素として
起動され′るレジスタ割付は手段12、連係編集時に起
動される割付は状態情報生成手段13およびレジスタ格
納手段14並びに、アクセス管理テーブル60、レジス
タ割付はテーブル70、割付は状態テーブル80翻訳単
位ファイル90、実行可能プログラムファイル100、
実行メモリ110から構成される。実線矢印は起動関係
を示し、破線矢印はテーブルの設定および参照関係を示
し、太線矢印はデータの流れを示す。
FIG. 1 is a block diagram showing an embodiment of the present invention. In this embodiment, access management means 11 is activated as a compiler component, register allocation means 12 is activated as a compiler component, state information generation means 13 and register storage means are activated during linked editing. 14, an access management table 60, a register allocation table 70, an allocation status table 80, a translation unit file 90, an executable program file 100,
It consists of an execution memory 110. Solid line arrows indicate activation relationships, broken line arrows indicate table settings and reference relationships, and thick line arrows indicate data flow.

第2図は、アクセス管理手段11の内部構成を示すブロ
ック構成図である。アクセス管理手段11は、共通デー
タ識別手段21、テーブル展開手段22、参−照回数計
測手段23により構成される。実線矢印は、起動関係を
示し、破線矢印はテーブルの設定および参照関係を示す
FIG. 2 is a block configuration diagram showing the internal configuration of the access management means 11. The access management means 11 includes a common data identification means 21, a table development means 22, and a reference count measurement means 23. Solid line arrows indicate activation relationships, and dashed line arrows indicate table settings and reference relationships.

第1表は、共通データの名称と、共通データの参照回数
と、共通データの参照区間とを情報として待つアクセス
管理テーブル60の構成例である。各要素は、 各々共通データに対応する。
Table 1 is a configuration example of the access management table 60 that waits for information such as the name of common data, the number of times the common data is referenced, and the reference section of the common data. Each element corresponds to common data.

第  1  表 項目1−1は共通データの名称で・あり、項目12は共
通データの参照回数であり、項目1−3は最初の参照が
現れた位置であり、項目1−4は最後の参照が現れた位
置である。
Table 1 Item 1-1 is the name of the common data, Item 12 is the number of references to the common data, Item 1-3 is the position where the first reference appears, and Item 1-4 is the last reference. This is the position where it appeared.

第3図は、レジスタ割付は手段12の内部構成を示すブ
ロック構成図である。実線矢印は起動関係を示し、点線
矢印はテーブルの設定および参照関係を示す、レジスタ
割付は手段12、レジスタ確保/解放手段31、使用可
能レジスタ識別手段32機械語命令カウント手段33に
より構成される。
FIG. 3 is a block diagram showing the internal structure of the register allocation means 12. As shown in FIG. Solid line arrows indicate activation relationships, dotted line arrows indicate table setting and reference relationships, and register allocation is comprised of means 12, register securing/releasing means 31, available register identifying means 32, and machine language instruction counting means 33.

第2表は、レジスタの割付は状態を示すレジスタ割付は
テーブル70の構成例である。
Table 2 is a configuration example of the register allocation table 70 in which the register allocation indicates the status.

第  2  表 項目1−1は共通データの名称であり、項目1−2はレ
ジスタを表す数値であり、項目1−3はレジスタが割付
けられるべき機械語命令中の最初の位置であり、項目1
−4はレジスタが割付けられるべき機械語命令中の最後
の位置である。
Item 1-1 in Table 2 is the name of common data, item 1-2 is a numerical value representing the register, item 1-3 is the first position in the machine language instruction to which the register is to be allocated, and item 1-2 is the name of the common data.
-4 is the last position in the machine language instruction where a register is to be allocated.

第4図は、割付は状態情報生成手段13の内部構成を示
すブロック構成図である。実線矢印は起動関係を示し、
破線矢印はテーブルの設定および参照関係を示す。割付
は状態情報生成手段13は、翻訳単位識別手段41と、
再配置手段42により構成される。
FIG. 4 is a block diagram showing the internal configuration of the state information generating means 13. As shown in FIG. Solid arrows indicate activation relationships;
Dashed arrows indicate table settings and reference relationships. As for the layout, the status information generation means 13, the translation unit identification means 41,
It is constituted by relocation means 42.

第3表は、割付は状態テーブル80の構成例である8項
目2−1は、共通データの再配置後の論理アドレスであ
り、項目2−2は項目2−1で表される共通データを割
付けるべきレジスタを表す数値であり、項目2−3はレ
ジスタが割付けられるべき機械語命令中の再配置後の最
初の論理アドレスであり、項目2−4はレジスタが割付
けられるべき機械語命令中の再配置後の最後の論理アド
レスである。また、要素1は翻訳単位の名称である。
Table 3 shows an example of the layout of the state table 80. Item 2-1 is the logical address after relocation of the common data, and item 2-2 is the common data represented by item 2-1. It is a numerical value representing the register to be allocated, item 2-3 is the first logical address after relocation in the machine language instruction to which the register is to be allocated, and item 2-4 is the first logical address in the machine language instruction to which the register is to be allocated. is the last logical address after relocation. Furthermore, element 1 is the name of the translation unit.

(以下余白) 第  3  表 第5図は、レジスタ格納手段14の内部構成を示すブロ
ック構成図である。レジスタ格納手段は、実行プログラ
ム認識手段51、レジスタ値設定手段52により構成さ
れる。実線矢印は起動関係を示し、破線矢印はデータの
設定関係を示す。
(The following is a blank space) Table 3 FIG. 5 is a block configuration diagram showing the internal configuration of the register storage means 14. The register storage means is composed of an execution program recognition means 51 and a register value setting means 52. Solid line arrows indicate activation relationships, and broken line arrows indicate data setting relationships.

さて、アクセス管理手段11は、コンパイラが翻訳中に
参照されているデータを検出した際に、共通データ認識
手段21を起動する。共通データ認識手段21は、翻訳
中のプログラムのデータが共通データであるか否かを判
定し、共通データでないなら何もしない、共通データで
あるなら以下の処理を行う。
Now, the access management means 11 activates the common data recognition means 21 when the compiler detects data referred to during translation. The common data recognition means 21 determines whether the data of the program being translated is common data or not. If it is not common data, it does nothing; if it is common data, it performs the following processing.

初めて出現した名称のデータであるならば、テーブルR
開学段23を起動して、第1表で示すアクセス管理テー
ブル60の要素のうち項目1−1の名称が未設定の要素
をみつけ出して、名称を格納するとともに、項目1−3
に出現した行番号を格納し、かつ項目1−4にも項目1
−2に格納した行番号を格納する。また項目1−2には
、参照回数を示す値1を格納する。また、共通データ名
称が、既にアクセス管理テーブル60の項目1−1に格
納されているならば、参照回数計測手段22を起動して
項目1−2に値1を加算して格納し、項目1−4にその
共通データの出現した行番号を格納する。
If the data is for a name that appears for the first time, Table R
Activate the opening stage 23, find the element for which the name of item 1-1 is not set among the elements of the access management table 60 shown in Table 1, store the name, and store the name of item 1-3.
Stores the line number that appears in , and also stores the line number that appears in item 1-4.
Store the line number stored in -2. Further, item 1-2 stores a value 1 indicating the number of references. Further, if the common data name is already stored in item 1-1 of the access management table 60, the reference count measuring means 22 is activated, the value 1 is added to item 1-2, and the value is stored. -4 stores the line number where the common data appears.

レジスタ割付は手段12は、コンパイラの機械語命令生
成過程で起動され、常に機械語命令カウント手段33を
起動して、生成した機械語命令の大きさをカウントし、
共通データを参照すべき機械語の生成においてはその共
通データが第1表で示すアクセス管理テーブル60の項
目1−1に格納されているものである場合に、使用可能
レジスタ識別手段32を起動して使用可能なレジスタを
取り出し、第2表で示すレジスタ割付はテーブルから項
目1−1に格納されている名称を探して一致する名称が
無い場合、項目1−1に共通データの名称を格納し、項
目1−2に使用可能レジスタ確保手段32によって取り
出したレジスタを示す値を格納する。
The register allocation means 12 is activated during the machine language instruction generation process of the compiler, and always activates the machine language instruction counting means 33 to count the size of the generated machine language instructions.
When generating machine language that refers to common data, if the common data is stored in item 1-1 of the access management table 60 shown in Table 1, the usable register identifying means 32 is activated. The register allocation shown in Table 2 searches the table for the name stored in item 1-1, and if there is no matching name, stores the name of the common data in item 1-1. , a value indicating the register taken out by the usable register securing means 32 is stored in item 1-2.

また、項目1−3および項目1−4にはともに、機械語
命令カウント手段33によって得られた機械語命令の大
きさを格納する。一致する名称がある場合には、その要
素の項目1−4に、機構語命令カウント手段33によっ
て得られた機械語命令の大きさを格納する0以上の処理
の後、使用可能レジスタ識別手段32によって取り出さ
れたレジスタを使用して共通データを参照する機械語命
令を生成し、かつ、このとき使用されたレジスタを使用
不可状態としておく。
Furthermore, the size of the machine language instruction obtained by the machine language instruction counting means 33 is stored in both item 1-3 and item 1-4. If there is a matching name, the size of the machine language instruction obtained by the machine language instruction counting means 33 is stored in the item 1-4 of that element. After 0 or more processing, the usable register identifying means 32 A machine language instruction that refers to the common data is generated using the register retrieved by , and the register used at this time is made unusable.

使用可能レジスタ識別手段32によって、使用可能レジ
スタを取り出すことが出来ない場合共通データの参照は
、メモリからアドレスを得るような機械語を生成する。
When an available register cannot be retrieved by the available register identifying means 32, a reference to common data generates a machine code for obtaining an address from memory.

連係編集プログラムから起動される割り付は状態情報生
成手段13は、翻訳単位識別手段41を起動し、入力さ
れた翻訳単位の名称を識別して、第3表で示す割付は状
態テーブル80の項目1に格納する。また再配置手段4
2は、第2表に示すレジスタ割付はテーブル70の各要
素の項目1−3及び項目1−4で表される論理アドレス
を、連係編集処理において再配置された機械語命令の再
配置後の論理アドレスに変換して、第3表に示す割付は
状態テーブル80の項目2−3及び項目2−4にそれぞ
れ格納する。また、項目2−1には第2表に示すレジス
タ割付はテーブル70の各要素の項目1−1で表される
共通データの再配置後の論理アドレスを格納し、項目2
−2には、第2表に示すレジスタ割付はテーブル70の
項目1−2で表されるレジスタを表す数値を格納する。
The status information generation means 13 activates the translation unit identification means 41 to identify the name of the input translation unit, and the layout shown in Table 3 is determined as an item in the status table 80. Store in 1. Also, the relocation means 4
2, the register allocation shown in Table 2 is based on the logical addresses represented by items 1-3 and 1-4 of each element in the table 70 after the relocation of the machine language instructions rearranged in the linked editing process. The layouts shown in Table 3 are converted into logical addresses and stored in items 2-3 and 2-4 of the status table 80, respectively. In addition, in item 2-1, the register allocation shown in Table 2 stores the logical address after relocation of the common data represented by item 1-1 of each element in the table 70, and in item 2-1,
-2 stores a numerical value representing the register indicated by item 1-2 of table 70 in the register allocation shown in Table 2.

レジスタ格納手段14は、連係編集後の実行可能形式プ
ログラムを実行のためにメモリに格納する際に、実行プ
ログラム認識手段51及びレジスタ値設定手段52を起
動し、第3表で示す割付は状態テーブル80の要素1か
ら翻訳単位の名称を取り出し、その翻訳単位に実行制御
が移行する時に、要素2から要素nの項目2−2で示さ
れるレジスタに、各々の要素の項目2−1で示される共
通データのアドレスを格納し、実行させる。
The register storage means 14 activates the execution program recognition means 51 and the register value setting means 52 when storing the linked-edited executable format program in the memory for execution, and the allocation shown in Table 3 is based on the status table. 80, the name of the translation unit is extracted from element 1, and when execution control is transferred to that translation unit, the name of the translation unit is stored in the register indicated by item 2-2 of elements 2 to n, as indicated by item 2-1 of each element. Stores the address of common data and executes it.

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

本発明は、以上説明したように、共通データのアドレス
を特定のレジスタに固定的に割付け、かつ、レジスタの
内容を実行に先立って設定しておくことにより実行速度
を向上させ、また翻訳単位の大きさを減少させることが
できる効果がある。
As explained above, the present invention improves the execution speed by fixedly assigning the address of common data to a specific register and setting the contents of the register before execution. It has the effect of reducing the size.

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

第1図は本発明の一実施例を示すブロック構成図、第2
図はアクセス管理手段の内部構成を示すブロック構成図
、第3図はレジスタ割付は手段の内部構成を示すブロッ
ク構成図、第4図は割付は状態情報生成手段の内部構成
を示すブロック構成図、第5図はレジスタ格納手段の内
部構成を示すブロック構成図である。 11・・・アクセス管理手段、12・・・レジスタ割付
は手段、13・・・割付は情報生成手段、14・・・レ
ジスタ格納手段、21・・・共通データ識別手段、22
・・・参照回数計測手段、23・・・テーブル展開手段
、31・・・レジスタ確保/解放手段、32・・・使用
可能レジスタ識別手段、33・・・機械語命令カウント
手段、41・・・翻訳単位識別手段、42・・・再配置
手段、60・・・アクセス管理テーブル、70・・・レ
ジスタ割付はテーブル、80・・・割付は状態テーブル
、90・・・翻訳単位ファイル、100・・・実行可能
プログラムファイル、110・・・実行メモリ。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG.
3 is a block diagram showing the internal configuration of the access management means; FIG. 3 is a block diagram showing the internal configuration of the register allocation means; FIG. 4 is a block diagram showing the internal configuration of the state information generation means; FIG. 5 is a block configuration diagram showing the internal configuration of the register storage means. 11... Access management means, 12... Register allocation means, 13... Allocation information generation means, 14... Register storage means, 21... Common data identification means, 22
. . . Reference count measuring means, 23 . . . Table development means, 31 . . . Register securing/releasing means, 32 . Translation unit identification means, 42... Relocation means, 60... Access management table, 70... Register allocation table, 80... Allocation status table, 90... Translation unit file, 100... - Executable program file, 110... execution memory.

Claims (1)

【特許請求の範囲】  縮小命令セットコンピュータ上で動作するプログラム
の共通データのアクセス回数をプログラムの翻訳時に計
測するためのアクセス管理手段(11)と、 アクセス回数と共通データの名称とを情報として持つア
クセス管理テーブルを使用して共通データのレジスタへ
の割付けをプログラの翻訳時に制御するレジスタ割付け
手段(12)と、 共通データの名称とその共通データに対するレジスタの
割付け状態とを情報として持つレジスタ割付けテーブル
を使用してプログラムの連係編集時に仮想メモリ上の論
理アドレスとレジスタの対応を情報として持つ割付け状
態テーブルを生成する割付け状態情報生成手段(13)
と、 連係編集後の実行可能プログラムを実行に先立つてメモ
リに格納する際に割付け状態テーブルを使用して上記論
理アドレス値をレジスタに格納するレジスタ格納手段(
14)とを含むことを特徴とする縮小命令セットコンピ
ュータにおける共通データアクセス方式。
[Scope of Claims] Access management means (11) for measuring the number of accesses to common data of a program running on a reduced instruction set computer at the time of program translation, and having the number of accesses and the name of the common data as information. A register allocation means (12) that uses an access management table to control the allocation of common data to registers at the time of program translation; and a register allocation table that has as information the name of common data and the allocation status of registers to the common data. Allocation status information generation means (13) for generating an allocation status table having the correspondence between logical addresses on virtual memory and registers as information during linked editing of a program using
and register storage means (which stores the logical address value in the register using the allocation state table when storing the linked-edited executable program in the memory prior to execution).
14) A common data access method in a reduced instruction set computer.
JP26138990A 1990-09-28 1990-09-28 Common data accessing system in contracted instruction setting computer Pending JPH04138528A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26138990A JPH04138528A (en) 1990-09-28 1990-09-28 Common data accessing system in contracted instruction setting computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26138990A JPH04138528A (en) 1990-09-28 1990-09-28 Common data accessing system in contracted instruction setting computer

Publications (1)

Publication Number Publication Date
JPH04138528A true JPH04138528A (en) 1992-05-13

Family

ID=17361180

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26138990A Pending JPH04138528A (en) 1990-09-28 1990-09-28 Common data accessing system in contracted instruction setting computer

Country Status (1)

Country Link
JP (1) JPH04138528A (en)

Similar Documents

Publication Publication Date Title
US5088031A (en) Virtual machine file control system which translates block numbers into virtual addresses then into real addresses for accessing main storage
EP0777177A1 (en) A method for object-oriented programming using dynamic interfaces
JPH0687222B2 (en) Intercommunication system and method between application and database management system
JPH01142829A (en) Detection of control information in control program
JP2000347876A (en) Method and device for stack slot allocation
US5062039A (en) Sharing of workspaces in interactive processing using workspace name tables for linking of workspaces
JPH0340868B2 (en)
JPH04138528A (en) Common data accessing system in contracted instruction setting computer
JP3085309B2 (en) Debug system
JP2612173B2 (en) Virtual computer
JPS6234240A (en) Data allotting system
JPH02140825A (en) Method for processing rearrangement of program
JPS5918787B2 (en) TLB partition method
JPH10133872A (en) Processor equipment having command buffer
JPS61148536A (en) Information processing system
JPS6234258A (en) Control system for expanded memory
JPH02217946A (en) Method of accessing file
JPH1027153A (en) Bus transfer device
JPH0465714A (en) Load module control system for computer system
JPH0325533A (en) Microprocessor
JPH04113432A (en) Virtual storage control method
JPH03250236A (en) Command execution control system
JPH02287875A (en) Filing system in computer system
JPH04280324A (en) Storage management device
JPS62221038A (en) Program executing system