JP2004348759A - Information processing system corresponding to multiple model, and its method - Google Patents

Information processing system corresponding to multiple model, and its method Download PDF

Info

Publication number
JP2004348759A
JP2004348759A JP2004212457A JP2004212457A JP2004348759A JP 2004348759 A JP2004348759 A JP 2004348759A JP 2004212457 A JP2004212457 A JP 2004212457A JP 2004212457 A JP2004212457 A JP 2004212457A JP 2004348759 A JP2004348759 A JP 2004348759A
Authority
JP
Japan
Prior art keywords
program
register
abstract
instruction
machine
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
JP2004212457A
Other languages
Japanese (ja)
Inventor
Shinobu Koizumi
忍 小泉
Ichiro Kushima
伊知郎 久島
Hiroshi Watanabe
坦 渡辺
Toshiaki Jinno
俊昭 神野
Nobuyoshi Doumen
信義 堂免
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 JP2004212457A priority Critical patent/JP2004348759A/en
Publication of JP2004348759A publication Critical patent/JP2004348759A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an object program format capable of realizing execution performance equivalent to a model-specific object program and common for a plurality of models of computers, and to provide a machine language program creation method therefrom, in relation to a translation method from a source program to a machine language program in an electronic computer. <P>SOLUTION: A compiler 1001 translates a source program 1004 into an abstract object program (ArmCode) 1005 including an instruction word line of an abstract computer ARM having a plurality of registers, and an allocation direction of abstract registers. An installer 1015 converts an ArmCode 1009 into a machine language program 1011 of an execution computer 1012 based on specification information 1010 of the execution computer 1012 comprising a register use direction 1019, and a machine instruction selection rule 1020. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

電子計算機における、ソースプログラムから機械語プログラムへの翻訳方式であって、複数機種の計算機に共通の中間形式(オブジェクトプログラム)を用いる方式に関する。
The present invention relates to a method of translating a source program into a machine language program in an electronic computer, which uses an intermediate format (object program) common to a plurality of types of computers.

高級言語で記述されたプログラムを計算機上で実行する方法を大別すると、一般に、コンパイラ方式、インタプリタ方式と呼ぶ、以下の2つに分けられる。
(コンパイラ方式)高級言語で記述されたプログラムを、実行すべき計算機の機械語プログラムに変換した上で、変換後の機械語プログラムを直接実行する。
(インタプリタ方式)実行する計算機の機械語とは別の言語(中間語)を設定し、実行すべき計算機上で中間語を解釈実行する別のプログラム(インタプリタ)を予め用意しておく。高級言語で記述されたプログラムを中間語プログラムに変換し、変換後の中間語プログラムをインタプリタを用いて実行する。
A method of executing a program described in a high-level language on a computer can be roughly classified into the following two methods, generally called a compiler method and an interpreter method.
(Compiler method) After converting a program described in a high-level language into a machine language program of a computer to be executed, the converted machine language program is directly executed.
(Interpreter method) A language (intermediate language) different from the machine language of the computer to be executed is set, and another program (interpreter) for interpreting and executing the intermediate language on the computer to be executed is prepared in advance. A program described in a high-level language is converted into an intermediate language program, and the converted intermediate language program is executed using an interpreter.

インタプリタ方式に対するコンパイラ方式の利点は、以下の理由によるプログラム実行の高速性にある。
(1)インタプリタ方式では、中間語に相当する機械語の実行以外に、各中間語に対応する処理への振り分けやオペランドのアドレス計算等が必要である。
The advantage of the compiler system over the interpreter system is the high speed of program execution for the following reasons.
(1) In the interpreter system, in addition to execution of a machine language corresponding to an intermediate language, it is necessary to distribute to a process corresponding to each intermediate language, calculate an address of an operand, and the like.

一方コンパイラ方式では直接に機械語を実行するので、これらが不要である。
(2)コンパイラ方式ではプログラムの文脈と実行する計算機の特性とを考慮した処理の省略(最適化)が可能である。一方、インタプリタ方式では、インタプリタ自身は中間語プログラムに対して汎用性を持つので、インタプリタは中間語プログラムをそのまま実行するのみで、プログラムの文脈を考慮した処理の省略ができない。また、中間語プログラムにも実行する計算機の特性が反映されていないので、例えば、高級言語で記述された特定の変数を目標計算機のレジスタにマッピングし、処理の高速化を図ることも不可能である。
On the other hand, since the machine language is directly executed in the compiler system, these are unnecessary.
(2) In the compiler system, it is possible to omit (optimize) processing in consideration of the context of the program and the characteristics of the computer to be executed. On the other hand, in the interpreter method, since the interpreter itself has versatility with respect to the intermediate language program, the interpreter only executes the intermediate language program as it is, and cannot omit processing in consideration of the context of the program. In addition, since the characteristics of the computer to be executed are not reflected in the intermediate language program, it is impossible to map a specific variable described in a high-level language to a register of the target computer, thereby increasing the processing speed. is there.

一つのプログラムを繰返し実行する際のプログラムの運用形態という視点から見ると、従来の方法では、
(運用方法1)コンパイラ方式を採用し、変換後の機械語プログラムを保存し繰返し直接実行する。
(運用方法2)インタプリタ方式を採用し、中間語プログラムを保存しインタプリタによって繰返し実行する。
のいずれかであった。
From the viewpoint of the operation form of a program when one program is repeatedly executed, in the conventional method,
(Operation method 1) The compiler method is adopted, and the machine language program after conversion is stored and directly executed repeatedly.
(Operation method 2) An interpreter method is adopted, an intermediate language program is stored and repeatedly executed by the interpreter.
Was either.

一つのプログラムを繰返し実行する場合には、それぞれの実行時間の短縮という観点からコンパイラ方式を採用する場合が圧倒的に多いが、以下のようなデメリットも生じている。
(デメリット1)ソースプログラムを機械語プログラムに変換するコンパイラが機種ごとに必要であり、コンパイラの開発量が大きくなる他、保守や拡張をそれぞれの機種に対応のして行なう必要があり、保守・拡張のオーバヘッドが大きくなる。
(デメリット2)同一プログラムを複数機種で実行する場合、機種ごとにコンパイル(ソースプログラムから機械語プログラムへの変換)が必要であり、機械語プログラムの管理のオーバヘッドが大きい。
(デメリット3)複数機種がネットワークで接続されている環境において、同一のプログラムに対する機械語プログラムが機種対応に複数必要となり、バージョン管理やディスクスペースに問題があるほか、同一プログラムの分散実行が困難である。
(デメリット4)実際に運用されているシステムのなかには、ソースプログラムがなく、機械語プログラムのみで運用されている場合がある。このようなシステムでは、構成機種の移行・変更が困難である。また、ハードウェア技術の進歩により計算機アーキテクチャの高度化が容易となっているが、機械語プログラム財産の継承のため、アーキテクチャの変更に強い制限が課せられしまう。
When one program is repeatedly executed, the compiler method is overwhelmingly adopted from the viewpoint of shortening the execution time of each program, but the following disadvantages also occur.
(Disadvantage 1) A compiler that converts a source program into a machine language program is required for each model, which increases the amount of compiler development and requires maintenance and expansion to be performed for each model. The overhead of expansion is large.
(Demerit 2) When the same program is executed by a plurality of models, compilation (conversion from a source program to a machine language program) is required for each model, and the overhead of managing the machine language program is large.
(Disadvantage 3) In an environment where multiple models are connected via a network, multiple machine language programs for the same program are required for each model, and there are problems with version management and disk space, and it is difficult to execute the same program in a distributed manner. is there.
(Disadvantage 4) In some systems actually operated, there is no source program, and only a machine language program is used. In such a system, it is difficult to transfer or change the constituent models. Although the advancement of hardware technology has facilitated the advancement of computer architectures, the inheritance of machine language programs imposes strong restrictions on architecture changes.

上記でデメリットを解消するためには、保存運用の形態としては特定の計算機に依存しない中間語プログラムを採用し、中間語プログラムを実行するに際して高速化のために目標計算機の機械語プログラムに変換するという、コンパイラ方式とインタプリタ方式のそれぞれの利点のみを採った方式を採用すればよい。しかし、現在のところ、そのような方式を採用した具体的なシステムは見当らない。   In order to eliminate the disadvantages described above, an intermediate language program that does not depend on a specific computer is adopted as a storage operation form, and the intermediate language program is converted into a machine language program of the target computer for high speed execution. That is, a method that only takes advantage of each of the compiler method and the interpreter method may be adopted. However, at present, there is no concrete system adopting such a method.

なお、コンパイラ方式並びにインタプリタ方式に関しては、非特許文献1に詳しい。
The compiler method and the interpreter method are described in detail in Non-Patent Document 1.

" A.Aho, R.Seti, and J.Ullman: Compilers. pronciples,Techniques and Tools, Addison-Wesly 1986 ""A. Aho, R. Seti, and J. Ullman: Compilers. Pronciples, Techniques and Tools, Addison-Wesly 1986"

特定の計算機に依存しない中間語プログラムを、繰返し実行するプログラムの保存運用形態として採用するためには、実行速度が従来のコンパイル方式による機械語プログラムと同等のレベルになることが必要である。   In order to use an intermediate language program that does not depend on a specific computer as a storage and operation mode of a program to be repeatedly executed, it is necessary that the execution speed is at a level equivalent to that of a machine language program using a conventional compilation method.

即ち、上記を実現するためには、
(1)保存運用形態の中間語プログラムをインタプリタによって実行するのではなく、実行の直前において機械語プログラムに変換し実行すること
(2)上記機械語プログラムへの変換において、実行すべき計算機の特性を考慮した最適化を実施することが不可欠である。
That is, in order to realize the above,
(1) The intermediate language program in the storage operation mode is not executed by the interpreter, but is converted into a machine language program and executed immediately before execution. (2) In the conversion into the machine language program, characteristics of a computer to be executed It is indispensable to carry out optimization in consideration of

本発明の課題は、上記を実現するシステム全体を与えること、即ち、保存運用のための中間語の具体的な形式を与え、それを実行開始時点で機械語プログラムに変換し最適化を実施する具体的な方法を設定することにある。   An object of the present invention is to provide an entire system for realizing the above, that is, to provide a specific format of an intermediate language for storage operation, convert it into a machine language program at the start of execution, and perform optimization. The point is to set a specific method.

さて、インタプリタ方式用に設計された中間語は、以下の理由により上記を実現するための中間語として利用することができない。
(1)インタプリタ方式のための中間語形式には、インタプリタによる最適化を前提としていないので、機械語プログラムに変換する際に実施すべき最適化に必要な情報を含んでいない。
(2)計算機は、有限個のレジスタを備えレジスタ上での演算を主体としたレジスタマシンと、演算スタックを備えスタック上での演算を主体にしたスタックマシンに大別できる。現状では、世の中に実存する計算機の大半はレジスタマシンである。インタプリタ方式の中間語では、中間語およびインタプリタ設計の容易さから、スタック上の演算を想定したものが多い。スタック上の演算をレジスタ間の演算に変換することは不可能ではないが、スタック上の値は使い捨てを想定したものであり、一方レジスタを効率的に活用するためには、レジスタ上の値をできるだけ繰返し利用することが必要である。即ち、スタックマシン的な中間語プログラムからレジスタマシンの効率的な機械語プログラムに変換することは非常に困難な部分がある。
The intermediate language designed for the interpreter system cannot be used as an intermediate language for realizing the above for the following reasons.
(1) Since the intermediate language format for the interpreter system does not assume the optimization by the interpreter, it does not include information necessary for the optimization to be performed when converting into a machine language program.
(2) Computers can be broadly classified into register machines having a finite number of registers and mainly performing operations on registers, and stack machines having an operation stack and mainly performing operations on stacks. At present, most of the computers that exist in the world are register machines. Many interpreted intermediate languages assume operations on the stack because of the ease of designing the intermediate language and the interpreter. It is not impossible to convert operations on the stack to operations between registers, but values on the stack are intended to be disposable. It is necessary to use it as repeatedly as possible. That is, it is very difficult to convert an intermediate language program like a stack machine into an efficient machine language program of a register machine.

従って、特定の計算機に依存しない中間語プログラムを保存運用形態とし実行直前に機械語プログラムに変換する方式では、以下の要件を満たすことが必要である。
(1)目標計算機として、レジスタマシンに重点を置き、中間語プログラムレベルでレジスタの存在を意識したプログラムのシーケンスとなっていること。また、中間語プログラムまでの変換時点で、実施可能な最適化が実施されていること。
(2)機械語プログラムへの変換時にレジスタの利用方法の最適化が実施可能であること。即ち、レジスタへの値のロード、レジスタからの値のストアの各命令の発行回数を最小化するように、レジスタの利用を決定し、それら命令が不要ならば削除できること。また、それら最適化に必要な情報を中間語プログラムから得られること。
(3)目標計算機に特有の命令によって、中間語プログラムの特定のシーケンス(複数命令)を代替できることがある。このような場合、一般に、機械語1命令で実現した方が効率的である。中間語複数命令に対応する機械語命令が目標計算機に存在するならば、それを利用した機械語プログラムを生成できること。
Therefore, in a method in which an intermediate language program that does not depend on a specific computer is stored and operated and converted into a machine language program immediately before execution, the following requirements must be satisfied.
(1) As a target computer, a program sequence should be focused on a register machine, and the sequence of the program should be conscious of the existence of a register at an intermediate language program level. Also, at the time of conversion to the intermediate language program, feasible optimization has been implemented.
(2) It is possible to optimize the method of using registers when converting to a machine language program. That is, the use of registers is determined so as to minimize the number of issuance of each instruction of loading values into registers and storing values from registers, and the instructions can be deleted if unnecessary. In addition, the information necessary for these optimizations must be obtained from the intermediate language program.
(3) A specific sequence (multiple instructions) of the intermediate language program may be replaced by an instruction specific to the target computer. In such a case, it is generally more efficient to implement the processing using one machine language instruction. If the target computer has a machine language instruction corresponding to a plurality of intermediate language instructions, it must be able to generate a machine language program using it.

なお、以下では、保存運用の形式の(中間語)プログラムを、従来のコンパイラ方式に習って、オブジェクトプログラムと呼ぶ。
In the following, a program in a storage operation format (intermediate language) will be referred to as an object program, following a conventional compiler method.

1.システムの構成
本発明では、ソースプログラムを実行計算機の機械語プログラムに変換するシステムを、次の3つのサブシステムにより構成する。
(1)コンパイラ:ソースプログラムから、目標計算機の機種に依存しない形式のオブジェクトプログラム(抽象オブジェクトプログラム)を生成するサブシステム
(2)リンカ:コンパイラにより生成された複数の抽象オブジェクトプログラムを、一つの抽象オブジェクトプログラムに結合するサブシステム
(3)インストーラ:リンカにより結合された抽象オブジェクトプログラムを、実行計算機の機械語プログラムに変換するサブシステム。
2.オブジェクトプログラムの形式
オブジェクトプログラムを共通化するため、本発明では、複数のレジスタを持つ抽象計算機(Abstruct Register Machine、以下ARMと呼ぶ)を設定し、その命令列を共通のオブジェクトプログラム(以下、抽象オブジェクトプログラムと呼ぶ)の基本部分として利用する。
1. System Configuration In the present invention, a system for converting a source program into a machine language program of an execution computer is configured by the following three subsystems.
(1) Compiler: A subsystem that generates an object program (abstract object program) in a format independent of the model of the target computer from a source program. (2) Linker: A plurality of abstract object programs generated by a compiler are converted into one abstract. Subsystem for linking to an object program (3) Installer: A subsystem for converting an abstract object program linked by a linker into a machine language program of an execution computer.
2. Format of Object Program In order to standardize the object program, in the present invention, an abstract computer (Abstruct Register Machine, hereinafter referred to as ARM) having a plurality of registers is set, and the instruction sequence is set to a common object program (hereinafter, abstract object). (Called a program).

ARMの特徴は以下の通りである。
(1)複数の抽象レジスタを持つ。(レジスタ数は、概念上無限であるが、実用上は抽象オブジェクトプログラムの形式により制限される)
(2)命令機能として、レジスタ−メモリ間のデータ転送、レジスタ上の演算(四則演算、論理演算、シフト演算、比較)、実行制御(無条件分岐、条件分岐、副プログラム呼び出し/復帰)を持つ。
(3)メモリアドレスは、数値ではなく、記号名称で表現される。
The features of ARM are as follows.
(1) It has a plurality of abstract registers. (The number of registers is conceptually infinite, but practically limited by the format of the abstract object program.)
(2) Instruction functions include register-memory data transfer, register operations (four arithmetic operations, logical operations, shift operations, comparisons), and execution control (unconditional branch, conditional branch, subprogram call / return) .
(3) The memory address is represented by a symbolic name, not a numerical value.

ここで、レジスタを持つ抽象計算機の命令列をオブジェクトプログラムの基本部分とした理由は、以下の通りである。
(理由1)オブジェクトプログラムから個々の実行計算機の機械語プログラムへの変換を高速にするには、オブジェクトプログラムと機械語プログラムの意味的ギャップをできるだけ小さくすることが望ましい。現在広く用いられている計算機は、複数個のレジスタを持つレジスタマシンであり、一般のレジスタマシンの持つ命令セットの意味的な共通部分を命令セットとして持つARMを設定することで、意味変換のオーバヘッドをなくし機械語プログラムへの変換を高速にする。
(理由2)レジスタマシンにおいて、機械語プログラムの実行の高速化の鍵の一つは、レジスタの有効利用である。ARMをコンパイラの目標計算機とすることにより、コンパイラはレジスタを最大限に利用した命令列を生成することができる。
Here, the reason why the instruction sequence of the abstract computer having the register is used as the basic part of the object program is as follows.
(Reason 1) In order to speed up the conversion from the object program to the machine language program of each execution computer, it is desirable to minimize the semantic gap between the object program and the machine language program. A computer widely used at present is a register machine having a plurality of registers. By setting an ARM having an instruction set having a semantic common part of an instruction set of a general register machine, overhead of semantic conversion is set. And speed up conversion to machine language programs.
(Reason 2) In a register machine, one of the keys to speeding up execution of a machine language program is effective use of registers. By using ARM as the target computer of the compiler, the compiler can generate an instruction sequence that makes full use of registers.

また、抽象オブジェクトプログラムは次のものにより構成する。
(a)ARMの命令語列
(b)擬似コード(ラベル(分岐、入口、変数、定数)定義、最適化のための埋め込み情報、ソースレベルデバッグのための埋め込み情報)
(c)生成制御指示子(抽象レジスタの割当て/解放の指示、抽象レジスタの割当て状態によるARM命令語列の選択)
(d)ソースレベルデバッグのための変数名、及び、手続き名の辞書
抽象レジスタに対しては、生成制御指示子によりレジスタの種別を指定するが、具体的な計算機でそれが何に対応するかまでは指定しない。このようにすることにより、抽象オブジェクトプログラムの中で、レジスタを機種に依存しない形で表面化する。
3.実行計算機仕様
抽象オブジェクトプログラムから実行計算機の機械語プログラムを生成するために次の2つをインストーラに設定する。
(i)実行計算機のレジスタ用途指定(使用可能なレジスタの種別と数)
(ii)ARMの命令語列パターンから実行計算機命令語列パターンへの変換規則
なお、上記において、ARMの命令語列パターンと実行計算機の命令語列パターンは、それぞれ、複数個の命令から構成される。
The abstract object program is composed of the following.
(A) ARM instruction string (b) Pseudo code (label (branch, entry, variable, constant) definition, embedded information for optimization, embedded information for source level debugging)
(C) Generation control indicator (instruction of allocation / release of abstract register, selection of ARM instruction string based on allocation status of abstract register)
(D) Dictionary of variable names and procedure names for source-level debugging For abstract registers, the type of register is specified by a generation control indicator. What does it correspond to in a specific computer? Do not specify until. By doing so, the registers in the abstract object program are surfaced in a form independent of the machine type.
3. Execution Computer Specification The following two are set in the installer to generate a machine language program of the execution computer from the abstract object program.
(I) Specifying register use of execution computer (type and number of usable registers)
(Ii) Conversion rule from ARM instruction string pattern to execution computer instruction string pattern In the above description, the ARM instruction string pattern and the execution computer instruction string pattern are each composed of a plurality of instructions. You.

ここで、ARM命令と実行計算機の命令とを1対1に対応させない理由は以下による。
(理由1)ARMの命令セットは、実際のマシンの命令セットの厳密な意味での共通部分ではない。従って、実行計算機の命令中にARMの対応命令が存在しないことがある。この場合、1ARM命令を、実行計算機の数命令で実現する必要がある。
(理由2)上記とは逆に、ARMの数命令の命令列に対応する命令を実行計算機が備えている場合がある。(例:レジスタ−メモリ演算命令等)一般に、実行計算機の命令数を減らしたほうが実行速度が向上するため、このような場合は1命令で実現する。
4.抽象オブジェクトプログラムから実行計算機の機械語プログラムへの変換方法
インストーラは、ARMの抽象レジスタと実行計算機の実レジスタとの対応を管理するテーブル(以下、レジスタ管理テーブル)を持ち、以下の様に動作する。
(1)抽象オブジェクトプログラム中の抽象レジスタ割当て指示により、抽象レジスタと実レジスタの対応付けを試みる。実行計算機仕様のレジスタ用途指定に記述された範囲で、他の抽象レジスタと対応していない実レジスタ、即ち、空いていないレジスタが存在すれば、当該実レジスタと指示された抽象レジスタとを対応させる。
(2)抽象オブジェクトプログラム中のレジスタ解放の指示により、抽象レジスタと実レジスタとの対応付けを解除する。
(3)抽象オブジェクトプログラム中の生成制御指示子により、抽象レジスタが実レジスタと対応しているか否かを検査し、ARM命令語列を選択する。
(4)(3)で選択されたARM命令語列に対し、実行計算機仕様におけるARMの命令語列パターンから実行計算機命令語列パターンへの変換規則を適用し、実行計算機の命令語列の生成と、抽象レジスタ番号の実レジスタ番号への置換とを実施する。
(5)(4)で生成された実行計算機の命令語列において、メモリアドレスを記号名称から数値番地へ変換する。
Here, the reason why the ARM instruction and the instruction of the execution computer are not made to correspond one-to-one is as follows.
(Reason 1) The instruction set of the ARM is not a strictly common part of the instruction set of the actual machine. Therefore, there is a case where the corresponding instruction of ARM does not exist in the instruction of the execution computer. In this case, it is necessary to implement one ARM instruction with several instructions of the execution computer.
(Reason 2) Contrary to the above, the execution computer may include an instruction corresponding to an instruction sequence of several ARM instructions. (Example: register-memory operation instruction, etc.) Generally, the execution speed is improved by reducing the number of instructions of the execution computer, and such a case is realized by one instruction.
4. Method for converting an abstract object program into a machine language program of an execution computer The installer has a table (hereinafter, register management table) for managing the correspondence between the abstract registers of the ARM and the real registers of the execution computer, and operates as follows. .
(1) Attempt to associate an abstract register with a real register according to an abstract register assignment instruction in an abstract object program. Within the range described in the register use specification of the execution computer specification, if there is a real register that does not correspond to another abstract register, that is, if there is a register that is not empty, the real register and the designated abstract register are made to correspond. .
(2) The association between the abstract register and the real register is released according to the register release instruction in the abstract object program.
(3) Using the generation control indicator in the abstract object program, check whether the abstract register corresponds to the real register and select an ARM instruction string.
(4) Applying a conversion rule from an ARM instruction string pattern in an execution computer specification to an execution computer instruction string pattern to the ARM instruction string selected in (3) to generate an instruction string of the execution computer And replacing the abstract register number with the actual register number.
(5) In the instruction word string of the execution computer generated in (4), the memory address is converted from a symbol name to a numerical address.

(1)コンパイラによる抽象レジスタ利用の最適化とインストーラの実レジスタ割当て機能により、実行計算機のレジスタを有効利用した機械語命令列を生成できる、(2)インストーラの命令語パターン置換機能により、実行計算機が備える高機能命令を利用できる。
(1) The compiler can optimize the use of abstract registers and the real register allocation function of the installer can generate a machine language instruction sequence that effectively uses the registers of the execution computer. (2) The execution computer can use the instruction word pattern replacement function of the installer. You can use the high-performance instructions provided by.

以下、本発明における実施例を図を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明におけるソースプログラムから機械語プログラムへの翻訳システムの構成の一例を示している。   FIG. 1 shows an example of the configuration of a system for translating a source program into a machine language program according to the present invention.

翻訳システムは、コンパイラ1001、リンカ1002、インストーラ1003の各サブシステムからなる。   The translation system includes subsystems of a compiler 1001, a linker 1002, and an installer 1003.

コンパイラ1001は、ソースプログラム1004を入力し、構文解析、意味解析、および後述するソースプログラムレベルでの最適化等を行ない、抽象オブジェクトプログラムである ArmCodeプログラム1005を出力する。なお、 ArmCodeは、本発明の特徴の一つであるので、 ArmCodeの仕様については図4〜図12を用いて後で詳細に説明する。また、これに関連して、コンパイラの構成については図2により、コンパイラにおける最適化処理については、図13〜図22により後述する。   The compiler 1001 inputs a source program 1004, performs syntax analysis, semantic analysis, optimization at a source program level described later, and the like, and outputs an ArmCode program 1005, which is an abstract object program. Since ArmCode is one of the features of the present invention, the specification of ArmCode will be described later in detail with reference to FIGS. In this connection, the configuration of the compiler will be described later with reference to FIG. 2, and the optimization processing in the compiler will be described later with reference to FIGS.

リンカ1002は、ソースプログラム1004からコンパイラが生成した ArmCodeプログラム1005、他のソースプログラム1006から同様にコンパイラが生成した ArmCodeプログラム1007、及び、 ArmCodeプログラムライブラリ1008を入力し、各プログラム間のルーチン参照関係の解決、変数・定数参照関係の解決、データ領域の統合、及び、命令領域の統合を行ない、結合済 ArmCodeプログラム1009を出力する。リンカ自身の機能は、 ArmCodeを通常の機械語とみなした従来のオブジェクトプログラムのリンケージエディタの機能の一部と同等であり、以下では詳細に述べない。   The linker 1002 inputs the ArmCode program 1005 generated by the compiler from the source program 1004, the ArmCode program 1007 similarly generated by the compiler from another source program 1006, and the ArmCode program library 1008, and executes the routine reference relation between the programs. It resolves, resolves the variable / constant reference relationship, integrates the data area, and integrates the instruction area, and outputs the combined ArmCode program 1009. The functions of the linker itself are equivalent to some of the functions of the linkage editor of a conventional object program that regards ArmCode as a normal machine language, and will not be described in detail below.

インストーラ1003は、結合済 ArmCodeプログラム1009を入力し、個別の目標計算機の仕様情報1010であるレジスタ用途指定1019および機械命令選択規則1020を用いて、実レジスタ割付、機械命令選択、機種依存最適化を行ない、機械語プログラム1011を計算機A1012のメモリ上に展開する。インストーラにおける処理も本発明の特徴であり、これについては図23〜図30を用いて後で詳細に説明する。   The installer 1003 inputs the combined ArmCode program 1009, and uses the register use specification 1019 and the machine instruction selection rule 1020, which are the specification information 1010 of each target computer, to perform actual register allocation, machine instruction selection, and model-dependent optimization. Then, the machine language program 1011 is expanded on the memory of the computer A 1012. The processing in the installer is also a feature of the present invention, and will be described later in detail with reference to FIGS.

計算機A1012は、上記で生成された機械語プログラム1011を実行する。   The computer A 1012 executes the machine language program 1011 generated above.

コンパイラ1001により、ソースプログラム1013から生成された ArmCodeプログラム1014が、他の ArmCodeプログラムや ArmCodeプログラムライブラリ1008との結合を必要としない場合、インストーラ1003は、 ArmCodeプログラム1014を直接入力し、機械語プログラムに展開することができる。   When the ArmCode program 1014 generated from the source program 1013 by the compiler 1001 does not need to be combined with another ArmCode program or the ArmCode program library 1008, the installer 1003 directly inputs the ArmCode program 1014 and outputs it to the machine language program. Can be expanded.

インストーラ1003は、計算機A用の機械語プログラムを生成するが、インストーラ1015は、計算機Bの仕様情報1018を用いて計算機B1017用の機械語プログラムを生成する。従って、本システムでは、同一の結合済 ArmCodeプログラム1009から、複数の計算機(計算機A1012、計算機B1017)の機械語プログラム(機械語プログラム1011、機械語プログラム1016)を生成し、それぞれの計算機で当該プログラムを実行することができる。   The installer 1003 generates a machine language program for the computer A. The installer 1015 generates a machine language program for the computer B 1017 using the specification information 1018 of the computer B. Therefore, in the present system, machine language programs (machine language programs 1011 and 1016) for a plurality of computers (computers A1012 and B1017) are generated from the same combined ArmCode program 1009, and the programs are generated by each computer. Can be performed.

なお、同一の ArmCodeプログラムから、異なる仕様の複数の計算機の機械語プログラムを生成した例については、図31〜図35によって後述する。   An example in which machine language programs of a plurality of computers having different specifications are generated from the same ArmCode program will be described later with reference to FIGS.

図2は本発明における抽象レジスタマシンコンパイラの一つの実施例を示すものである。ソースプログラム3102は、まずコンパイラ3100の構文・意味解析部3104によって構文解析、意味解析されて中間語3106に変換され、ソースプログラムで使われている各種の記号の情報が記号表3108に記載される。その中間語3106に対して、中間語最適化部3110によって制御フロー解析・データフロー解析して大域的最適化を行い、抽象レジスタマシン命令の列としての最適化前の ArmCode(Abstract register machine Code)列3112を生成する。その後、抽象レジスタ命令の最適化処理3114を行って、最適化された抽象レジスタマシン命令列としての抽象オブジェクトプログラム3116を生成する。構文解析、意味解析、制御フロー解析、データフロー解析、大域的最適化の方法については、A. V. Aho, R. Sethi, J. D. Ullman 著、Compilers Principles, Techniques, and Tools (Addison-Wesley Publishing Co., 1986) 等で述べられている。抽象レジスタ命令の最適化処理については後で説明する。   FIG. 2 shows an embodiment of the abstract register machine compiler according to the present invention. The source program 3102 is first subjected to syntax analysis and semantic analysis by the syntax and semantic analysis unit 3104 of the compiler 3100 and converted into an intermediate language 3106, and information of various symbols used in the source program is described in the symbol table 3108. . The intermediate language 3106 is subjected to control flow analysis and data flow analysis by the intermediate language optimizing unit 3110 to perform global optimization, and an ArmCode (Abstract register machine Code) before optimization as a sequence of abstract register machine instructions. A column 3112 is generated. After that, an abstract register instruction optimization process 3114 is performed to generate an abstract object program 3116 as an optimized abstract register machine instruction sequence. For methods of syntax analysis, semantic analysis, control flow analysis, data flow analysis, and global optimization, see AV Aho, R. Sethi, JD Ullman, Compilers Principles, Techniques, and Tools (Addison-Wesley Publishing Co., 1986). ). The process of optimizing the abstract register instruction will be described later.

本発明の特徴の一つは、抽象レジスタマシン命令 ArmCode の構成にある。ArmCode は、本発明で目的とする処理、すなわちオブジェクトプログラムをロード時に対象機種に合わせた機械命令に高速に変換する処理に適した構成と内容を有している。   One of the features of the present invention lies in the structure of the abstract register machine instruction ArmCode. ArmCode has a configuration and contents suitable for the processing intended in the present invention, that is, processing for converting an object program into machine instructions adapted to a target model at the time of loading at a high speed.

この抽象レジスタマシン命令の体系は、多くの縮小命令セット計算機すなわちRISCマシンに共通に適用できるものであり、ArmCode-R(Abstract Register Machine Code for RISC machines)と呼ぶ。   This system of abstract register machine instructions can be commonly applied to many reduced instruction set computers, that is, RISC machines, and is called ArmCode-R (Abstract Register Machine Code for RISC machines).

これは以下の特徴を持つ計算機に適している。
(1)演算はレジスタの間でのみ行う。
(2)メモリアクセスは Load/Store型命令でのみ行う。
(3)ベースレジスタを持つ。
(4)演算に使えるレジスタの数は少なくない(16かそれ以上ある)。
(5)埋め込み定数(immediate constant)を持つ。
(6)すべての命令は1語(32ビット)で表現される。
It is suitable for computers with the following features:
(1) The operation is performed only between registers.
(2) Perform memory access only with Load / Store type instructions.
(3) It has a base register.
(4) The number of registers available for operation is not small (16 or more).
(5) It has an embedded constant.
(6) All instructions are represented by one word (32 bits).

ArmCode-R の各命令は、特定の計算機の機械命令そのものではないが、それに容易に変換できるものであり、命令の表現形式には次の特徴がある。
(1)レジスタは、物理レジスタでなく、抽象レジスタとして表現される。
(2)メモリは、数値による番地でなく、記号名称によって表現される。
(3)メモリはバイト単位で番地付けされる。
(4)命令の長さは固定長である。
以下で単に ArmCode という場合、それは ArmCode-R を表す。
Each instruction of ArmCode-R is not a machine instruction of a specific computer itself, but can be easily converted into it. The expression format of the instruction has the following features.
(1) Registers are represented not as physical registers but as abstract registers.
(2) The memory is represented by symbolic names instead of numerical addresses.
(3) Memory is addressed in byte units.
(4) The instruction length is fixed.
In the following, when simply referred to as ArmCode, it represents ArmCode-R.

図3は、図1における ArmCodeプログラムと具体計算機の機械語プログラムとの対応関係を示したものである。ソ−スプログラム2910は、既に述べたように、コンパイラとリンカ2912で翻訳・結合されて、抽象オブジェクトプログラム2920に変換される。この抽象オブジェクトプログラムは、抽象レジスタマシンの命令である ArmCode の列として表される。   FIG. 3 shows the correspondence between the ArmCode program in FIG. 1 and the machine language program of the concrete computer. As described above, the source program 2910 is translated and combined by the compiler and the linker 2912, and is converted into the abstract object program 2920. This abstract object program is represented as a sequence of ArmCode, which is an instruction of the abstract register machine.

抽象レジスタマシンの命令は、現在の多くの計算機に共通的なモデル計算機の命令であり、その個々の命令に含まれる代表的項目は、抽象オペレ−タ2921と抽象レジスタ指定2923、メモリ/定数指定2925である。抽象オペレ−タは、メモリとレジスタ間のデ−タ転送を指示するロ−ド、ストアや、算術演算としての加減算など、多くの計算機に普遍的に備わっている命令を表す。抽象レジスタ指定は、抽象レジスタマシンのレジスタを表すものであり、実在のレジスタにおけるような使用個数の制限はないものとする。メモリや定数の指定2924は、番地や値の大きさに制限のない点以外は、実在の計算機におけるメモリや定数と同様の扱いができるものとする。   The instruction of the abstract register machine is a model computer instruction common to many current computers, and the representative items included in each instruction are an abstract operator 2921, an abstract register specification 2923, and a memory / constant specification. 2925. The abstract operator represents an instruction universally provided in many computers, such as a load and a store for instructing data transfer between a memory and a register, and addition and subtraction as an arithmetic operation. The abstract register designation indicates a register of the abstract register machine, and there is no limitation on the number of used registers as in an actual register. The designation of the memory and the constant 2924 can be handled in the same manner as the memory and the constant in a real computer, except that the address and the size of the value are not limited.

抽象レジスタマシン命令列2920は、各々の機種に合わせて作られたインスト−ラによって、対象機種の機械語命令列に変換される。たとえば、図3の抽象レジスタマシン命令列2920は、機種A用インスト−ラ2930を使うと機種A用の機械語命令列2950に変換され、機種C用インスト−ラ2940を使うと機種C用の機械語命令列2960に変換される。抽象レジスタマシンの命令と具体計算機の命令は、必ずしも1対1に対応するのではなく、一般には抽象レジスタマシンのm個の命令からなる命令列が具体計算機のn個の命令からなる命令列に変換される。各々の機械語命令に含まれるオペレ−タやレジスタ指定、メモリ/定数指定は、その機種固有のものである。例えば、機種A用の機械語プログラム2950のオペレ−タ2951やレジスタ指定2953、メモリ/定数指定2955は、機種A固有のものであり、機種B用の機械語プログラム2960のオペレ−タ2961やレジスタ指定2963、メモ/定数指定2965は、機種B固有のものである。   The abstract register machine instruction sequence 2920 is converted into a machine language instruction sequence of a target model by an installer created for each model. For example, the abstract register machine instruction sequence 2920 of FIG. 3 is converted into a machine language instruction sequence 2950 for model A when the installer 2930 for model A is used, and is converted to a machine language instruction sequence 2950 for model C when used. It is converted into a machine language instruction sequence 2960. The instruction of the abstract register machine and the instruction of the concrete computer do not always correspond one-to-one, but in general, an instruction sequence composed of m instructions of the abstract register machine becomes an instruction sequence composed of n instructions of the concrete computer. Is converted. The operator, register designation, and memory / constant designation included in each machine language instruction are unique to the model. For example, the operator 2951, the register specification 2953, and the memory / constant specification 2955 of the machine language program 2950 for the model A are specific to the model A, and the operator 2961 and the register of the machine language program 2960 for the model B are unique. The designation 2963 and the memo / constant designation 2965 are unique to the model B.

抽象レジスタマシン命令ArmCode には、計算機が実際に実行する命令とその構造を記述する機械語生成命令と、機械語生成を制御する生成制御文が含まれる。例えば次のような形をとる。   The abstract register machine instruction ArmCode includes an instruction to be actually executed by the computer and a machine language generation instruction describing its structure, and a generation control statement for controlling the generation of the machine language. For example, it takes the following form.

alloc(Ar10,RcArith,alc10,5,0,0xc0000000);
if (alc10) {
Load RegMd Ar10 Vbase OdDisp v;}
Add RegCon Ar11 Noreg OdCi 6;
機械語生成命令には下記の種類のものがあり、抽象オブジェクトプログラムではそれらをセミコロンで区切って書き並べる。
(1)機械語対応命令
(Load4, Store4, Add, Sub, 他)
(2)プログラムの構造を表す疑似命令
(Start/Pend, Block/End, Stmt, 他)
(3)記号名称を指示する疑似命令
(Entry, External, Label, Name, 他)
(4)メモリを指定する疑似命令
(Dword, Dconst, Daddr, 他)
(5)デバッガ等むけの記号情報を指定する疑似命令
(Sinf, 他)
生成制御文は、図4に示すように、条件文3120と代入文3122、関数参照文3124からなり、その中では定数と単純変数を含む式が使える。生成制御関数としては、3124に示すように、次のものが使える。
(1)alloc(抽象レジスタ名, レジスタ種別, 判定変数, 命令番号, 温存個数, 優先度)
第1引数で指定した抽象レジスタに対して、第2引数で指定した種別の物理レジスタの割付を要求する。命令番号は割付要求に先行するレジスタ使用命令の順序番号であり、温存個数は割付後も温存すべきレジスタの個数を表す。優先度はレジスタ割付の優先度である。第3引数の判定変数の値は、割要求時点で物理レジスタが割り付けできれば1となり、割り付けできなければ0となる。
(2)free(抽象レジスタ名)
引数で指定した抽象レジスタに対する物理レジスタを解放する。
alloc (Ar10, RcArith, alc10, 5, 0, 0xc0000000);
if (alc10) {
Load RegMd Ar10 Vbase OdDisp v;}
Add RegCon Ar11 Noreg OdCi 6;
There are the following types of machine language generation instructions. In an abstract object program, they are written separated by semicolons.
(1) Machine language instructions (Load4, Store4, Add, Sub, etc.)
(2) Pseudo-instructions indicating the structure of the program (Start / Pend, Block / End, Stmt, etc.)
(3) Pseudo-instructions indicating symbol names (Entry, External, Label, Name, etc.)
(4) Pseudo-instructions that specify memory (Dword, Dconst, Daddr, etc.)
(5) Pseudo-instructions that specify symbol information for debuggers, etc. (Sinf, etc.)
As shown in FIG. 4, the generation control statement includes a conditional statement 3120, an assignment statement 3122, and a function reference statement 3124, in which an expression including a constant and a simple variable can be used. As the generation control function, the following can be used as shown in 3124.
(1) alloc (abstract register name, register type, decision variable, instruction number, conserved number, priority)
Requests assignment of a physical register of the type specified by the second argument to the abstract register specified by the first argument. The instruction number is the sequence number of the register use instruction preceding the allocation request, and the preserved number represents the number of registers to be preserved even after the allocation. The priority is the priority of register allocation. The value of the determination variable of the third argument is 1 if the physical register can be allocated at the time of the allocation request, and becomes 0 if the physical register cannot be allocated.
(2) free (abstract register name)
Releases the physical register for the abstract register specified by the argument.

レジスタ割付の優先度はビットベクトルで表す。抽象レジスタ使用命令に一連番号をつけておき、現地点よりp個先で使われるものには p-1個の0の後に1が一つあるベクトルを対応させる。優先度はビットベクトルを符号無しの整数値と見て大きいものの方が高いとする。従って、すぐ次で使われる抽象レジスタの優先度は、それより後ろで使われるものより高い。複数箇所で使われるときは、それらのビットベクトルをORしたベクトルを対応させる。現地点が一つすすむとそのビットベクトルは一つ左へシフトされる。左シフトの際、左へあふれたビットは捨てられ,右端には0が補われる。従って、抽象レジスタの優先度は、使用位置の直前で最も高くなり使用位置を過ぎると下がる。   The priority of register allocation is represented by a bit vector. A serial number is assigned to an instruction using an abstract register, and a vector having p-1 0s followed by 1 is associated with an instruction used p points ahead of the local point. It is assumed that the priority is higher when the bit vector is regarded as an unsigned integer value and is larger. Therefore, the priority of the abstract register used immediately after is higher than that used later. When used at a plurality of locations, a vector obtained by ORing these bit vectors is associated. If one local point advances, the bit vector is shifted left by one. At the time of left shift, bits overflowing to the left are discarded, and 0 is added to the right end. Therefore, the priority of the abstract register is highest immediately before the use position and decreases after passing the use position.

優先度を表すビットベクトルは、1命令に1ビットと限定しているのではない。抽象レジスタを使う命令の列、あるいは機械語対応命令の列を固定長の区間に区切り、その各々の区間ごとに一つのビットを対応させ、注目している抽象レジスタがその区間で使われていれば1とし、使われていなければ0とすることにしてもよい。このようにすれば、短いビットベクトルで長い命令列のレジスタ使用状況を表現できる。区間の長さを1とすれば上で述べた対応関係となる。   The bit vector indicating the priority is not limited to one bit for one instruction. The sequence of instructions that use abstract registers or the sequence of machine-language instructions are divided into fixed-length sections, and one bit is assigned to each section, and the abstract register of interest is used in that section. If it is 1, it may be 0, and if it is not used, it may be 0. In this manner, the register use status of a long instruction sequence can be expressed by a short bit vector. If the length of the section is 1, the correspondence described above will be obtained.

ループを通して使われるレジスタは、そのループの長さ(の数分の1)の距離でまた使われるとして、その長さ(の数分の1)の調整数だけ右へシフトしたビットベクトルを算術加算し、それを優先度を表すビットベクトルとする。   The registers used throughout the loop are arithmetically added to the bit vector shifted to the right by a (fraction of) length adjustment, assuming they are also used a distance of (the fraction of) the length of the loop. And set it as a bit vector representing the priority.

抽象レジスタに物理レジスタを割り付ける alloc 関数ではこの優先度を指定し、その優先度が使用可能な物理レジスタの個数の内にあれば割付を行い、なければ割付しない。以前割り付けた抽象レジスタの優先度は、使用位置が近ずいていれば上がり、過ぎていれば下がるので、割付地点での他レジスタの優先度と比較して割り付けるか否かを決める。優先度が低くてあふれた抽象レジスタはメモリに割り付けされる。優先度については、後ほど図9でさらに詳しく説明する。   The alloc function that allocates physical registers to abstract registers specifies this priority. If the priority is within the number of available physical registers, it is allocated, otherwise it is not allocated. Since the priorities of the abstract registers previously allocated rise when the use position is approaching and decrease when the use positions pass, the priorities of the other registers at the allocation point are determined to be allocated or not. Abstract registers with low priority and overflow are allocated to memory. The priority will be described later in more detail with reference to FIG.

ArmCode-Rの命令形式を図5に示す。ArmCode-R の各命令3130は、オペレ−タ3132、アドレスモ−ド3134、第1オペランド3136、第2オペランド3138、第3オペランド3140で構成される。それらは以下の内容を表す。   The instruction format of ArmCode-R is shown in FIG. Each instruction 3130 of the ArmCode-R comprises an operator 3132, an address mode 3134, a first operand 3136, a second operand 3138, and a third operand 3140. They represent the following:

オペレ−タ 命令の名称
アドレスモ−ド オペランド形態の
区分
第1オペランド レジスタ R1、リテラル c1
または ArmCode番地 c1
第3オペランド メモリ番地,ディスプレースメント d3、
リテラル c3、ラベル c3、
ArmCode番地 c3、他
ここで、各オペランド3136、3138、3140は図4に示す通り、次のように表現される(機械語生成命令の仕様参照):
レジスタ 抽象レジスタ番号
メモリ番地 絶対番地、または変数名を表す記号表の位置、または
メモリ内の番地を表す抽象レジスタ番号
デイスプレ−スメント ベ−スレジスタに対する変位を表す数値
リテラル 整定数(演算対象としての数値、文字コ−ド、または
文字列表や注釈表の位置)
ラベル レベル表 LBL の項目番号
ArmCode番地 ArmCode の一つの命令の位置
第3オペランドは、オペランドの型を示す小項目とオペランドを表す小項目の組合せとして、次のように表現される。
Operator Instruction name Address mode Operand form
Category First operand Register R1, Literal c1
Or ArmCode address c1
Third operand memory address, displacement d3,
Literal c3, label c3,
ArmCode address c3, etc. Here, each operand 3136, 3138, 3140 is represented as shown in FIG. 4 (see the specification of the machine language generation instruction):
Register Abstract register number Memory address Absolute address, or the position in the symbol table that represents the variable name, or
Abstract register number indicating the address in memory Numeric value indicating displacement with respect to the displacement base register Literal Integer constant (numeric value, character code, or
(Character table and annotation table position)
Item number of label level table LBL
ArmCode address Position of one instruction of ArmCode The third operand is expressed as a combination of a small item indicating the type of the operand and a small item indicating the operand as follows.

Odsym s3 記号表記載項目 s3
OdLab c3 ラベル表(LBL)記載項目 c3
Odci c3 命令内スカラ定数 c3
OdCL c3 c3 で示されるメモリ内スカラ定数
OdCS c3 ストリング定数 c3
OdGvar s3 コンパイラで生成された一時変数 s3
OdDisp c3 ディスプレ−スメント c3
OdNo Null 第3オペランドのないことを表現
第1オペランド3136は、ロ−ド系や演算系の命令では結果の格納先を示し、ストア系の命令ではストアすべきデ−タを保持しているレジスタを示し、条件分岐命令では、条件判定の対象デ−タを保持しているレジスタを示す。
Odsym s3 Symbol table entry s3
OdLab c3 Label List (LBL) Items c3
Odci c3 Scalar constant in instruction c3
OdCL c3 In-memory scalar constant denoted by c3
OdCS c3 String constant c3
OdGvar s3 Temporary variable s3 generated by the compiler
OdDisp c3 Displacement c3
OdNo Null Represents the absence of the third operand. The first operand 3136 indicates the storage location of the result for load or arithmetic instructions, and the register for storing data to be stored for store instructions. In the case of the conditional branch instruction, a register holding data to be subjected to the condition determination is shown.

アドレスモ−ド3134は、有効なオペランドの個数とその役割を示す。   The address mode 3134 indicates the number of valid operands and their roles.

図6は、図5のアドレスモード3134と、第1オペランド(オペランド1)3136、第2オペランド(オペランド2)3138、第3オペランド(オペランド3)3140の可能な組み合わせを示すものであり、RegReg, RegMI 等の各々のアドレスモード3170に対して、オペランド1(3172)、オペランド2(3174)、オペランド3(3176)がどんな役割を持つかを示している。空白の部分はそのオペランドが有効でないことを示す。オペランドが単なるレジスタなら、そのレジスタの値を利用ないし設定する。オペランドが定数なら、その値を利用する。オペランドがアドレスレジスタなら、そのアドレスレジスタの内容をメモリ番地とみなしてオペランドをアクセスする。オペランドがベ−スレジスタとディスプレ−スメントで指定されていれば、ベ−スレジスタの内容とディスプレ−スメントを加算した数をオペランドのメモリ番地としてアクセスする。アドレスモ−ド RegRCC では、定数 c3 と c4 は 255 以下の正の整数であるとして、第3オペランドの中に詰合せていれる。   FIG. 6 shows a possible combination of the address mode 3134 of FIG. 5, the first operand (operand 1) 3136, the second operand (operand 2) 3138, and the third operand (operand 3) 3140. For each address mode 3170 such as RegMI, the role of operand 1 (3172), operand 2 (3174), and operand 3 (3176) is shown. A blank indicates that the operand is not valid. If the operand is just a register, use or set the value of that register. If the operand is a constant, use that value. If the operand is an address register, the contents of the address register are regarded as a memory address and the operand is accessed. If the operand is specified by the base register and the displacement, the number obtained by adding the contents of the base register and the displacement is accessed as the memory address of the operand. In the address mode RegRCC, the constants c3 and c4 are packed in the third operand as being positive integers of 255 or less.

機械語生成命令の仕様を図7から図12に示す。そこで使う記号の意味は下記の通りである。   FIGS. 7 to 12 show the specifications of the machine language generation instruction. The meanings of the symbols used there are as follows.

a : 番地または定数 a。番地を表す時、a は絶対番地を表す数値 c でも
記号表の位置を表す数値 s でも良い。
a: Street address or constant a. When expressing an address, a may be a numerical value c representing an absolute address or a numerical value s representing a position in a symbol table.

[a]: 番地が a のレジスタまたはメモリの内容
a^ : 番地 a の内容でポイントされる(aの内容を番地とする)レジスタまた
はメモリ
( ): 括弧内を一つの記号として扱う
-> : 右のレジスタや変数への代入
<- : 左のレジスタや変数への代入
ロ−ド命令3210には次のものがある。(図7)
Load オペランド2、3で示される1語のデ−タを
オペランド1のレジスタにロ−ド。
[a]: Contents of register or memory at address a
a ^: Register or memory pointed to by the contents of address a (the contents of a are used as addresses)
(): Treats as one symbol in parentheses
->: Assign to right register or variable
<-: Assignment load instruction 3210 to the left register or variable includes the following. (FIG. 7)
Load One word data indicated by operands 2 and 3
Load operand 1 register.

LoadB オペランド2、3で示される1バイトのデ−タを
オペランド1のレジスタに右詰めでロ−ド。
LoadB 1-byte data indicated by operands 2 and 3
Load the register of operand 1 right-justified.

モ-ド別処理:
RegReg R1 <- [R2]
RegMI R1 <- [R2^]
RegMR R1 <- [([R2]+d)^]
RegMD R1 <- [d]
RegCon R1 <- c3
RegAdr R1 <- [R2]+d
ストア命令3220には次のものがある。(図7)
Store オペランド1の1語のデ−タを
オペランド2、3で示す場所にストア。
Processing by mode:
RegReg R1 <-[R2]
RegMI R1 <-[R2 ^]
RegMR R1 <-[([R2] + d) ^]
RegMD R1 <-[d]
RegCon R1 <-c3
RegAdr R1 <-[R2] + d
Store instructions 3220 include: (FIG. 7)
Store One word of operand 1 data
Store at the location indicated by operands 2 and 3.

StoreB オペランド1の右端1バイトのデ−タを
オペランド2、3で示す場所にストア。
StoreB The rightmost 1-byte data of operand 1
Store at the location indicated by operands 2 and 3.

モ-ド別処理:
RegReg [R1] -> R2
RegMI [R1] -> R2^
RegMR [R1] -> ([R2]+d)^
RegMD [R1] -> d
整数型2項算術演算命令3230には、次のものがある。(図7)
Add オペランド1にオペランド2を加算し、
結果をオペランド1にいれる。
Processing by mode:
RegReg [R1]-> R2
RegMI [R1]-> R2 ^
RegMR [R1]-> ([R2] + d) ^
RegMD [R1]-> d
The integer type binary arithmetic operation instruction 3230 includes the following. (FIG. 7)
Add Add operand 2 to operand 1;
Put the result in operand 1.

あふれの有無に合わせてcarry が1か0になる。               The carry becomes 1 or 0 according to the overflow.

Sub オペランド1からオペランド2を減算し、
結果をオペランド1にいれる。
Sub Subtracts operand 2 from operand 1 and
Put the result in operand 1.

carry はオペランド2がオペランド1より大なら1となり、
そうでなければ0となる。
carry is 1 if operand 2 is greater than operand 1,
Otherwise it is 0.

Mult オペランド1にオペランド2を乗算し、
結果をオペランド1にいれる。
Mult Operand 1 is multiplied by operand 2,
Put the result in operand 1.

Div オペランド1をオペランド2で除算し、
商をオペランド1にいれる。
Div Divides operand 1 by operand 2,
Put the quotient in operand 1.

UnsAdd 符号なしで計算すること以外はAdd と同じ。     UnsAdd Same as Add except that the calculation is unsigned.

UnsSub 符号なしで計算すること以外はSub と同じ。     UnsSub Same as Sub except that calculation is performed without sign.

AddC carry と合わせて加算すること以外は Add と同じ。     Same as Add except that it is added together with AddC carry.

SubB borrowと合わせて減算すること以外は Sub と同じ。     Same as Sub except that subtraction is performed in conjunction with SubB borrow.

モ-ド別処理:
RegReg ([R1] op [R2]) -> R1
RegCon ([R1] op c3) -> R1
ここで、op は演算子
実数型2項算術演算命令3240には、次のものがある。(図8)
AddR オペランド1にオペランド2を加算し、
結果をオペランド1にいれる。
Processing by mode:
RegReg ([R1] op [R2])-> R1
RegCon ([R1] op c3)-> R1
Here, op is an operator real type binary arithmetic operation instruction 3240. (FIG. 8)
AddR Adds operand 2 to operand 1 and
Put the result in operand 1.

SubR オペランド1からオペランド2を減算し
結果をオペランド1にいれる。
SubR Subtracts operand 2 from operand 1.
Put the result in operand 1.

MultR オペランド1にオペランド2を乗算し、
結果をオペランド1にいれる。
MultR Operand 1 is multiplied by operand 2,
Put the result in operand 1.

DivR オペランド1をオペランド2で除算し、
商をオペランド1にいれる。
DivR Divides operand 1 by operand 2,
Put the quotient in operand 1.

モ-ド別処理:
RegReg ([R1] op [R2]) -> R1
RegCon ([R1] op c3) -> R1
ここで、op は演算子。
2項論理演算命令3250には次のものがある。(図8)
And オペランド1にオペランド2を and し、
結果をオペランド1にいれる。
Processing by mode:
RegReg ([R1] op [R2])-> R1
RegCon ([R1] op c3)-> R1
Where op is an operator.
Binary logical operation instructions 3250 include: (FIG. 8)
And Operand 2 with operand 2
Put the result in operand 1.

Or オペランド1にオペランド2を or し、
結果をオペランド1にいれる。
Or Operand 2 with operand 2
Put the result in operand 1.

Xor オペランド1にオペランド2を xor し、
結果をオペランド1にいれる。
Xor Operand 2 to operand 1
Put the result in operand 1.

モ-ド別処理:
RegReg ([R1] op [R2]) -> R1
RegCon ([R1] op c3) -> R1
ここで、op は演算子。
単項演算命令3260には次のものがある。(図8)
Negate オペランド1を符号反転し、結果をオペランド1にいれる。
Processing by mode:
RegReg ([R1] op [R2])-> R1
RegCon ([R1] op c3)-> R1
Where op is an operator.
The unary operation instructions 3260 include the following. (FIG. 8)
Negate Inverts the sign of operand 1 and places the result in operand 1.

Not オペランド1をビット反転し、結果をオペランド1にいれる。     Not Operand 1 is bit-inverted and the result is placed in Operand 1.

モ-ド別処理:
Reg1 オペランド1の内容に対して演算し、結果をオペランド1に残す。
比較命令3270には次のものがある。(図8)
Compar オペランド1と2の内容を比較し、条件コ-ドを設定。
Processing by mode:
Reg1 Operates on the contents of operand 1 and leaves the result in operand 1.
Compare instruction 3270 includes: (FIG. 8)
Compar Compares the contents of operands 1 and 2 and sets a condition code.

モ-ド別処理:
RegReg [R1]>[R2] なら Gt, [R1]=[R2] なら Eq, [R1]<[R2] なら Lt。
Processing by mode:
RegReg Gt if [R1]> [R2], Eq if [R1] = [R2], Lt if [R1] <[R2].

RegCon [R1]>c3 なら Gt, [R1]=c3 なら Eq, [R1]<c3 なら Lt。
条件テスト命令3280には次のものがある。(図8)
TZero モ-ド Reg1 0なら条件コードを Eqとし、
そうでなければ Ne とする。
Gt if RegCon [R1]> c3, Eq if [R1] = c3, Lt if [R1] <c3.
Conditional test instructions 3280 include: (FIG. 8)
If TZero mode Reg1 0, condition code is Eq,
Otherwise, it is Ne.

TBit モ-ド RegCon [R1]の第3オペランド c3 の示すビット位置が、
0なら条件コードを Eq とし、1なら Ne とする。
条件分岐命令3290には次のものがある。(図9)
BrEq 条件コ-ドが Eq なら、オペランドで指定された位置に跳ぶ。
The bit position indicated by the third operand c3 of TBit mode RegCon [R1] is
If 0, the condition code is Eq; if 1, the condition code is Ne.
The conditional branch instruction 3290 includes the following. (FIG. 9)
If the BrEq condition code is Eq, jump to the position specified by the operand.

BrNe 条件コ-ドが Eq でなければ、オペランドで指定された位置に跳
ぶ。
If the BrNe condition code is not Eq, jump to the position specified by the operand.
Huh.

BrGt 条件コ-ドが Gt なら、オペランドで指定された位置に跳ぶ。     If the BrGt condition code is Gt, jump to the position specified by the operand.

BrGe 条件コ-ドが Gt または Eq なら、オペランドで指定された位置
に跳ぶ。
If the BrGe condition code is Gt or Eq, the position specified by the operand
Jump to.

BrLe 条件コ-ドが Lt または Eq なら、オペランドで指定された位置
に跳ぶ。
If the BrLe condition code is Lt or Eq, the position specified by the operand
Jump to.

BrLt 条件コ-ドが Lt なら、オペランドで指定された位置に跳ぶ。     If the BrLt condition code is Lt, jump to the position specified by the operand.

上記のいずれの場合も、条件に合わなければ直後の命令に進む。           In any of the above cases, if the condition is not met, the process proceeds to the next instruction.

モ-ド
Const ラベル表 LBL[C3] の示す位置が跳び先の命令番地。
Mode
The position indicated by the Const label table LBL [C3] is the instruction address of the jump destination.

RegR [R2]+d が跳び先の命令番地。
無条件分岐命令3300は次の機能を持つ。(図9)
Jump オペランドで指定された位置に跳ぶ。
RegR [R2] + d is the instruction address to jump to.
The unconditional branch instruction 3300 has the following functions. (FIG. 9)
Jump Jump to the position specified by the operand.

モ-ド別処理
Const ラベル表 LBL[C3] の示す位置が跳び先の命令番地。
Processing by mode
The position indicated by the Const label table LBL [C3] is the instruction address of the jump destination.

RegR [R2]+d が跳び先の命令番地。
副プログラム参照命令3310は次の機能をもつ。(図9)
Call 戻り番地を記録した後、オペランドで指定された副プログラム
へ跳ぶ。
RegR [R2] + d is the instruction address to jump to.
The subprogram reference instruction 3310 has the following functions. (FIG. 9)
Call After recording the return address, the subprogram specified by the operand
Jump to

モ-ド別処理
RegMR 戻り番地を R1 にいれ、[R2]+d 番地へ跳ぶ。
Processing by mode
RegMR Put the return address in R1 and jump to [R2] + d.

RegMD 戻り番地を R1 にいれ、LBL[c3] の示す副プログラム番地へ跳
ぶ。
Register the return address of RegMD into R1 and jump to the subprogram address indicated by LBL [c3].
Huh.

Reg1 戻り番地をスタックした後、[R1]番地へ跳ぶ。
Return命令3320は次の機能を持つ。(図9)
Return オペランドで指定した副プログラムから、Callで記録した戻り
番地へ跳ぶ。
Reg1 After stacking the return address, jump to address [R1].
Return instruction 3320 has the following functions. (FIG. 9)
Return recorded by Call from the subprogram specified by the Return operand
Jump to the house number.

モ-ド別処理
Reg1 R1 に記録されている戻り番地へ跳ぶ。
Processing by mode
Jump to the return address recorded in Reg1 R1.

Reg0 Callでスタックした戻り番地置をLIFO方式で取り出してそこへ
跳ぶ。
シフト命令3330には次のものがある。(図10)いずれも第1オペランド R1 の
内容を、第2または第3オペランドで示された個数 n だけ、左または右へシフ
トする。
Retrieve the return address stuck by Reg0 Call by LIFO method and go there
jump.
Shift instructions 3330 include: (FIG. 10) In each case, the content of the first operand R1 is shifted left or right by the number n indicated by the second or third operand.

ShiftL R1 を n ビット左シフトする。右の n ビットは 0 となる。     ShiftL Shift R1 left by n bits. The right n bits are 0.

ShiftR R1 を n ビット右シフトする。左の n ビットは 0 となる。     ShiftR Shift R1 right by n bits. The left n bits are zero.

モ-ド別処理
RegCon R1 は は対象レジスタ、c3 はシフトビット数。
Processing by mode
RegCon R1 is the target register and c3 is the number of shift bits.

RegReg R1 は は対象レジスタ、[R2] はシフトビット数。
回転命令3340には次のものがある。(図10)いずれも第1オペランド R1 の内
容を、第2または第3オペランドで示された個数 n だけ、左または右へ回転す
る。
RegReg R1 is the target register and [R2] is the number of shift bits.
The rotation instructions 3340 include: (FIG. 10) In each case, the content of the first operand R1 is rotated left or right by the number n indicated by the second or third operand.

RotL R1 を n ビット左へ回転する。     RotL Rotate R1 left by n bits.

RotR R1 を n ビット右へ回転する。     RotR Rotate R1 right by n bits.

モ-ド別処理
RegCon R1 は は対象レジスタ、c3 は回転ビット数。
Processing by mode
RegCon R1 is the target register, c3 is the number of rotation bits.

RegReg R1 は は対象レジスタ、[R2] は回転ビット数。
ビット操作命令3350には次のものがある。(図10)
GetBit RegCC R1 の c2 ビットから始まる c3 ビットのデ-タを
右詰めでR1 にいれる。R1の左部分は0となる。
RegReg R1 is the target register and [R2] is the number of rotation bits.
The bit manipulation instructions 3350 include: (FIG. 10)
GetBit RegCC R1 c3 bit data starting from c2 bit
Right-justify and enter R1. The left part of R1 is 0.

GetBit RegRCC R2 の c2 ビットから始まる c3 ビットのデ-タを
右詰めでR1 にいれる。R1の左部分は0となる。
GetBit RegRCC c2 bit data starting from c2 bit of R2
Right-justify and enter R1. The left part of R1 is 0.

PutBit RegRCC R1 の 右 c4 ビット長のデ-タを
R2 の c3 ビットから始まる c4 ビット長のフィ-ルドに
いれる。他のビットフィールドの内容は不変である。
データ変換命令3360には次のものがある。(図10)
ItoR RegReg R1 の内容を、整数から実数に変換して R2 にいれる。
PutBit RegRCC R1 right c4 bit length data
In the field of c4 bit length starting from c3 bit of R2
Put in. The contents of the other bit fields are unchanged.
The data conversion instruction 3360 includes the following. (FIG. 10)
ItoR RegReg Converts the contents of R1 from integers to real numbers and puts them in R2.

RtoI RegReg R1 の内容を、実数から整数に変換して R2 にいれる。     RtoI RegReg Converts the contents of R1 from a real number to an integer and places it in R2.

ItoD RegReg R1 の内容を、整数から長精度実数に変換して R2 にいれ
る。
Convert the contents of ItoD RegReg R1 from integers to long precision real numbers and put them in R2.
You.

DtoI RegReg R1 の内容を、長精度実数から整数に変換して R2 にいれ
る。
状態切り換え命令3370には次のものがある。(図11)
SaveSt RegMR その時点でのプロセッサの状態をメモリに待避する。
DtoI RegReg Convert the contents of R1 from a long-precision real number to an integer and place it in R2.
You.
The state switching instruction 3370 includes the following. (FIG. 11)
SaveSt RegMR Saves the current processor state to memory.

(待避情報:プログラムカウンタ、状態コード、マスク、他)
LoadSt RegMR メモリに格納されている情報に従って、
プロセッサの状態を回復する。
無操作命令3380は次のものである。(図11)
Nop Reg0 何もしない。機械命令としては1語を占める。
プログラム構造を表す疑似命令3390には次のものがある。(図11)
Start Cont1 OdSym s3 の示す(記号表の)名前をもつオブジェクト開始疑似
命令
SubP Cont1 Odsym s3 で示される副プログラムの開始を示す。
(Save information: program counter, status code, mask, etc.)
According to the information stored in LoadSt RegMR memory,
Recover the processor state.
The no-operation command 3380 is as follows. (FIG. 11)
Nop Reg0 Do nothing. A machine instruction occupies one word.
Pseudo-instructions 3390 representing the program structure include: (FIG. 11)
Start Cont1 OdSym s3 Object start pseudo with name (in symbol table)
order
SubP Cont1 Indicates the start of the subprogram indicated by Odsym s3.

Block Cont0 ブロック開始
End Cont0 ブロック終了
Loops Cont1 OdLab LBL[c3] で示されるラベルを反復開始点とするルー
プ文の先頭を示す。
Block Cont0 Block start
End Cont0 Block end
Loops Cont1 OdLab LBL [c3]
Indicates the beginning of the statement.

Loope Cont1 OdLab LBL[c3] で示されるラベルを反復開始点とするルー
プ文の末尾を示す。
Loope Cont1 OdLab LBL [c3]
Indicates the end of the statement.

Pend Cont0 副プログラム又はユニットの終わり
(End の後ろに Define Storage や Define Constant が続き、
最後に Pend が付く)
Stmt Cont1 OdCi c3 を文番号とする文の開始位置を示す。
記号名称を指定する疑似命令3400には次のものがある。(図11)
Entry Cont1 OdSym s3 の示す(記号表の)名前を入り口名として示す疑似命

Extern Cont1 OdSym s3 の示す(記号表の)名前が外部名であることを示す
疑似命令
Label Cont1 OdLab c3 が記号表を持つ LBL表番号(ユ-ザラベル)の時、
その記号表の名前をラベル名として定義する疑似命令。
Pend Cont0 End of subprogram or unit
(End is followed by Define Storage and Define Constant,
(Pend is added at the end)
Stmt Cont1 Indicates the start position of the sentence whose sentence number is OdCic3.
Pseudo-instructions 3400 for specifying symbolic names include: (FIG. 11)
Entry Cont1 Pseudo-imitation that shows the name (in the symbol table) indicated by OdSym s3 as the entry name
Command
Extern Cont1 Indicates that the name (in the symbol table) indicated by OdSym s3 is an external name
Pseudo instruction
When Label Cont1 OdLab c3 is an LBL table number (user label) with a symbol table,
A pseudo-instruction that defines the name of the symbol table as a label name.

c3 が記号表を持たない LBL表番号(生成ラベル)の n 時、
その生成ラベル名\nをラベル名として定義する疑似命令。
When c3 is n of the LBL table number (generated label) without a symbol table,
A pseudo-instruction that defines the generated label name \ n as a label name.

Label Cont1 OdCL c3 がメモリ定数を表す LRG表番号 m の時、
定数名 \\Cm をラベル名として定義する疑似命令。
When Label Cont1 OdCL c3 is the LRG table number m indicating the memory constant,
A pseudo-instruction that defines the constant name \\ Cm as a label name.

Label Cont1 OdGvar s3 が生成変数を表す記号表番号 k の時、
生成変数名 \\Tk をラベル名として定義する疑似命令。
Label Cont1 When OdGvar s3 is a symbol table number k representing a generated variable,
Pseudo-instruction that defines generated variable name \\ Tk as a label name.

Name Cont1 OdSym s3 の示す(記号表の)名前を直前のOpLabelの名前と
EQUする命令
メモリを指定する疑似命令3410には次のものがある。(図12)
Dconst Cont1 OdCi c3 を整定数値とする定数定義
Dconst Cont1 OdCS c3 を1語の文字列とみなす定数定義
Dconst Cont1 OdCS c3 を1語の文字列定数とする定数定義
Dword Cont1 OdCi c3 語のメモリをとる Define Storage 命令
Daddr Cont1 OdSym s3 の示す(記号表の)名前に対する Define Address
MCode Cont1 OdCi c3 の指す機械語 MRT[c3] を生成する命令
デバッガ等向けの記号情報を指定する疑似命令3420には次のものがある。(図1
2)
PInf Cont1 OdCi c3 の示す位置にあるプログラム特性情報表の情報を示
す。
Name Cont1 OdSym s3 shows the name (in the symbol table) with the previous OpLabel name.
The pseudo instruction 3410 for specifying the instruction memory to be EQUed includes the following. (FIG. 12)
Dconst Cont1 Constant definition with OdCic3 as an integer constant value
Dconst Cont1 Constant definition that regards OdCS c3 as one word character string
Dconst Cont1 Constant definition with OdCS c3 as one word character string constant
Dword Cont1 OdCi c Define Storage instruction that takes 3 words of memory
Define Address for the name (in the symbol table) indicated by Daddr Cont1 OdSym s3
MCode Cont1 OdCic The pseudo-instruction 3420 that specifies the symbol information for the instruction debugger or the like that generates the machine language MRT [c3] indicated by OdCic c3 is as follows. (Figure 1
2)
PInf Cont1 Indicates the information of the program characteristic information table at the position indicated by OdCic3.
You.

SInf Cont1 OdCi c3 の示す位置にある記号情報を示す。     Indicates the symbol information at the position indicated by SInf Cont1 OdCic3.

図13は図2に示したコンパイラの入力となるソースプログラム3102の一つの例である。これは大域的変数を指定する宣言文3610や、関数名称の指定3614、関数内の局所的変数の宣言3616、及び、3620から始まる実行文の列等で構成されている。3610の文頭にある1や3620の文頭にある10等の番号は、それぞれの文の文番号を表す。図14から図16は、このソースプログラムを ArmCode の列に変換した例である。これではまだ最適化処理を行っていない。   FIG. 13 is an example of a source program 3102 that is input to the compiler shown in FIG. It is composed of a declaration statement 3610 specifying a global variable, a specification 3614 of a function name, a declaration 3616 of a local variable in a function, a sequence of executable statements starting from 3620, and the like. Numbers such as 1 at the beginning of 3610 and 10 at the beginning of 3620 indicate the sentence number of each sentence. FIGS. 14 to 16 show examples in which this source program is converted into a column of ArmCode. In this case, the optimization processing has not been performed yet.

記号情報を指定する疑似命令3700はソースプログラムの宣言文3610に対応するものであり、3702は同じく3616に対応するものである。3710から始まるArmCodeの列は、ソースプログラムの3620から始まる実行文の列に対応するものである。   The pseudo-instruction 3700 for specifying symbolic information corresponds to the declaration statement 3610 of the source program, and 3702 similarly corresponds to 3616. The column of ArmCode starting from 3710 corresponds to the column of executable statements starting from 3620 of the source program.

図14から図18を用いてレジスタの優先度について具体的に説明する。この ArmCode で抽象レジスタを使っている命令は、先頭に*印をつけた3720、3722等の命令である。3710の alloc 命令は Vbase という抽象レジスタに物理レジスタの割付要求をしているものであるが、その優先度として 0x62489700+0x00224897 を指定している。Vbase というレジスタは 3722, 3734, 3758, 3770, 3790, 3828, 3846, 3850, 3856, 3860 の命令で使われているが、これらを alloc のある位置 3710 からみて何番目の抽象レジスタ使用命令かと数え、使っているところを1、使っていないところを0としたビットベクトルを作ってみると、図17の3910に示すように 01100010010010001001011100000000 となる。これを16進数で表現したものが3710の 0x62489700 である。図14から図16のプログラムでは、 3868 の命令から 3728 の命令へ戻るループがあり、その中には抽象レジスタを使う命令が23個ある。この実施例では、ループ内の抽象レジスタ使用命令の個数を3で割って余りがあれば切り上げたものをループに対する優先度の調整数としている。ループ内で使われている Vbase のビットベクトルは3910の第2ビットを0にした 00100010010010001001011100000000 であり、これを23を3で割って切り上げた数8だけ右へずらすと3912のように 00000000001000100100100010010111 となる。これを16進数で表現したものが 0x00224897 である。   The priority of the register will be specifically described with reference to FIGS. Instructions that use the abstract register in this ArmCode are instructions such as 3720, 3722, etc., which are marked with * at the beginning. The 3710 alloc instruction requests the allocation of a physical register to an abstract register called Vbase, and specifies 0x62489700 + 0x00224897 as its priority. The register Vbase is used in the instructions 3722, 3734, 3758, 3770, 3790, 3828, 3846, 3850, 3856, and 3860, and these are counted as the number of the abstract register use instruction from the position 3710 where alloc is located. If a bit vector is created with 1 used and 0 not used, it becomes 01100010010010001001011100000000 as shown by 3910 in FIG. The hexadecimal representation of this is 0x62489700 in 3710. In the programs of FIGS. 14 to 16, there is a loop returning from the 3868 instruction to the 3728 instruction, and among them, there are 23 instructions using the abstract register. In this embodiment, the number of instructions that use the abstract register in the loop is divided by 3 and rounded up if there is a remainder, and is used as a priority adjustment number for the loop. The Vbase bit vector used in the loop is 00100010010010001001011100000000 with the second bit of 3910 set to 0, and dividing this by 23 and rounding it up and shifting it to the right by the number 8 gives 00000000001000100100100010010111 as 3912. The value expressed in hexadecimal is 0x00224897.

従って、Vbase の割付要求時の優先度は、図14の3710に示すように、両者を符号無し整数として加算した数 0x62489700+0x00224897 となる。同様にして、3718 の Ar5 等に対する優先度が3918、3920で示すように算出されている。   Accordingly, the priority at the time of Vbase allocation request is a number 0x62489700 + 0x00224897 obtained by adding both as unsigned integers, as shown at 3710 in FIG. Similarly, the priority of 3718 to Ar5 and the like is calculated as indicated by 3918 and 3920.

レジスタ割付の優先度は固定されたものではなく、既に述べたように、注目している命令の位置が進むとともに左へシフトされてゆく。従って、ループの先頭部の 3732 の位置では、レジスタ使用命令をふたつ越ているので、Vbase と Ar5 のレジスタ優先度は図17の3914と3918に示すように、2つ左へシフトされ、Vbase の優先度は 0x89225C00+0x0089225C となり、Ar5 の優先度は3922と3924に示すように 0x44110000+0x00441100 となる。これが 3732 で割付要求される Ar6 の優先度 0xE0000000 と比較されるのである。   The priority of register allocation is not fixed, but shifts to the left as the position of the instruction of interest advances, as described above. Therefore, at the position 3732 at the beginning of the loop, since two register use instructions are exceeded, the register priorities of Vbase and Ar5 are shifted left by two as shown in 3914 and 3918 of FIG. The priority is 0x89225C00 + 0x0089225C, and the priority of Ar5 is 0x44110000 + 0x00441100 as shown in 3922 and 3924. This is compared with Ar6 priority 0xE0000000 which is required to be allocated in 3732.

図18は上記のレジスタ割り付けの優先度ビットベクトルを作成する手順を示すフロ−チャ−トである。レジスタrの優先度ビットベクトルをPrで表すと、まずそれをリセットする(ステップ3930)。そして、次の ArmCode を取りだし(ステップ3932)、それがル−プの開始でなければ(ステップ3934)、レジスタ使用命令か否かを調べ(ステップ3936)、レジスタ使用命令であればrの優先度ビットベクトルを1ビット左へずらし(ステップ3938)、レジスタrを使っていれば(ステップ3940)、Prの右端1ビットを1にし(ステップ3942)、レジスタrを使っていなければPrの右端1ビットを0にする(ステップ3943)。次の ArmCode 命令がル−プの終了またはレジスタrの開放命令であればrに対する優先度ビットベクトルの算出を終了させ(ステップ3944)、そうでなければ次の ArmCode 命令の取りだしから繰り返す。   FIG. 18 is a flowchart showing a procedure for creating the above-mentioned register assignment priority bit vector. When the priority bit vector of the register r is represented by Pr, it is reset first (step 3930). Then, the next ArmCode is fetched (step 3932). If it is not the start of the loop (step 3934), it is checked whether or not it is a register use instruction (step 3936). The bit vector is shifted one bit to the left (step 3938). If the register r is used (step 3940), the rightmost bit of Pr is set to 1 (step 3942). If the register r is not used, the rightmost bit of Pr is one bit. Is set to 0 (step 3943). If the next ArmCode instruction is the end of the loop or the instruction to release the register r, the calculation of the priority bit vector for r is terminated (step 3944). Otherwise, the processing is repeated from the retrieval of the next ArmCode instruction.

取りだした ArmCode がル−プ開始命令であれば(ステップ3934)、レジスタrのそのル−プ内の優先度ビットベクトルをLrで表すことにして、Lrをステップ3930からステップ3944までと同じ手順で算出する。このようにして求めたLrに対して、ル−プ内の抽象レジスタ使用命令数を3で割って余りがあれば切り上げた数だけLrを左へずらす等の調整を行い(ステップ3947)、その結果をそのル−プを含む命令列の優先度ビットベクトルPrに加算する(ステップ3948)。このようにして、一つの抽象レジスタrに対する割り付け優先度ビットベクトルPrを算出する。この処理を各々の抽象レジスタに対して実行する。   If the retrieved ArmCode is a loop start instruction (step 3934), the priority bit vector in the loop of the register r is represented by Lr, and Lr is calculated in the same procedure as in steps 3930 to 3944. calculate. The Lr obtained in this manner is adjusted by dividing the number of instructions using abstract registers in the loop by 3 and shifting Lr to the left by the rounded-up number if there is a remainder (step 3947). The result is added to the priority bit vector Pr of the instruction sequence including the loop (step 3948). In this way, the allocation priority bit vector Pr for one abstract register r is calculated. This process is executed for each abstract register.

図19は、抽象レジスタマシン命令 ArmCode の実行時の効率を向上させるオブジェクト最適化の一つの段階を示す実施例である。ArmCode の列をまず、制御の流入点や分岐点で区切り、多くの基本ブロックに分割する(ステップ3952)。
各基本ブロックは、先頭の命令から最後の命令まで、常に一直線に実行されるという特徴を持つ。図14から図16では、3712から3722、3724から3748、3750から3778等がそれぞれ一つの基本ブロックであり、各々の先頭にはそれらの接続関係を示す生成制御命令 bblock がついている。ある基本ブロックbが実行されるのは必ず他の基本ブロックaが実行された直後である場合、基本ブロックaの後ろにbを接続してゆくことを繰り返してできる基本ブロックの列を拡張基本ブロックと呼ぶことにする。3724 から始まる基本ブロックと 3750 から始まる基本ブロック、3780 から始まる基本ブロックでは、後ろのものは前のものが実行された直後に実行されるので、この3つの基本ブロックをつないだものは拡張基本ブロックである。3840 から始まる基本ブロックのように、先行する基本ブロックや後続する基本ブロックが一意に確定できないため拡張できない基本ブロックは、それ単独で一つの拡張基本ブロックとする。次に、この拡張基本ブロック内で共通式の削除を行う。そのため、第一の拡張基本ブロックからはじめて(ステップ3954)、その拡張基本ブロック内での共通式を摘出し(ステップ3956)、後続の共通式を既出の共通式の結果を表すレジスタや変数で置き換える(ステップ3958)。これを最後の拡張基本ブロックに到達するまで繰り返す(ステップ3960,3962)。この処理は、前掲の Aho, Sethi, Ullman の著書に述べられている方法を ArmCode に適用することによって実現できる。
FIG. 19 is an embodiment showing one stage of object optimization for improving the efficiency in executing the abstract register machine instruction ArmCode. First, the ArmCode column is divided at control inflow points and branch points, and divided into a number of basic blocks (step 3952).
Each basic block is characterized in that it is always executed in a straight line from the first instruction to the last instruction. In FIGS. 14 to 16, 3712 to 3722, 3724 to 3748, 3750 to 3778, and the like are one basic block, respectively, and at the beginning of each basic block, a generation control instruction bblock indicating their connection relation is attached. If a certain basic block b is always executed immediately after another basic block a is executed, a series of basic blocks which can be repeatedly connected to b after the basic block a is expanded to an extended basic block. I will call it. In the basic blocks starting from 3724, 3750, and 3780, the last one is executed immediately after the previous one is executed. It is. A basic block that cannot be extended because a preceding basic block or a subsequent basic block cannot be uniquely determined, such as a basic block starting from 3840, is considered as one extended basic block by itself. Next, the common expression is deleted in the extended basic block. Therefore, starting from the first extended basic block (step 3954), a common expression in the extended basic block is extracted (step 3956), and the subsequent common expression is replaced with a register or a variable representing the result of the common expression. (Step 3958). This is repeated until the last extended basic block is reached (steps 3960 and 3962). This can be achieved by applying the method described in the book by Aho, Sethi and Ullman to ArmCode.

図20から図21は、図14から図16の命令列をこのような処理や後で述べる最適化処理を行って変換した抽象レジスタ命令列である。図14から図16、および図20、図21を使って、上記の最適化処理を具体例で説明する。図14から図16の抽象レジスタ Ar8 の値の算出命令列3758,3760とAr12 の算出命令列3790,3792、Ar15 の算出命令列3828,3830は、 Ar6 の算出命令列3734,3736と同じであり、Ar9 を求める命令3764は は Ar7 を求める命令3740と同じである。同様に、Ar13 は Ar11、Ar15 と Ar16 は Ar5 と同じである。従って、図20、図21では、4098でAR6とAR11を再使用し、4076でAR7を再使用し、4108と4110,4112でAR5を再使用するというように、これらの抽象レジスタは同じ値を持つ抽象レジスタで置き換えており、AR8とAR12、AR15、AR9、AR13、AR15、AR16の値を求める命令列を削除している。この置き換えに伴い、抽象レジスタの使用頻度と使用位置が変わるので、各抽象レジスタの割付優先順位も変わる。図20、図21の4028等のalloc命令はこれをも示している。   FIGS. 20 to 21 show an abstract register instruction sequence obtained by converting the instruction sequences of FIGS. 14 to 16 by performing such processing and the optimization processing described later. The above-described optimization processing will be described using a specific example with reference to FIGS. 14 to 16 and FIGS. The instruction sequence 3758, 3760 for calculating the value of the abstract register Ar8 and the instruction sequence 3790, 3792 for calculating Ar12, and the instruction sequence 3828, 3830 for Ar15 in FIGS. 14 to 16 are the same as the instruction sequence 3734, 3736 for Ar6. The instruction 3764 for Ar9 is the same as the instruction 3740 for Ar7. Similarly, Ar13 is the same as Ar11, and Ar15 and Ar16 are the same as Ar5. Thus, in FIGS. 20 and 21, these abstract registers have the same value, such as reusing AR6 and AR11 at 4098, reusing AR7 at 4076, and reusing AR5 at 4108, 4110, and 4112. It has been replaced with an abstract register, and the instruction sequence for the values of AR8 and AR12, AR15, AR9, AR13, AR15, and AR16 has been deleted. With this replacement, the use frequency and use position of the abstract registers change, so the allocation priority of each abstract register also changes. An alloc instruction such as 4028 in FIGS. 20 and 21 also indicates this.

図20と図21では、図14から図16の ArmCode に対して、さらにループ内不変式をループ外に移動するとともに、分岐最適化を行っている。図22は、その過程を示すフローチャートである。フロー解析によってループを検出したあと(ステップ4202)、内側のループからはじめて(ステップ4204)、ループ内不変式を検出し(ステップ4206)、それをループ開始直前に移動して(ステップ4208)、ループ内で同じ計算を何度も行うことを回避している。これを一番外側のループに至るまで繰り返す(ステップ4210,4212)。図14から図16の Ar10 と Ar11、Ar17 は3728で始まり3874で終わるループの中では値が変わらないので、それを算出する命令列3770と3786、3860をループの前に移動してある。それらが図20から図21の4038と4044、4050である。   In FIGS. 20 and 21, the in-loop invariant expression is further moved out of the loop and the branch optimization is performed on the ArmCodes of FIGS. FIG. 22 is a flowchart showing the process. After detecting a loop by flow analysis (step 4202), starting from the inner loop (step 4204), detecting an invariant in the loop (step 4206), and moving it immediately before the start of the loop (step 4208), Avoids doing the same calculation over and over. This is repeated up to the outermost loop (steps 4210 and 4212). Since the values of Ar10, Ar11, and Ar17 in FIGS. 14 to 16 do not change in the loop starting at 3728 and ending at 3874, the instruction sequences 3770, 3786, and 3860 for calculating them are moved before the loop. These are 4038, 4044, and 4050 in FIGS.

図14から図16では、3778にある BrGe での分岐先 L3(3806)には L5 への無条件分岐命令(3808)があるので、この BrGe の分岐先を L5 とすることにより、L3 での無条件分岐命令(3808)を削除できる。また、3802の Jump の跳び先 L4(3812) にも L5 への無条件分岐命令(3814)があるので、この Jump の分岐先を L5 とすることにより、L4 での無条件分岐命令(3814)も削除できる。このようにして、実行効率を向上させるために抽象レジスタマシンでの命令列効率化を行った結果が図20と図21に示す ArmCode である。   In FIGS. 14 to 16, since the branch destination L3 (3806) at BrGe at 3778 has an unconditional branch instruction (3808) to L5, by setting the branch destination of this BrGe to L5, The unconditional branch instruction (3808) can be deleted. Since the jump destination L4 (3812) of the jump of 3802 also has an unconditional branch instruction (3814) to L5, by setting the jump destination of this jump to L5, the unconditional branch instruction (3814) at L4 Can also be deleted. ArmCode shown in FIG. 20 and FIG. 21 is a result obtained by increasing the efficiency of the instruction sequence in the abstract register machine in order to improve the execution efficiency.

次に、このようにして作った抽象レジスタ命令列(ArmCode-R の命令列)から実際の計算機の機械命令列を生成する方法について説明する。   Next, a method of generating a machine instruction sequence of an actual computer from the abstract register instruction sequence (ArmCode-R instruction sequence) thus created will be described.

図23は、ある機種Aにおける物理レジスタの種別を示したものである。4260は算術演算の用途 RcArith として使える物理レジスタが8番から23番までのレジスタであることを示している。同様にして、4262の RcAddr は番地計算用に使えるレジスタを示し、4264の RcSect はセクションの開始位置を示すのに使えるレジスタを示し、4266の RcReturn は 副プログラムからの復帰に使うレジスタ、4268の RcFuncval は関数値を入れるのに使えるレジスタ、4270の RcParm は引数を入れるのに使えるレジスタ、4272の RcNosave は副プログラム参照時に待避・回復されないレジスタ、4274の RcTemp は一時的に使うレジスタ、4276の RcFixed は用途の固定されたレジスタ、4278の RcAny はレジスタ割付の対象となるすべてのレジスタを表す。   FIG. 23 shows the types of physical registers in a certain model A. Reference numeral 4260 indicates that the physical registers that can be used as the arithmetic operation RcArith are the 8th to 23rd registers. Similarly, RcAddr at 4262 indicates a register that can be used for address calculation, RcSect at 4264 indicates a register that can be used to indicate the start position of a section, RcReturn at 4266 indicates a register used to return from a subprogram, and RcFuncval at 4268 Is a register that can be used to store function values, 4270's RcParm is a register that can be used to store arguments, 4272's RcNosave is a register that is not saved or restored when referring to subprograms, 4274's RcTemp is a temporary register, 4276's RcFixed is The fixed-purpose register, RcAny in 4278, represents all registers to be assigned.

図24は、機種Aの物理レジスタと抽象レジスタとの対応関係の一部を示したものである。抽象レジスタ4280は、任意個数使えるものとしているが、機種Aの物理レジスタ4282の数は32個に限定されている。関数値を入れる抽象レジスタ4284を Funcval0, Funcval1 で表すと、それを物理レジスタ2と3に対応付ける(4290、4291)。引数を入れる抽象レジスタ4285として Param0, Param1, ... Param p が使われているとすると、それらを物理レジスタ4から7に対応付ける(4291、4292)。算術演算の抽象レジスタ4286として Ar0, Ar1, ... Ar q が使われているすると、それらを物理レジスタ8から23までに対応付ける(4292、4294)。番地計算用の抽象レジスタ4287として Addr0, Addr1, ... Addr r が使われているとすると、それらを物理レジスタ16から23に対応付ける(4293、4296)。セクション開始位置を示す抽象レジスタ4288として Sect0, Sect1, ... Sect s が使われているとすると、それらを物理レジスタ20から23に割り付ける(4295、4297)。ここで、引数用抽象レジスタの数 p+1 や、算術演算用抽象レジスタの数 q+1 等は、物理レジスタの数に拘束されることなく、ソ−スプログラムで要求される数だけ使っている。この抽象レジスタをどのようにして対象機種の物理レジスタに割り付けるかは、後で図26から図29で説明する。   FIG. 24 shows a part of the correspondence between the physical registers of the model A and the abstract registers. Although any number of abstract registers 4280 can be used, the number of physical registers 4282 of model A is limited to 32. When the abstract register 4284 for storing the function value is represented by Funcval0 and Funcval1, it is associated with the physical registers 2 and 3 (4290, 4291). Assuming that Param0, Param1,... Param p are used as the abstract registers 4285 for storing arguments, they are associated with physical registers 4 to 7 (4291, 4292). If Ar0, Ar1,... Ar q are used as abstract registers 4286 for arithmetic operations, they are associated with physical registers 8 to 23 (4292, 4294). If Addr0, Addr1,... Addrr are used as abstract registers 4287 for address calculation, they are associated with physical registers 16 to 23 (4293, 4296). If Sect0, Sect1,... Sects are used as the abstract register 4288 indicating the section start position, they are allocated to the physical registers 20 to 23 (4295, 4297). Here, the number of abstract registers for arguments p + 1, the number of abstract registers for arithmetic operations q + 1, and the like are not limited by the number of physical registers, but can be used as many as required by the source program. I have. How this abstract register is assigned to the physical register of the target model will be described later with reference to FIGS.

図25は、機械語生成をパタン照合で行う方式を示す図である。この方式では、パタン照合を行う部分4556と、機械命令選択規則の表4630を持ち、それに抽象レジスタマシン命令列4640を与えると、機械語プログラム4650を生成する。機械命令選択規則の表4630には、入力パタンとそれに対する出力パタンが対応付けて入れてある。抽象レジスタマシンの命令列4640から一つの命令4602を取り出したとすると、機械命令生成規則の入力パタンでそれに合致するものを探す。この例では、第i番目の生成規則4632の入力パタンiが合致するので、それに対応する生成パタンiに従って置き換えを行い、機械命令4652を生成する。この際、抽象レジスタを物理レジスタに置き換えるとか、前後の状況に合わせて生成仕方を変える等の処理を行うが、それについては、後で図29から図35で説明する。   FIG. 25 is a diagram illustrating a method of performing machine language generation by pattern matching. In this system, a pattern matching section 4556 and a machine instruction selection rule table 4630 are provided. When an abstract register machine instruction sequence 4640 is provided to the section 4556, a machine language program 4650 is generated. In the machine instruction selection rule table 4630, an input pattern and an output pattern corresponding to the input pattern are entered. Assuming that one instruction 4602 is extracted from the instruction sequence 4640 of the abstract register machine, a match is found in the input pattern of the machine instruction generation rule. In this example, since the input pattern i of the i-th generation rule 4632 matches, the replacement is performed according to the corresponding generation pattern i, and the machine instruction 4652 is generated. At this time, processing such as replacing the abstract register with a physical register or changing the generation method in accordance with the situation before and after is performed, which will be described later with reference to FIGS. 29 to 35.

図26は、機種A向けの機械命令選択規則の一部を示したものである。これは、4300や4312等に示す抽象レジスタマシンの命令列の後ろに、{}で囲んで、それに対応する機械語命令の生成仕方をC言語に近い形で示す形態をとる。4312や4316等の先頭にある|記号は、命令列の場合分けを示す記号である。抽象レジスタマシンのオペランド Reg1 や C, V 等は{}の中では$記号をつけて $Reg1, $C, $V 等のように表されている。   FIG. 26 shows a part of a machine instruction selection rule for model A. This takes a form in which the method of generating a machine language instruction corresponding to the instruction sequence of the abstract register machine shown in 4300, 4312, or the like is represented in a form close to that of the C language by enclosing it in parentheses. The | symbol at the head of 4312, 4316, etc. is a symbol indicating the case of an instruction sequence. The operands Reg1 and C, V, etc. of the abstract register machine are represented as $ Reg1, $ C, $ V, etc. in {}.

具体的に説明すると、先頭の4300は、定数をロードする抽象レジスタマシン命令に対する機種Aの機械命令の生成仕方を、4302で始まる{}内の文の列で示すものである。そこでは、定数が0かそれより大きく 65536 未満であれば4304の指定に従って機械命令を生成し、そうでなければ4308と4310の指定に従って機械命令を生成することを表している。この規則を図20の命令4030に適用して生成されたのが図28の機械命令4500である。この例では、レジスタ割付の結果として、図27の4400に示すように、抽象レジスタ Ar5 には物理レジスタ $08, Ar6 には $17 等と、それぞれの種別に対応する物理レジスタが割り付けられている。   More specifically, the first 4300 indicates the generation method of the machine instruction of the model A for the abstract register machine instruction for loading a constant by a sequence of statements in {} starting with 4302. In this case, if the constant is 0 or more and less than 65536, a machine instruction is generated in accordance with the designation of 4304, and otherwise, a machine instruction is generated in accordance with the specifications of 4308 and 4310. The machine instruction 4500 in FIG. 28 is generated by applying this rule to the instruction 4030 in FIG. In this example, as a result of register allocation, as shown at 4400 in FIG. 27, physical registers $ 08 and $ 17 are allocated to the abstract registers Ar5 and $ 6, respectively.

要求された数だけの物理レジスタがないときには、alloc による要求時には物理レジスタを割り付けず、それが実際に使われる時に再度割付処理を行う。図20の4046で抽象レジスタ Ar17 に物理レジスタ割付要求を出しているが、ここでは割付後にも温存しておくべきレジスタの数を2と指定しており、優先度もあまり高くないので、この時点では割付ができなかったとすると、4048の条件が満たされないので、4050ではロード命令は生成されず、Ar17 が変数nの値を表すことが記録される。Ar17 を使う4112の比較命令のところでは、まだ物理レジスタが割り付けられていないので、この抽象レジスタ命令を処理する時にレジスタ割付処理が再度実行され、この時点では Ar17 の優先度は最も高くなっているので割付が実行され、その値を設定するロード命令も生成される。この例で Ar17 に
物理レジスタ$09が割り付けられたとすると、4046での記録に従って、そこに変数nの値をロードする命令が生成される。その結果、4526の
sub $24,$08,$12
の命令の代わりに
lw $09,n($16)
sub $24,$08,$09
の2命令が生成される。このように物理レジスタが割り付けられていない抽象レジスタを使うときにそれに物理レジスタを割り付けてそこに値を設定するのは、図26の機械命令選択規則の4304等で使われている関数genの中で行う。
If there are not the required number of physical registers, the physical registers are not allocated when requested by alloc, and the allocation process is performed again when they are actually used. At 4046 in FIG. 20, a physical register allocation request is issued to the abstract register Ar17. Here, the number of registers to be preserved after allocation is specified as 2, and the priority is not so high. If the assignment could not be made, the condition of 4048 would not be satisfied, so that no load instruction was generated at 4050, and it was recorded that Ar17 represents the value of the variable n. At the 4112 comparison instruction that uses Ar17, since no physical register has been allocated yet, the register allocation process is executed again when processing this abstract register instruction, and at this point Ar17 has the highest priority Therefore, the assignment is executed, and a load instruction for setting the value is also generated. Assuming that the physical register $ 09 is allocated to Ar17 in this example, an instruction to load the value of the variable n is generated according to the record in 4046. As a result, 4526
sub $ 24, $ 08, $ 12
Instead of the instruction
lw $ 09, n ($ 16)
sub $ 24, $ 08, $ 09
Are generated. When an abstract register to which no physical register is assigned is used, a physical register is assigned to the abstract register and a value is set there. This is because the function gen used in 4304 of the machine instruction selection rule shown in FIG. Do with.

機種A用のインストーラは、このようにして、抽象オブジェクトプログラムから機種A用の機械語プログラムを生成する。その際、対象計算機に合わせて、最適な命令系列の選択や、物理レジスタの最適利用を図る。この例では、図26の生成規則4302で定数の大きさに合わせて生成する命令系列を変えるとか、使える物理レジスタの種類と数に合わせて抽象レジスタとの対応付けを行い、一度値を設定した $11 等の物理レジスタはできるかぎり何度も利用するようにしている。機械語に変換したあと、機種固有の表現に伴って生ずる共通式があれば、その
再計算を削除する等の最適化処理を行なうが、その処理内容は、図19で述べたのと同様である。
In this way, the installer for model A generates the machine language program for model A from the abstract object program. At this time, the optimal instruction sequence is selected and the physical registers are optimally used in accordance with the target computer. In this example, the instruction sequence to be generated is changed according to the size of the constant in the generation rule 4302 in FIG. 26, or the abstract register is associated with the type and number of usable physical registers, and the value is set once. We try to use physical registers such as $ 11 as many times as possible. After conversion into machine language, if there is a common expression that accompanies a model-specific expression, optimization processing such as deleting the recalculation is performed. The processing is the same as that described in FIG. is there.

図29は、機械語生成の処理過程を示すフローチャートである。初期設定(ステップ4552)のあと、抽象オブジェクトプログラムを構成するArmCode命令を一つ取り出し(ステップ4554)、図26に示すような機械語選択規則に書かれた ArmCode列のパタンのどれに適合するかを調べるパタン照合(ステップ4556)を行う。読んだ部分に適合するパタンがなければその時の照合状態を記録し(ステップ4560)、次のArmCode命令取り出しへと進む。適合するパタンがあれば、そのパタンに対する機械語生成の記述に従って、生成処理の準備を行い(ステップ4562)、記述された内容がレジスタ割付を要求するものならばその処理を行い(ステップ4564)、メモリ割付を要求するものならばその処理を行い(ステップ4566)、具体的な機械命令の生成を要求するものならばその処理を行い(ステップ4568)、デバッグ情報等に関する制御情報の付加を要求するものならばそれらを機械語プログラムに付加し(ステップ4570)、レジスタ割付やメモリ割付、あるいは生成すべき命令の選択等に関する生成制御情報の設定を要求するものならばそれらの設定を行う(ステップ4572)。そして、機械語生成の記述に記された次の文へ進むことを繰り返し(ステップ4576)、そこに記された動作の終わりに達すれば(ステップ4574)、このパタンに対する生成処理の後始末を行い(ステップ4578)、照合状態を現状に合うよう変更して(ステップ4580)、パタン照合処理に戻る。抽象オブジェクトプログラムが全部処理されたことがわかれば機械語生成を終了させる(ステップ4582)。   FIG. 29 is a flowchart showing a process of generating a machine language. After the initial setting (step 4552), one ArmCode instruction constituting the abstract object program is extracted (step 4554), and which of the patterns in the ArmCode sequence described in the machine language selection rule as shown in FIG. Is performed (step 4556). If there is no pattern that matches the read portion, the collation state at that time is recorded (step 4560), and the process proceeds to the next ArmCode instruction fetch. If there is a matching pattern, preparation for generation processing is prepared in accordance with the description of the machine language generation for the pattern (step 4562), and if the described contents require register allocation, the processing is performed (step 4564). If the request requires memory allocation, the process is performed (step 4566). If the request requires generation of specific machine instructions, the process is performed (step 4568), and control information relating to debug information and the like is requested. If these are required, they are added to the machine language program (step 4570), and if they require setting of generation control information related to register allocation, memory allocation, or selection of an instruction to be generated, these settings are made (step 4572). ). Then, the process repeatedly proceeds to the next sentence described in the description of the machine language generation (step 4576). When the end of the operation described there is reached (step 4574), the generation process for this pattern is cleaned up. (Step 4578), the matching state is changed to match the current state (Step 4580), and the process returns to the pattern matching processing. If it is found that all of the abstract object programs have been processed, the generation of the machine language is terminated (step 4582).

図30は、ArmCode から上記のようにして機械語を生成するインスト−ラの内部構造を示す図である。インスト−ラ4530は、ArmCode の列4531とその機種の機械命令生成規則4532から機械語4549を生成する。照合は基本的には状態遷移表を利用する形をとる。そのため、状態遷移表作成プログラム4533によって、機械命令生成規則4532を一旦状態遷移表4535に変換する。この状態遷移表4535は、入力としての個々の ArmCodeと状態番号の組合せに対し、実行すべきアクションと次に遷移すべき状態番号を示す表である。状態遷移に基づくパタン照合を行う部分では、入力される ArmCode とその時の状態から状態遷移表によってアクションル−チン4538の内の適切なル−チンを選択し実行する。そのときの状態遷移経歴を記録するのが状態スタック4544である。対象機種固有のレジスタ用途指定を記載しておくのがレジスタ用途指定表4546であり、処理中のプログラムにおける抽象レジスタと物理レジスタの対応関係を記録するのがレジスタ対応表4548である。   FIG. 30 is a diagram showing the internal structure of an installer for generating a machine language from ArmCode as described above. The installer 4530 generates a machine language 4549 from the ArmCode column 4531 and the machine instruction generation rule 4532 of the model. The collation basically takes a form using a state transition table. Therefore, the machine instruction generation rule 4532 is temporarily converted into the state transition table 4535 by the state transition table creation program 4533. This state transition table 4535 is a table showing an action to be executed and a state number to be changed next for a combination of each ArmCode and a state number as input. In the part for performing pattern matching based on the state transition, an appropriate routine among the action routines 4538 is selected and executed from the input ArmCode and the state at that time according to the state transition table. The state stack 4544 records the state transition history at that time. The register use specification table 4546 records the register use specification specific to the target model, and the register correspondence table 4548 records the correspondence between the abstract registers and the physical registers in the program being processed.

図31は、前述の機種Aとは命令体系の異なるある機種Bにおける物理レジスタの種別を示したものである。4600は算術演算の用途 RcArith として使える物理レジスタが1番から7番までと16番から23番までのレジスタであることを示している。同様にして、4602の RcAddr は番地計算用に使えるレジスタを示し、4614の RcTemp は一時的に使うレジスタを示すというように、第23図に示す機種Aの場合とは異なった物理レジスタの使い方が指定されている。   FIG. 31 shows the types of physical registers in a certain model B having a different instruction system from the model A described above. Reference numeral 4600 indicates that the physical registers that can be used as the arithmetic operation RcArith are registers 1 to 7 and 16 to 23. Similarly, RcAddr of 4602 indicates a register that can be used for address calculation, and RcTemp of 4614 indicates a register that is temporarily used. Is specified.

図32は、機種Bの物理レジスタと抽象レジスタとの対応関係の一部を図示したものである。機種Aの場合と同様に、抽象レジスタ4620は、任意個数使えるものとしているが、機種Bの物理レジスタ4622の数は32個に限定されている。関数値を入れる抽象レジスタ4624を Funcval0, Funcval1 で表すと、それを物理レジスタ8と9に対応付ける(4631、4632)。引数を入れる抽象レジスタ4625として Param0, Param1, ... Param p が使われて
いるとすると、それらを物理レジスタ24から29に対応付ける(4633、4634)。
算術演算の抽象レジスタ4626として Ar0, Ar1, ... Ar q が使われているすると、それらを物理レジスタ1から7までと16から23までに対応付ける(4635、4636、4637、4638)。番地計算用の抽象レジスタ4627としての Addr0, Addr1, ... Addr r も同様に、物理レジスタ1から7までと16から23までに対応付ける(4639、4640、4641、4642)。
FIG. 32 illustrates a part of the correspondence between the physical registers of the model B and the abstract registers. As in the case of the model A, any number of abstract registers 4620 can be used, but the number of the physical registers 4622 of the model B is limited to 32. When the abstract register 4624 for storing the function value is represented by Funcval0 and Funcval1, it is associated with the physical registers 8 and 9 (4631, 4632). Assuming that Param0, Param1,... Param p are used as the abstract registers 4625 for storing arguments, they are associated with the physical registers 24 to 29 (4633, 4634).
If Ar0, Ar1,... Ar q are used as abstract registers 4626 for arithmetic operations, they are mapped to physical registers 1 to 7 and 16 to 23 (4635, 4636, 4637, 4638). Similarly, Addr0, Addr1,... Addrr as abstract registers 4627 for address calculation are associated with physical registers 1 to 7 and 16 to 23 (4639, 4640, 4641, 4642).

図33は、機種B向けの機械命令選択規則の一部を示したものである。4700は定数をロードするArmCode命令に対する機械命令の生成仕方を示し、4712はメモリからのロードに対する機械命令、4716はレジスタReg1とReg2を加えた結果をReg3に入れるArmCode命令列に対する機械命令の生成仕方を示すというように、図20から図21の抽象オブジェクトプログラムの機械語プログラムへの変換に必要な機械命令選択規則を表している。図34は、図20から図21のプログラムにおける抽象レジスタに対する機種Bの物理レジスタの対応関係を4780等で示したものであり、alloc、free等の生成制御命令によってレジスタ割付を行った結果である。   FIG. 33 shows a part of a machine instruction selection rule for model B. 4700 shows how to generate a machine instruction for an ArmCode instruction to load a constant, 4712 is a machine instruction for loading from memory, and 4716 is a method for generating a machine instruction for an ArmCode instruction sequence that puts the result of adding the registers Reg1 and Reg2 into Reg3. Indicates the machine instruction selection rules necessary for converting the abstract object program of FIG. 20 to the machine language program of FIG. 21. FIG. 34 shows the correspondence between the abstract registers and the physical registers of the model B in the programs of FIGS. 20 to 21 by 4780 or the like, and is a result of register allocation by generation control instructions such as alloc and free. .

図33の規則4700を図20の命令4030に適用して生成されたのが図35の機械命令4800であり、規則4722を図20の4032に適用して得られたのが図35の機械命令4802である。このようにして、機種B用のインストーラでは、図20から図21の抽象オブジェクトプログラムに図33の規則を適用してゆくことにより、図35の機種B用の機械語プログラムを生成する。   The machine instruction 4800 of FIG. 35 is generated by applying the rule 4700 of FIG. 33 to the instruction 4030 of FIG. 20, and the machine instruction of FIG. 35 is obtained by applying the rule 4722 to the instruction 4032 of FIG. 4802. Thus, the installer for model B generates the machine language program for model B in FIG. 35 by applying the rules in FIG. 33 to the abstract object programs in FIGS.

上述のようにして、同一の抽象オブジェクトプログラムから、機種A用のインストーラは機種A用の機械語プログラムを生成し、機種B用のインストーラは機種B用の機械語プログラムを生成する。本実施例では、2つのインスト−ラの間では、機械命令選択規則と物理レジスタ用途指定は異なるが、図29に示す処理内容は同じである。   As described above, from the same abstract object program, the installer for model A generates a machine language program for model A, and the installer for model B generates a machine language program for model B. In this embodiment, the machine instruction selection rule and the physical register use designation are different between the two installers, but the processing contents shown in FIG. 29 are the same.

本実施例によれば、大域的最適化やレジスタ割付に関する最適化の処理の大部分が対象機種に依存しないコンパイラで行なわれ、かつ、コンパイラでのフロ−解析やレジスタ割付等に関する情報がインスト−ラに渡されるので、インスト−ラでは、あまり複雑な処理をしなくても、実行効率のよい機械語プログラムを生成できる。従って、プログラムを起動するたびに、インスト−ラによって、機種非依存な抽象オブジェクトプログラムから対象機種向けの機械語プログラムを生成しても、実行効率やインスト−ラによる処理時間が問題となることはない。   According to this embodiment, most of the optimization processing relating to global optimization and register allocation is performed by a compiler independent of the target model, and information on flow analysis and register allocation by the compiler is installed. Therefore, the installer can generate a machine language program with high execution efficiency without performing much complicated processing. Therefore, even if a machine language program for a target model is generated from a model-independent abstract object program by the installer every time the program is started, the execution efficiency or the processing time by the installer may not be a problem. Absent.

本実施例の抽象オブジェクトプログラムの形式でソフトウェアを配布すれば、複数の機種に対して同一の抽象オブジェクトプログラムを配布すればよくなり、機種ごとにソフトウェアを調整またはコンパイルしなおす必要はないので、保守と管理が著しく容易となる。   If the software is distributed in the form of the abstract object program of the present embodiment, the same abstract object program can be distributed to a plurality of models, and there is no need to adjust or recompile the software for each model. And management becomes remarkably easy.

また、本実施例によれば、抽象オブジェクトプログラムは、ソ−スプログラムに比べて、処理操作が細かいレベルに分解されており、その構造と記述順序も異なるので、抽象オブジェクトプログラムからソ−スプログラムを復元することはほとんど不可能である。従って、抽象オブジェクトプログラムの形でソフトウェアを利用者に配布すれば、ソ−スプログラムに含まれるソフトウェアの実現方式やアルゴリズムを秘匿したまま、同一プログラムを複数の機種で実行することや、使用機種を変更することを利用者側で実現できる。   Further, according to the present embodiment, the abstract object program is divided into finer processing operations than the source program, and its structure and description order are different. Is almost impossible to restore. Therefore, if the software is distributed to users in the form of an abstract object program, the same program can be executed by a plurality of models while the implementation method and algorithm of the software included in the source program are kept secret. The change can be realized on the user side.

本発明のインストーラを用いれば、複数機種システムで、同一のソースレベルデバッグシステムが利用可能となる。以下、その実施例について図36から図45を用いて説明する。   By using the installer of the present invention, the same source level debugging system can be used in a plurality of types of systems. The embodiment will be described below with reference to FIGS.

図36は、本発明のインストーラを適用したデバッグシステムのブロック図である。デバッガ5100は、ソースプログラム5101をコンパイルしてできた抽象オブジェクトプログラム5102をデバッグするのに用いられる。インストーラ5103は、抽象オブジェクトプログラムを機械語プログラム5107に変換するのに用いられる。主記憶装置5104は、機械語プログラム5107およびデバッグ情報テーブル5108を格納するのに用いられる。表示装置5105は結果をユーザに表示するのに、入力装置5106はユーザからの入力を受け付けるのにそれぞれ使われる。   FIG. 36 is a block diagram of a debugging system to which the installer of the present invention has been applied. The debugger 5100 is used to debug the abstract object program 5102 created by compiling the source program 5101. The installer 5103 is used to convert an abstract object program into a machine language program 5107. The main storage device 5104 is used to store a machine language program 5107 and a debug information table 5108. The display device 5105 is used to display the result to the user, and the input device 5106 is used to receive the input from the user.

図37は、デバッガの動作を示すフローチャートである。まず、抽象オブジェクトプログラム5102を読み込む(ステップ5120)。抽象オブジェクトプログラムにはソースプログラム上での位置等を示すソース情報が含まれているので、次に、これに基づいてソース・抽象オブジェクト対応テーブルを作成する(ステップ5121)。次に、読み込んだ抽象オブジェクトプログラムを入力としてインストーラを実行し、機械語プログラムを主記憶装置上に作成する(ステップ5122)。その際、抽象オブジェクトプログラムと機械語プログラムの対応をとるための、抽象オブジェクト・機械語対応テーブルを作成する(ステップ5123)。なお、本実施例では、ソース・抽象オブジェクト対応テーブルと、抽象オブジェクト・機械
語対応テーブルは合わせて1つのテーブル(ソース・抽象オブジェクト・機械語対応テーブル)として構成する。このテーブルはデバッグ情報テーブル5108に含まれる。次に、ユーザが、必要なデバッグ用コマンドを入力するので(ステップ5124)、そのコマンドの種類に従って分岐をする(ステップ5125)。表示コマンドの場合は表示処理を行い(ステップ5126)、ブレークポイント設定コマンドの場合はブレークポイント設定処理を行い(ステップ5127)、実行コマンドの場合は実行処理を行い(ステップ5128)、その処理が終了した後、ステップ5125から繰り返す。これらのコマンド処理については図38から図43を用いて詳しく説明する。入力コマンドが終了コマンドであった場合は終了する。
FIG. 37 is a flowchart showing the operation of the debugger. First, the abstract object program 5102 is read (step 5120). Since the abstract object program includes source information indicating a position on the source program, a source / abstract object correspondence table is created based on the source information (step 5121). Next, an installer is executed by using the read abstract object program as an input, and a machine language program is created on the main storage device (step 5122). At this time, an abstract object / machine language correspondence table is created for associating the abstract object program with the machine language program (step 5123). In this embodiment, the source / abstract object correspondence table and the abstract object / machine language correspondence table are combined into one table (source / abstract object / machine language correspondence table). This table is included in the debug information table 5108. Next, the user inputs a necessary debugging command (step 5124), and branches according to the type of the command (step 5125). In the case of a display command, display processing is performed (step 5126), in the case of a breakpoint setting command, breakpoint setting processing is performed (step 5127), and in the case of an execution command, execution processing is performed (step 5128), and the processing ends. After that, repeat from step 5125. These command processes will be described in detail with reference to FIGS. If the input command is an end command, the process ends.

図38は表示コマンドの例である。この例は変数iの値を表示するコマンドであり、表示コマンド名5131と、変数名5132とからなる。   FIG. 38 shows an example of the display command. This example is a command for displaying the value of the variable i, and includes a display command name 5131 and a variable name 5132.

図39は、表示処理のフローチャートであり、図37のステップ5126の処理を詳しくしたものである。まず、表示コマンド内の変数名を取りだす(ステップ5133)。次に、ソース・抽象オブジェクト・機械語対応テーブル(以降、単に対応テーブルと呼ぶこともある)を用いて、その変数の内容が格納されている主記憶上のアドレスに変換する(ステップ5134)。次に、ステップ5134で得られたアドレスの内容を主記憶から読み出し(ステップ5135)、読み出した内容を、変数のデータ型に従って変換し、表示装置上に表示する(ステップ5136)。   FIG. 39 is a flowchart of the display process, which details the process of step 5126 in FIG. 37. First, the variable name in the display command is extracted (step 5133). Next, using a source / abstract object / machine language correspondence table (hereinafter, also simply referred to as a correspondence table), the variable is converted into an address on the main memory where the content of the variable is stored (step 5134). Next, the content of the address obtained in step 5134 is read from the main memory (step 5135), the read content is converted according to the data type of the variable, and displayed on the display device (step 5136).

図40はブレークポイント設定コマンドの例である。この例はソースプログラムの文番号10の文にブレイクポイントを設定するコマンドであり、コマンド名5141と、文番号5142とからなる。   FIG. 40 shows an example of the breakpoint setting command. This example is a command for setting a breakpoint in the statement of statement number 10 of the source program, and includes a command name 5141 and a statement number 5142.

図41は、ブレークポイント設定処理のフローチャートであり、図37のステップ5127の処理を詳しくしたものである。まず、コマンド内の文番号を取り出す(ステップ5143)。そして、対応テーブル内の、その文番号にブレークポイントが設定されていることを示すフラグを、オンにする(ステップ5144)。   FIG. 41 is a flowchart of the break point setting process, and details the process of step 5127 in FIG. First, the statement number in the command is extracted (step 5143). Then, a flag indicating that a breakpoint is set at the statement number in the correspondence table is turned on (step 5144).

図42は実行コマンドの例である。これはプログラムの実行を行うコマンドであり、コマンド名5151だけからなる。   FIG. 42 shows an example of the execution command. This is a command for executing the program, and consists only of the command name 5151.

図43は、実行処理のフローチャートであり、図37のステップ5128の処理を詳しくしたものである。まず、1命令だけを実行する(ステップ5152)。これは、命令を1つだけ実行するごとに、トラップがかかって制御がデバッガに戻るようなモードでCPUを走らせることによって可能である。次に、命令のアドレスを取り出す(ステップ5153)。これはプログラムカウンタ等の内容を読み出すことによって可能である。最後に取りだしたアドレスにブレークポイントが設定されているかを、対応テーブルを使って調べ、設定されていなければステップ5152から繰り返し、設定されていれば終了する(ステップ5154)。   FIG. 43 is a flowchart of the execution process, which details the process of step 5128 in FIG. First, only one instruction is executed (step 5152). This is possible by running the CPU in a mode such that each time one instruction is executed, a trap is taken and control returns to the debugger. Next, the address of the instruction is extracted (step 5153). This is possible by reading the contents of the program counter and the like. It is checked by using the correspondence table whether a breakpoint is set at the address taken last, and if not set, the processing is repeated from step 5152, and if set, the processing is ended (step 5154).

図44はデバッグの対象となるソースプログラム例である。ここでは、各文の文番号5160と、その文のソースプログラムの記述5161を示している。文番号は、実際のソースプログラムの中には含まれない。なお、本実施例の以降の説明では、このソースプログラムを例として用いる。   FIG. 44 shows an example of a source program to be debugged. Here, the statement number 5160 of each statement and the description 5161 of the source program of the statement are shown. Statement numbers are not included in the actual source program. In the following description of the present embodiment, this source program will be used as an example.

図45はソース・抽象オブジェクト・機械語対応テーブルの一例を示した図である。対応テーブルは、(a)文情報テーブルと(b)変数情報テーブルとからなる。文情報テーブルは、ソースプログラム文番号5170と、抽象オブジェクトプログラム命令アドレス5171と、機械語プログラム命令アドレス5172およびブレークポイント設定フラグ5173の4つのフィールドを持つ。例えばエントリ5174は、ソースプログラムの文番号10の文が、抽象オブジェクトプログラムでは、「000060」というアドレスに位置する命令となり、機械語プログラムでは「000040」というアドレスに位置する命令となり、さらにその文にはブレークポイントが設定されていることを示している。   FIG. 45 is a diagram showing an example of the source / abstract object / machine language correspondence table. The correspondence table includes (a) a statement information table and (b) a variable information table. The statement information table has four fields: a source program statement number 5170, an abstract object program instruction address 5171, a machine language program instruction address 5172, and a breakpoint setting flag 5173. For example, in the entry 5174, the statement of statement number 10 of the source program becomes an instruction located at the address “0000060” in the abstract object program, and becomes an instruction located at the address “0000040” in the machine language program. Indicates that a breakpoint has been set.

変数情報テーブルは、変数名5175と、変数種別5176と、型5177と、行番号5178、および機械語アドレス5179の5つのフィールドを持つ。変数名5175はソースプログラムにおける変数名、変数種別5176は局所変数/大域変数の区別、型5177はその変数のデータ型、文番号5178はその変数が宣言されたソースプログラム上の位置を表す。機械語アドレス5179はその変数の機械語プログラム上でのアドレス情報を示すもので、局所変数の場合はフレームポインタからのオフセットを、大域変数の場合は変数領域ベースアドレスからのオフセットを表す。例えばエントリ5180は、変数iが、局所変数であり、型はintで、ソースプログラムの文番号4に位置し、機械語プログラム上ででフレームポインタからのオフセットが−4であることを示している。   The variable information table has five fields of a variable name 5175, a variable type 5176, a type 5177, a line number 5178, and a machine language address 5179. The variable name 5175 indicates the variable name in the source program, the variable type 5176 indicates the local variable / global variable, the type 5177 indicates the data type of the variable, and the statement number 5178 indicates the position in the source program where the variable is declared. The machine language address 5179 indicates address information of the variable on the machine language program. In the case of a local variable, an offset from a frame pointer is shown, and in the case of a global variable, an offset from a variable area base address is shown. For example, entry 5180 indicates that the variable i is a local variable, the type is int, it is located at statement number 4 of the source program, and the offset from the frame pointer is -4 on the machine language program. .

以上の説明からわかるように、本実施例のデバッグシステムは、機種に依存しない抽象オブジェクトプログラムを実行可能な機械語プログラムに変換するインストーラを備えているので、同一の抽象オブジェクトプログラムが複数機種システム上でデバッグできるという効果がある。   As can be seen from the above description, the debug system of the present embodiment includes an installer that converts a model-independent abstract object program into an executable machine language program. This has the effect that debugging can be performed.

本発明のインストーラを用いれば、ICカードまたはCD−ROM等で抽象オブジェクトプログラムを供給し、マシンに依存せずに即実行可能なシステムが提供できる。例えば、ゲームプログラムをICカードに内蔵し、インストーラを個々のマシンに内蔵することにより、同一のゲームを異なるマシン(ICカード装置)で実行することができる。以下ではそのような実施例を図46から図50を用いて説明する。   By using the installer of the present invention, it is possible to provide a system in which an abstract object program is supplied by an IC card or a CD-ROM or the like and can be immediately executed without depending on a machine. For example, by installing a game program in an IC card and installing an installer in each machine, the same game can be executed on different machines (IC card devices). Hereinafter, such an embodiment will be described with reference to FIGS.

図46は、本発明のインストーラを内蔵したICカード装置のブロック図である。本ICカード装置は、制御装置5000、主記憶装置5002、ICカード読み取り/書き込み装置5005、キーボード5006、表示装置5007よりなる。制御装置5000はCPU5001を内蔵している。また、主記憶装置5002はインストーラ5003を内蔵している。ICカード5008はICカード読み取り/書き込み装置5005を通じて、ICカード装置と接続される。また、ICカード内のプログラムは、インストーラによって、機械語プログラム5004として主記憶装置内に格納される。   FIG. 46 is a block diagram of an IC card device incorporating the installer of the present invention. This IC card device includes a control device 5000, a main storage device 5002, an IC card reading / writing device 5005, a keyboard 5006, and a display device 5007. The control device 5000 has a built-in CPU 5001. The main storage device 5002 includes an installer 5003. The IC card 5008 is connected to an IC card device through an IC card reading / writing device 5005. The program in the IC card is stored in the main storage device as a machine language program 5004 by the installer.

図47は、ICカード装置の外観図である。ユーザからの入力は、キーボード5006を通して行われ、また、ユーザへの応答は表示装置5007に表示される。ICカードはICカード挿入口5009から挿入される。   FIG. 47 is an external view of the IC card device. Input from the user is performed through the keyboard 5006, and a response to the user is displayed on the display device 5007. The IC card is inserted from the IC card insertion slot 5009.

図48は、ICカード5008の平面図である。接点5010を通してICカードとICカード読み取り/書き込み装置とデータをやりとりする。記憶素子5011には、ICカード装置で実行されるべき抽象オブジェクトプログラム5012と、データ5013が記憶されている。   FIG. 48 is a plan view of the IC card 5008. Data is exchanged between the IC card and the IC card reading / writing device through the contact point 5010. The storage element 5011 stores an abstract object program 5012 to be executed by the IC card device and data 5013.

図49は、ICカードに内蔵された抽象オブジェクトプログラムを実行するフローチャートである。まず、ICカード5008をICカード挿入口5009に挿入し(ステップ5020)、ICカードに内蔵されている抽象オブジェクトプログラムとデータを読み出す(ステップ5021)。次に制御部5000が、読み込まれた抽象オブジェクトプログラムを入力としてインストーラを起動する(ステップ5022)。その結果、実行可能な機械語プログラム5004が主記憶装置内にできるので、そのプログラムを実行する(ステップ5023)。実行の結果、必要ならば結果データをICカードに書き込み(ステップ5024)、カードを返却し(ステップ5025)、終了する。   FIG. 49 is a flowchart for executing the abstract object program built in the IC card. First, the IC card 5008 is inserted into the IC card insertion slot 5009 (step 5020), and the abstract object program and data contained in the IC card are read (step 5021). Next, the control unit 5000 starts the installer with the read abstract object program as an input (step 5022). As a result, an executable machine language program 5004 is created in the main storage device, and the program is executed (step 5023). As a result of the execution, if necessary, the result data is written into the IC card (step 5024), the card is returned (step 5025), and the process is terminated.

図50は、異なるCPUを持つICカード装置の間で、同一のICカード内の抽象オブジェクトプログラムを実行する場合の様子を示した図である。ここでは、互いに異なる命令体系を持つCPU−A5038とCPU−B5039をそれぞれ制御装置内に含む、ICカード装置AとICカード装置Bを例として用いる。ICカード5008内の抽象オブジェクトプログラムは、ICカード装置Aで使用する場合には、インストーラA5034によってCPU−Aの機械語からなる機械語プログラムA5036に変換される。一方、ICカード装置Bで使用される場合には、インストーラB5035によってCPU−Bの機械語からなる機械語プログラムB5037に変換される。   FIG. 50 is a diagram showing a state in which an abstract object program in the same IC card is executed between IC card devices having different CPUs. Here, an IC card device A and an IC card device B each including a CPU-A 5038 and a CPU-B 5039 having different instruction systems in the control device are used as examples. When used in the IC card device A, the abstract object program in the IC card 5008 is converted by the installer A5034 into a machine language program A5036 consisting of the machine language of the CPU-A. On the other hand, when used in the IC card device B, it is converted into a machine language program B5037 consisting of the machine language of the CPU-B by the installer B5035.

本実施例では、抽象オブジェクトプログラムを記憶する媒体としてICカードを用いたが、本発明はそれに限定されるものではなく、CD−ROMやフロッピー(登録商標)ディスクを用いたシステムにも適用できる。   In this embodiment, an IC card is used as a medium for storing an abstract object program. However, the present invention is not limited to this, and can be applied to a system using a CD-ROM or a floppy (registered trademark) disk.

図51は、ネットワ−ク結合された異機種計算機上での ArmCodeプログラムの共有を示す実施例である。   FIG. 51 is an embodiment showing the sharing of an ArmCode program on a heterogeneous computer connected to a network.

ネットワ−ク媒体1101には、ファイルサーバ1102、及び、実行計算機システム(ここでは、計算機システムA1103、及び、計算機システムB1104)が接続されている。   A file server 1102 and an execution computer system (here, a computer system A 1103 and a computer system B 1104) are connected to the network medium 1101.

ファイルサーバにはディスク装置1105が接続されており、ファイルサーバ1102は実行計算機に対してディスク装置1105上のファイルを提供する。   A disk device 1105 is connected to the file server, and the file server 1102 provides a file on the disk device 1105 to the execution computer.

各実行計算機システムは、それぞれ自分のリモートファイル管理プログラム(1106、1107)を用いてディスク装置1105上のファイルにアクセスする。また、それぞれの実行計算機システムは、 ArmCodeプログラムをそれぞれの機種の機械語プログラムに変換するインストーラ(1108、1109)を備えている。   Each execution computer system accesses a file on the disk device 1105 using its own remote file management program (1106, 1107). Further, each execution computer system includes an installer (1108, 1109) for converting an ArmCode program into a machine language program of each model.

ディスク装置1105上の ArmCodeプログラム1110を各実行計算機システムで実行する場合、計算機システムA1103では、リモートファイル管理プログラム1106を通じて得られる ArmCodeプログラム1110をインストーラ1108により機械語プログラム1111に変換し、これを実行する。計算機システムBにおいても同様に機械語プログラム1112を生成し、これを実行する。   When executing the ArmCode program 1110 on the disk device 1105 in each execution computer system, the computer system A 1103 converts the ArmCode program 1110 obtained through the remote file management program 1106 into a machine language program 1111 by the installer 1108, and executes the program. . Similarly, the computer system B generates a machine language program 1112 and executes it.

以上の様にして、同一の ArmCodeプログラム1110をネットワ-ク上の複数機種の計算機で実行することができ、オブジェクトプログラムの共通化が実現される。   As described above, the same ArmCode program 1110 can be executed by a plurality of types of computers on the network, and the object program can be shared.

従来のシステムでは、異機種間でオブジェクトプログラムの共通化ができず、同一機能を持つオブジェクトプログラムを機種毎に保持する必要があった。ある機能に関して、機種毎に必要であったオブジェクトプログラムファイルを上記の様に ArmCodeプログラムファイルに一本化することにより、以下のメリットが生じる。
(1)ネットワ−ク全体としてのファイル容量が削減される。
(2)バグ修正や機能拡張は ArmCodeプログラムに対してのみ実施すればよく、
これを複数のオブジェクトプログラムに対して同時に実施する必要がないの
で、オブジェクトプログラムのバージョン管理の手間が大幅に軽減される。
In a conventional system, object programs cannot be shared between different models, and it is necessary to maintain an object program having the same function for each model. For a certain function, the following merits arise by unifying the object program file required for each model into the ArmCode program file as described above.
(1) The file capacity of the entire network is reduced.
(2) Bug fixes and function enhancements only need to be performed for ArmCode programs.
Since it is not necessary to perform this for a plurality of object programs at the same time, the trouble of version control of the object programs is greatly reduced.

図52は、 ArmCodeプログラムにより運用していた計算機システムを、他の計算機システムにリプレースする実施例である。   FIG. 52 shows an embodiment in which a computer system operated by the ArmCode program is replaced with another computer system.

計算機システムA1201では、その上で稼働する機械語プログラムに対するディスク装置1202上の保存形式として ArmCodeを用いている。即ち、計算機システムA1201で、ある機能を実現する場合、その機能に対応するディスク装置1202上の ArmCodeプログラム1204を、インストーラ1203により機械語プログラム1205に変換し、実行している。   In the computer system A1201, ArmCode is used as a storage format on the disk device 1202 for a machine language program running thereon. That is, when a certain function is realized by the computer system A 1201, the ArmCode program 1204 on the disk device 1202 corresponding to the function is converted into a machine language program 1205 by the installer 1203 and executed.

このような計算機システムは、インストーラを備えた他の計算機システムに、容易にリプレースすることができる。   Such a computer system can be easily replaced with another computer system having an installer.

計算機システムB1206はインストーラ1208を備えており、ディスク装置1207上の ArmCodeプログラムを機械語プログラムに変換して実行できる。計算機システムA1201を計算機システムB1206にリプレースするには、ディスク装置1202上の ArmCodeプログラム1204をディスク装置1207に複写するだけでよい。即ち、計算機システムB1206において、計算機システムA1201で実現されていたある機能を実現する場合には、その機能に対応するディスク装置1207上の複写された ArmCodeプログラム1204を、インストーラ1208により機械語プログラム1209に変換し、実行する。   The computer system B 1206 includes an installer 1208, and can convert an ArmCode program on the disk device 1207 into a machine language program and execute it. In order to replace the computer system A 1201 with the computer system B 1206, it is only necessary to copy the ArmCode program 1204 on the disk device 1202 to the disk device 1207. That is, when a certain function realized by the computer system A 1201 is realized in the computer system B 1206, the copied ArmCode program 1204 on the disk device 1207 corresponding to the function is converted into a machine language program 1209 by the installer 1208. Convert and execute.

このように、ディスク上のプログラム保存形式として ArmCodeを用いることにより、以下のメリットが生じる。
(1)ユーザにとり、ソースプログラムの再コンパイルやプログラムの再作成な
どの計算機の移行時の手間を削減でき、移行のための時間が短縮される。
(2)メーカにとり、移行性を意識することなく機械語を設定することができ、
システムとしての性能を最大化する方向で計算機システムの設計が可能とな
る。
As described above, the use of ArmCode as a program storage format on a disk has the following advantages.
(1) It is possible for the user to reduce the time and effort required for migrating the computer, such as recompiling the source program and recreating the program, thereby reducing the time required for migration.
(2) For the manufacturer, the machine language can be set without being aware of the portability,
Computer systems can be designed in a direction that maximizes the performance of the system.

ソースプログラムから機械語プログラムへコンパイルする処理を、複数機種の計算機に共通の中間形式(オブジェクトプログラム)を利用した最適化コンパイル処理とすることで、仕様の異なる各々の電子計算機上で実行可能な機械語プログラムを生成することを実現し、有用性は高い。
Machines that can be executed on each computer with different specifications by optimizing the process of compiling source programs into machine language programs using an intermediate format (object program) common to multiple types of computers It is possible to generate a language program and its usefulness is high.

本発明におけるソースプログラムから機械語プログラムへの翻訳システムの一実施例の構成を示す図である。FIG. 1 is a diagram showing a configuration of an embodiment of a system for translating a source program into a machine language program according to the present invention. ソ−スプログラムから、抽象レジスタマシン命令の列としての抽象オブジェクトプログラムを生成するコンパイラの構成を示す図である。FIG. 3 is a diagram showing a configuration of a compiler that generates an abstract object program as a sequence of abstract register machine instructions from a source program. 抽象レジスタマシン命令と機械語の関係を表わす図である。FIG. 4 is a diagram illustrating a relationship between an abstract register machine instruction and a machine language. 抽象レジスタマシン命令に含まれる生成制御文の種類を示す図である。FIG. 11 is a diagram illustrating types of generation control statements included in an abstract register machine instruction. 個々の抽象レジスタマシン命令の形式を示す図である。FIG. 4 is a diagram showing a format of each abstract register machine instruction. 抽象レジスタマシン命令のアドレスモ−ドとオペランドの関係を示す図である。FIG. 4 is a diagram showing a relationship between an address mode and an operand of an abstract register machine instruction. 抽象レジスタマシン命令に含まれる機械語生成命令の仕様を示す図(その1)である。FIG. 11 is a diagram (part 1) illustrating specifications of a machine language generation instruction included in an abstract register machine instruction. 抽象レジスタマシン命令に含まれる機械語生成命令の仕様を示す図(その2)である。FIG. 11 is a diagram (part 2) illustrating specifications of a machine language generation instruction included in an abstract register machine instruction. 抽象レジスタマシン命令に含まれる機械語生成命令の仕様を示す図(その3)である。FIG. 10 is a diagram (part 3) illustrating the specifications of the machine language generation instruction included in the abstract register machine instruction. 抽象レジスタマシン命令に含まれる機械語生成命令の仕様を示す図(その4)である。FIG. 14 is a diagram (part 4) illustrating specifications of a machine language generation instruction included in an abstract register machine instruction. 抽象レジスタマシン命令に含まれる機械語生成命令の仕様を示す図(その5)である。FIG. 15 is a diagram (part 5) illustrating the specifications of the machine language generation instruction included in the abstract register machine instruction. 抽象レジスタマシン命令に含まれる機械語生成命令の仕様を示す図(その6)である。FIG. 15 is a diagram (part 6) illustrating the specifications of the machine language generation instruction included in the abstract register machine instruction. 図2のコンパイラの入力となるソ−スプログラムの一つの例を示す図である。FIG. 3 is a diagram illustrating an example of a source program that is input to the compiler of FIG. 2; 図13のソ−スプログラムに対応する抽象オブジェクトプログラムの生成例であり、まだ最適化処理をしていないものを示す図(その1)である。FIG. 14 is a diagram (part 1) illustrating an example of generation of an abstract object program corresponding to the source program of FIG. 13, which has not been optimized yet; 図13のソ−スプログラムに対応する抽象オブジェクトプログラムの生成例であり、まだ最適化処理をしていないものを示す図(その2)である。FIG. 14 is a diagram (part 2) illustrating an example of generation of an abstract object program corresponding to the source program of FIG. 13, which has not been optimized yet; 図13のソ−スプログラムに対応する抽象オブジェクトプログラムの生成例であり、まだ最適化処理をしていないものを示す図(その3)である。FIG. 14 is a diagram (part 3) illustrating an example of generation of an abstract object program corresponding to the source program of FIG. 13, which has not been optimized yet; 図14から図16の抽象オブジェクトプログラムでのレジスタ割付の優先度の算出過程を例示する図である。FIG. 17 is a diagram illustrating a process of calculating the priority of register allocation in the abstract object program of FIGS. 14 to 16; 図2のコンパイラにおける優先度ビットベクトル作成手順を示したフロ−チャ−トである。4 is a flowchart showing a priority bit vector creation procedure in the compiler of FIG. 図2のコンパイラにおける最適化処理のうち、共通式削除の過程を示したフロ−チャ−トである。4 is a flowchart showing a process of deleting a common expression in the optimization processing in the compiler of FIG. 図13のソ−スプログラムに対応する抽象オブジェクトプログラムの例であり、最適化処理を行なった後の抽象レジスタマシン命令列示す図(その1)である。FIG. 14 is an example of an abstract object program corresponding to the source program of FIG. 13 and is a diagram (part 1) illustrating an abstract register machine instruction sequence after performing an optimization process. 図13のソ−スプログラムに対応する抽象オブジェクトプログラムの例であり、最適化処理を行なった後の抽象レジスタマシン命令列示す図(その2)である。FIG. 14 is an example of an abstract object program corresponding to the source program of FIG. 13 and is a diagram (part 2) illustrating an abstract register machine instruction sequence after performing an optimization process. 最適化処理のうち、ル−プ内不変式の移動を行なう処理のフロ−チャ−トである。This is a flowchart of a process for moving an invariable expression in a loop in the optimization process. 機種Aでの各々の物理レジスタの用途を表す図である。FIG. 3 is a diagram illustrating the use of each physical register in a model A. 抽象レジスタと物理レジスタの対応付けを表す図である。FIG. 3 is a diagram illustrating correspondence between an abstract register and a physical register. パタン照合による機械語への変換を表す図である。It is a figure showing conversion to a machine language by pattern collation. 機種A向けの機械命令選択規則の一部を表す図である。FIG. 6 is a diagram illustrating a part of a machine instruction selection rule for a model A. 図20から図21の抽象オブジェクトプログラムに対する機種Aでの物理レジスタ割付状況を示す図である。FIG. 22 is a diagram illustrating a physical register allocation state in the model A for the abstract object program of FIGS. 20 to 21. 図20から図21の抽象オブジェクトプログラムから機種A用のインスト−ラによって生成された機械語プログラムの例を示す図である。FIG. 22 is a diagram showing an example of a machine language program generated by the installer for model A from the abstract object program of FIGS. 20 to 21. インスト−ラの内部処理過程を表すフロ−チャ−トである。This is a flowchart showing the internal processing of the installer. インスト−ラの構成と入出力を表す図である。It is a figure showing the structure and input / output of an installer. 図は機種Bでの各々の物理レジスタの用途を表す図である。The figure shows the use of each physical register in model B. 図20から図21の抽象オブジェクトプログラムに対する機種Bでの物理レジスタ割付状況を示す図である。FIG. 22 is a diagram illustrating a physical register allocation status in the model B for the abstract object program of FIGS. 機種B向けの機械命令選択規則の一部を表す図である。FIG. 6 is a diagram illustrating a part of a machine instruction selection rule for a model B. 図19から図20の抽象オブジェクトプログラムに対する機種Bでの物理レジスタ割付状況を示す図である。FIG. 21 is a diagram illustrating a physical register allocation state in the model B for the abstract object program of FIGS. 図19から図20の抽象オブジェクトプログラムから機種B用のインスト−ラによって生成された機械語プログラムの例を示す図である。FIG. 21 is a diagram illustrating an example of a machine language program generated by the installer for model B from the abstract object program of FIGS. 19 and 20. 本発明のインストーラを適用したデバックシステムのブロック図である。It is a block diagram of a debugging system to which the installer of the present invention is applied. デバッガの動作を示すフローチャートである。6 is a flowchart illustrating an operation of the debugger. 表示コマンド例を示す図である。It is a figure showing an example of a display command. 表示処理のフローチャートである。It is a flowchart of a display process. ブレークポイント設定コマンド例を示す図である。It is a figure showing the example of a breakpoint setting command. ブレークポイント設定処理のフローチャートである。It is a flowchart of a breakpoint setting process. 実行コマンド例を示す図である。It is a figure showing an example of an execution command. 実行処理のフローチャートである。It is a flowchart of an execution process. デバッグの対象となるソースプログラムの例を示す図である。FIG. 4 is a diagram illustrating an example of a source program to be debugged. ソース・抽象オブジェクト・機械語対応テーブルの一例を示す図である。It is a figure showing an example of a source / abstract object / machine language correspondence table. 本発明のインストーラを内蔵したICカード装置のブロック図である。FIG. 2 is a block diagram of an IC card device incorporating the installer of the present invention. ICカード装置の外観図である。It is an external view of an IC card device. ICカードの平面図である。It is a top view of an IC card. ICカードに内蔵された抽象オブジェクトプログラムを実行するフローチャートである。5 is a flowchart for executing an abstract object program stored in an IC card. 異なるCPUを持つICカード装置の間で同一のICカード内のプログラムを実行する場合の様子を示した図である。FIG. 3 is a diagram illustrating a state in which a program in the same IC card is executed between IC card devices having different CPUs. ネットワ−ク結合された異機種計算機上でのArmCodeプログラムの共有を示す一例を示す図である。FIG. 11 is a diagram illustrating an example of sharing of an ArmCode program on a heterogeneous computer connected to a network. ArmCodeプログラムにより運用していた計算機システムを、他の計算機システムにリプレースする一例を示す図である。FIG. 10 is a diagram illustrating an example of replacing a computer system operated by an ArmCode program with another computer system.

符号の説明Explanation of reference numerals

1001 コンパイラ
1002 リンカ
1003 計算機Aのインストーラ
1004,1006,1013 ソースプログラム
1005,1007,1014 ArmCodeプログラム(抽象オブジェクトプログラム)
1008 ArmCodeプログラムライブラリ
1009 結合済ArmCodeプログラム
1010 計算機Aの仕様情報
1011 計算機Aの機械語プログラム
1012 計算機A
1015 計算機Bのインストーラ
1016 計算機Bの機械語プログラム
1017 計算機B
1018 計算機Bの仕様情報
3100 コンパイラ
3102 ソ−スプログラム
3104 構文・意味解析部
3106 中間語
3108 記号表
3110 中間語最適化部
3112 最適化前のArmCode
3114 抽象レジスタ命令最適化部
3116 抽象レジスタマシン命令列としての抽象オブジェクトプログラム


1001 Compiler 1002 Linker 1003 Installer of Computer A 1004, 1006, 1013 Source program
1005, 1007, 1014 ArmCode program (abstract object program)
1008 ArmCode program library 1009 Combined ArmCode program 1010 Specification information 1011 of computer A Machine language program 1012 of computer A Computer A
1015 Installer of computer B 1016 Machine language program of computer B 1017 Computer B
1018 Specification information of computer B 3100 Compiler 3102 Source program 3104 Syntax / semantic analysis unit 3106 Intermediate language 3108 Symbol table 3110 Intermediate language optimization unit 3112 ArmCode before optimization
3114 Abstract register instruction optimization unit 3116 Abstract object program as abstract register machine instruction sequence


Claims (6)

CPU及びメモリを備えた計算機によって実行されるコンパイラであって、ソースプログラムを、複数の抽象レジスタを定義した抽象レジスタマシンに対する命令列を構成要素とする、対象計算機の機種に依存しない抽象オブジェクトプログラムに翻訳するコンパイラにおいて、
前記抽象レジスタマシン向けの最適化処理を行って前記抽象オブジェクトプログラムを生成する手段と、
当該抽象オブジェクトプログラムを機械語プログラムに変換する際の最適化処理に利用される生成制御命令を当該抽象オブジェクトプログラムに含ませる手段と、
を備えたことを特徴とするコンパイラ。
A compiler that is executed by a computer having a CPU and a memory, and converts a source program into an abstract object program that is independent of a model of a target computer and includes an instruction sequence for an abstract register machine that defines a plurality of abstract registers. In the compiler to translate,
Means for performing the optimization process for the abstract register machine to generate the abstract object program;
Means for causing the abstract object program to include a generation control instruction used for optimization processing when converting the abstract object program into a machine language program;
A compiler comprising:
前記生成制御命令はレジスタ割付の優先度をオペランドのひとつとすることを特徴とする請求項1のコンパイラ。   2. The compiler according to claim 1, wherein the generation control instruction sets the priority of register allocation to one of operands. 前記レジスタ割付の優先度は、対象とする抽象レジスタを利用する抽象レジスタマシン命令の出現する位置に応じたものであることを特徴とする請求項2のコンパイラ。   3. The compiler according to claim 2, wherein the priority of the register allocation is based on a position where an abstract register machine instruction using a target abstract register appears. CPU、メモリ及び複数の実レジスタを備えた計算機によって実行されるインストーラであって、
計算機の種類に依存しない中間語プログラム形式の抽象オブジェクトプログラムであって、機械語プログラムに変換する際の最適化処理に利用される生成制御命令を有する抽象オブジェクトプログラムを受け取る手段と、
受け取った前記抽象オブジェクトプログラムに含まれる前記生成制御命令を参照して当該計算機向けの最適化処理を行って機械語プロラムを生成する手段とを備えたことを特徴とするインストーラ。
An installer executed by a computer having a CPU, a memory, and a plurality of real registers,
Means for receiving an abstract object program in the form of an intermediate language program that does not depend on the type of a computer, the abstract object program having a generation control instruction used for optimization processing when converting the program into a machine language program;
Means for generating a machine language program by performing optimization processing for the computer with reference to the generation control instruction included in the received abstract object program.
前記生成制御命令はレジスタ割付の優先度をオペランドのひとつとすることを特徴とする請求項4のインストーラ。   5. The installer according to claim 4, wherein the generation control instruction sets the priority of register allocation to one of operands. 前記レジスタ割付の優先度は、対象とする抽象レジスタを利用する抽象レジスタマシン命令の出現する位置に応じたものであることを特徴とする請求項5のインストーラ。

6. The installer according to claim 5, wherein the register allocation priority is determined according to a position where an abstract register machine instruction using the target abstract register appears.

JP2004212457A 2004-07-21 2004-07-21 Information processing system corresponding to multiple model, and its method Pending JP2004348759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004212457A JP2004348759A (en) 2004-07-21 2004-07-21 Information processing system corresponding to multiple model, and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004212457A JP2004348759A (en) 2004-07-21 2004-07-21 Information processing system corresponding to multiple model, and its method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP11301898A Division JPH10254712A (en) 1998-04-23 1998-04-23 Information processing system corersonding to multiple machine types and its method

Publications (1)

Publication Number Publication Date
JP2004348759A true JP2004348759A (en) 2004-12-09

Family

ID=33535919

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004212457A Pending JP2004348759A (en) 2004-07-21 2004-07-21 Information processing system corresponding to multiple model, and its method

Country Status (1)

Country Link
JP (1) JP2004348759A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010533908A (en) * 2007-07-13 2010-10-28 株式会社エヌ・ティ・ティ・ドコモ Domain specific language abstraction for secure server side scripting

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010533908A (en) * 2007-07-13 2010-10-28 株式会社エヌ・ティ・ティ・ドコモ Domain specific language abstraction for secure server side scripting

Similar Documents

Publication Publication Date Title
JP3602857B2 (en) Multi-model compatible information processing system and method
US8505002B2 (en) Translation of SIMD instructions in a data processing system
JP3801545B2 (en) COMPILER PROGRAM, COMPILER DEVICE, AND COMPILING METHOD
Sreraman et al. A vectorizing compiler for multimedia extensions
Leupers et al. Retargetable compiler technology for embedded systems: tools and applications
US7353508B2 (en) Method, apparatus and article for generation of debugging information
JPH10320214A (en) Compile system and computer program product
US20030167458A1 (en) Programmatic access to the widest mode floating-point arithmetic supported by a processor
JP2004038597A (en) Compiler device
Dandamudi Guide to RISC processors: for programmers and engineers
Fog Optimizing software in C++
Moona Processor models for retargetable tools
Souza et al. ISAMAP: instruction mapping driven by dynamic binary translation
JPH10254712A (en) Information processing system corersonding to multiple machine types and its method
JP2004348759A (en) Information processing system corresponding to multiple model, and its method
Korenkov et al. Declarative target architecture definition for data-driven development toolchain
Spink et al. Efficient dual-ISA support in a retargetable, asynchronous dynamic binary translator
Brogioli Software and Compiler Optimization for Microcontrollers, Embedded Processors, and DSPs
JP4879589B2 (en) Compiler device
Mráček A decompiler for Objective-C
Piumarta ccg: dynamic code generation for С and C+
JP2002182925A (en) Compiling method and computer readable recording medium
Scheller Retargeting a C Compiler to the HAPRA/FAPRA Architecture
Playstation et al. What are Embedded Systems?
Why Computer Architecture

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041214

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050214

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050315