JP2001273150A - Device for converting program - Google Patents

Device for converting program

Info

Publication number
JP2001273150A
JP2001273150A JP2000087626A JP2000087626A JP2001273150A JP 2001273150 A JP2001273150 A JP 2001273150A JP 2000087626 A JP2000087626 A JP 2000087626A JP 2000087626 A JP2000087626 A JP 2000087626A JP 2001273150 A JP2001273150 A JP 2001273150A
Authority
JP
Japan
Prior art keywords
assembler
template
function
code
call
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
JP2000087626A
Other languages
Japanese (ja)
Inventor
Toshiyuki Sakata
俊幸 坂田
Seiichi Urushibara
誠一 漆原
Wataru Hashiguchi
渉 橋口
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2000087626A priority Critical patent/JP2001273150A/en
Publication of JP2001273150A publication Critical patent/JP2001273150A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a program conversion device that converts access description into an optimum assembler code when the access description of an assembler template function being a description format to be developed into an assembler code is included in a source program. SOLUTION: When a controlling part 104 detects the access description of the assembler template function, an assembler template selecting part 105 obtains a plurality of definitions corresponding to the assembler template function accessed by the access description from an assembler template storing part 103, decides whether or not the respective definitions are usable according to whether an argument in the access description is a variable or a constant, the number of performance cycles of an assembler code specified by a definition is calculated with respect to each of usable definition, and one definition in which the number of performance cycles is the smallest is selected. An assembler function access translating part 107 generates an assembler code on the selected definition and outputs the assembler code to an output file storing part 108.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、高級言語で記述さ
れたソースプログラムを特定のプロセッサ用のアセンブ
ラコードに変換するプログラム変換装置に関し、特に、
別途定義してあるアセンブラコードに変換されるべき関
数呼出記述を含むソースプログラムを、変換対象とする
プログラム変換装置に関する。
The present invention relates to a program conversion device for converting a source program described in a high-level language into assembler code for a specific processor.
The present invention relates to a program conversion apparatus that converts a source program containing a function call description to be converted into separately defined assembler code.

【0002】[0002]

【従来の技術】一般にプログラム開発者等によるプログ
ラムの作成は、C言語、C++言語等の高級言語を用い
てなされ、高級言語を用いて作成されたプログラムは、
コンパイラ等のプログラム変換装置によってアセンブラ
コードに変換され最終的にはプロセッサが実行可能な機
械語命令列に変換され利用される。
2. Description of the Related Art Generally, a program developer or the like creates a program using a high-level language such as C language, C ++ language, and the like.
The program is converted into assembler code by a program conversion device such as a compiler, and finally converted into a machine language instruction sequence executable by a processor and used.

【0003】ところで近年、画像処理等のマルチメディ
ア処理を高速に行なうために積和演算、飽和演算等のデ
ジタル信号処理用の命令(以下、「DSP命令」とい
う。)をサポートするマイクロプロセッサが製造される
ようになり、このようなマイクロプロセッサが情報家電
機器やパーソナルコンピュータに搭載されている。しか
しながら、C言語、C++言語等の高級言語はDSP命
令を想定しておらずDSP命令に対応する演算子を備え
ていない。
Recently, microprocessors have been manufactured which support digital signal processing instructions (hereinafter, referred to as "DSP instructions") such as a product-sum operation and a saturation operation in order to perform multimedia processing such as image processing at a high speed. Such microprocessors have been installed in information home appliances and personal computers. However, high-level languages such as the C language and the C ++ language do not assume a DSP instruction and do not have an operator corresponding to the DSP instruction.

【0004】従って、DSP命令を使用する処理を実行
するプログラムを作成するためには、DSP命令を使用
する処理の部分をアセンブラ言語で記述しなければなら
ない。従来のプログラム変換装置には、高級言語のソー
スプログラム中においてアセンブラコードにより実現さ
れる処理を記述するために、アセンブラテンプレート関
数に対する呼出記述を用いることができるようにしたも
のがある。例えばGAIOテクノロジ社のコンパイラで
ある。アセンブラテンプレート関数とは、アセンブラコ
ードを決定するために用いられる記述であり、形式的に
関数の形式をとるものである。このアセンブラテンプレ
ート関数の内容を、即ちアセンブラコードを決定するた
めの情報等を、定義したものをアセンブラテンプレート
という。つまりアセンブラテンプレートは、アセンブラ
テンプレート関数を定義するための記述、即ちアセンブ
ラテンプレート関数の内容を特定するための記述であ
る。
Therefore, in order to create a program for executing a process using a DSP instruction, a part of the process using the DSP instruction must be described in assembler language. Some conventional program conversion apparatuses can use a call description for an assembler template function in order to describe processing realized by assembler code in a high-level language source program. An example is a compiler from GAIO Technology. An assembler template function is a description used to determine assembler code, and takes the form of a function formally. A definition of the contents of the assembler template function, that is, information for determining the assembler code, is called an assembler template. That is, the assembler template is a description for defining the assembler template function, that is, a description for specifying the contents of the assembler template function.

【0005】このようなプログラム変換装置は、ソース
プログラム中にアセンブラテンプレート関数の呼出記述
が記述されている場合には、その呼出記述における引数
及び戻り値に即して、アセンブラテンプレート関数の内
容となるアセンブラコードを決定し、この決定したアセ
ンブラコードをそのアセンブラテンプレート関数の呼出
記述の部分の翻訳結果とする。即ち、このプログラム変
換装置により、アセンブラテンプレート関数の呼出記述
は、サブルーチンを呼び出す命令を含むアセンブラコー
ドに翻訳されるのではなく、その位置に直接置かれるア
センブラコードに翻訳される。
In such a program conversion device, when a call description of an assembler template function is described in a source program, the contents of the assembler template function are used in accordance with the arguments and return values in the call description. The assembler code is determined, and the determined assembler code is used as a translation result of the call description portion of the assembler template function. That is, by this program conversion device, the call description of the assembler template function is not translated into assembler code including an instruction to call a subroutine, but into assembler code directly placed at that position.

【0006】図10は、従来のアセンブラテンプレート
の内容例を示す図である。同図に示すようにアセンブラ
テンプレートの内容は、アセンブラテンプレート関数の
定義であり、各行の意味は以下の通りである。「asm
_template」はアセンブラテンプレートである
ことを表す。「fir」は、アセンブラテンプレート関
数の関数名を表す。なお、1つの関数名で特定されるア
センブラテンプレート関数の定義記述は1つのみであ
る。即ち、同一関数名で2以上のアセンブラテンプレー
ト関数の定義を行うことはできない。
FIG. 10 shows an example of the contents of a conventional assembler template. As shown in the figure, the contents of the assembler template are definitions of assembler template functions, and the meaning of each line is as follows. "Asm
“_Template” indicates that the template is an assembler template. “Fir” represents a function name of an assembler template function. Note that there is only one definition description of the assembler template function specified by one function name. That is, two or more assembler template functions cannot be defined with the same function name.

【0007】「$p1={p0,p1,p2,p3}」
は、「$p1」という仮想レジスタがアセンブラテンプ
レート関数の第1引数を表し、「{p0,p1,p2,
p3}」が第1引数の割り当て候補のレジスタを表す。
ここで、仮想レジスタとは、レジスタに変換される変数
をいう。プログラム変換装置は、ソースプログラムの翻
訳に際して、アセンブラテンプレート関数の呼出記述に
おける第1引数に対応するものとして、割り当て候補の
レジスタうちのいずれか1つのレジスタを決定して割り
当てることになり、結果的に第1引数の示す値はその決
定した1つのレジスタに格納されることになる。
"{P1 = {p0, p1, p2, p3}"
Indicates that the virtual register “$ p1” represents the first argument of the assembler template function, and “$ p0, p1, p2,
p3} "indicates a register of a candidate for assignment of the first argument.
Here, a virtual register is a variable that is converted into a register. When translating the source program, the program conversion device determines and assigns any one of the allocation candidate registers as the one corresponding to the first argument in the call description of the assembler template function. The value indicated by the first argument is stored in the determined one register.

【0008】「$p2={p4,p5,p6,p7}」
は、「$p2」という仮想レジスタがアセンブラテンプ
レート関数の第2引数を表し、「{p4,p5,p6,
p7}」が第2引数の割り当て候補のレジスタを表す。
「$p3={r0,r1,r2,r3}」は、「$p
3」という仮想レジスタがアセンブラテンプレート関数
の第3引数を表し、「{r0,r1,r2,r3}」が
第3引数の割り当て候補のレジスタを表す。
"{P2 = {p4, p5, p6, p7}"
Indicates that the virtual register “$ p2” represents the second argument of the assembler template function, and “$ p4, p5, p6,
p7} "indicates a register of a candidate for assignment of the second argument.
“{P3 = {r0, r1, r2, r3}” is “{p
A virtual register “3” represents the third argument of the assembler template function, and “{r0, r1, r2, r3}” represents a register that is a candidate for assignment of the third argument.

【0009】「$t1={a0,a1}」は、「$t
1」という仮想レジスタがアセンブラテンプレート関数
内で使用される1番目の一時資源を表し、「{a0,a
1}」が一時資源への割り当て候補のレジスタを表す。
なお一時資源は、一時的に使用するレジスタを意味す
る。「ret={$t1}」は、アセンブラテンプレー
ト関数内で使用される1番目の一時資源が関数の戻り値
とされることを表す。
"{T1 = {a0, a1}" is replaced with "{t
The virtual register “1” represents the first temporary resource used in the assembler template function, and “$ a0, a
“1}” indicates a register of a candidate for temporary resource allocation.
The temporary resource means a register used temporarily. “Ret = {t1}” indicates that the first temporary resource used in the assembler template function is the return value of the function.

【0010】「kill={$p1,$p2}」は、第
1引数、第2引数の値が関数内で変更されることを表
す。「code={・・・}」は、アセンブラテンプレ
ート関数の定義の本体的な記述であり、引数及び一時資
源を用いて表されたアセンブラコードである。「rep
n $p3」は第3引数の回数だけ次の命令を繰り返す
という命令であり、「mac $t1,m($p1,
1),m($p2,1)」は第1引数であるアドレス値
の指し示すメモリの内容と第2引数であるアドレス値の
指し示すメモリの内容との積と一時資源との和を一時資
源に格納した後に、第1引数であるアドレス値及び第2
引数であるアドレス値をそれぞれ増加する命令である。
"Kill = {p1, {p2}" indicates that the values of the first and second arguments are changed in the function. “Code = {...}” Is the main description of the definition of the assembler template function, and is an assembler code expressed using arguments and temporary resources. "Rep
n @ p3 is an instruction to repeat the next instruction the number of times of the third argument, and "mac @ t1, m (@ p1,
1), m (@ p2,1) "is a temporary resource which is a sum of a product of a memory content pointed to by an address value as a first argument and a memory content pointed to by an address value as a second argument and a temporary resource. After storing, the address value which is the first argument and the second argument
These instructions increase the address values that are arguments.

【0011】即ち、この「fir」という関数名のアセ
ンブラテンプレート関数は、第1引数であるアドレスか
ら順にメモリに格納されている数値列と、第2引数であ
るアドレスから順にメモリに格納されている数値列との
内積を第3引数で示される要素数分だけ計算した結果の
総和を戻り値として返却する関数である。図6は、アセ
ンブラテンプレート関数の呼出記述を含むソースプログ
ラムの例を示す図である。
In other words, the assembler template function having the function name "fir" is stored in the memory in order from the address as the first argument in the memory, and from the address in the second argument in the memory. This is a function that returns the sum of the results of calculating the inner product with the numerical value sequence by the number of elements indicated by the third argument as a return value. FIG. 6 is a diagram illustrating an example of a source program including a call description of an assembler template function.

【0012】同図に示すソースプログラムは、C言語で
記述されたものであり、「fir(v1,v2,n)」
及び「fir(v3,v4,10)」が上述した「fi
r」という関数名のアセンブラテンプレート関数の呼出
記述である。以下、図9を用いて、従来のプログラム変
換装置900について説明する。図9は、従来のプログ
ラム変換装置900の機能ブロック図である。
The source program shown in FIG. 1 is described in the C language, and is called "fir (v1, v2, n)".
And "fir (v3, v4, 10)" described in the above "fi
This is a call description of an assembler template function with a function name of "r". Hereinafter, a conventional program conversion device 900 will be described with reference to FIG. FIG. 9 is a functional block diagram of a conventional program conversion device 900.

【0013】なお、同図中にはプログラム変換装置の入
力ファイルの格納先であるソースファイル格納部901
及びアセンブラテンプレートファイル格納部902と、
出力ファイルの格納先である出力ファイル格納部907
をも示している。プログラム変換装置900は、ソース
プログラムをアセンブラコードに変換するもので、ハー
ドウェア的にはCPU、メモリ、ハードディスク装置等
を備えるパーソナルコンピュータで構成され、機能的に
はアセンブラテンプレート記憶部903と、制御部90
4と、アセンブラ関数呼出翻訳部905と、一般命令翻
訳部906とを備える。制御部904、アセンブラ関数
呼出翻訳部905及び一般命令翻訳部906は、メモリ
に格納された制御プログラムがCPUにより実行される
ことによりその機能が実現されるものである。
FIG. 1 shows a source file storage unit 901 which is a storage destination of an input file of the program conversion apparatus.
And an assembler template file storage unit 902;
Output file storage unit 907 as a storage destination of the output file
Is also shown. The program conversion device 900 converts a source program into assembler code, and is composed of a personal computer including a CPU, a memory, a hard disk device, and the like in terms of hardware, and functionally includes an assembler template storage unit 903 and a control unit. 90
4, an assembler function call translator 905, and a general instruction translator 906. The functions of the control unit 904, the assembler function call translating unit 905, and the general instruction translating unit 906 are realized by a CPU executing a control program stored in a memory.

【0014】ここで、ソースファイル格納部901は、
アセンブラテンプレート関数の呼出記述を含むソースプ
ログラムを格納している記憶装置である。アセンブラテ
ンプレートファイル格納部902は、ソースプログラム
から呼び出されるアセンブラテンプレート関数の定義で
あるアセンブラテンプレートが記述されたアセンブラテ
ンプレートファイルを格納している記憶装置である。
Here, the source file storage unit 901 includes:
The storage device stores a source program including a call description of an assembler template function. The assembler template file storage unit 902 is a storage device that stores an assembler template file in which an assembler template that is a definition of an assembler template function called from a source program is described.

【0015】アセンブラテンプレート記憶部903は、
アセンブラテンプレートファイル格納部902に格納さ
れたアセンブラテンプレートファイルからアセンブラテ
ンプレートを読み出して記憶するメモリ領域である。制
御部904は、ソースファイル格納部901からソース
プログラムを読み出し、ソースプログラムの各文に逐次
着目し、着目した文が、関数の呼出記述を意味する文で
ありかつその関数の名前がアセンブラテンプレート記憶
部903に記憶されていた場合には、アセンブラ関数呼
出翻訳部905を起動し、その他の場合には、一般命令
翻訳部906を起動する。ここで起動とは、起動対象に
機能処理の実行を開始させることをいう。
The assembler template storage unit 903 includes:
A memory area for reading and storing an assembler template from an assembler template file stored in the assembler template file storage unit 902. The control unit 904 reads the source program from the source file storage unit 901 and sequentially focuses on each statement of the source program. The focused statement is a statement that means a function call description, and the name of the function is stored in the assembler template storage. If it is stored in the unit 903, the assembler function call translating unit 905 is activated. In other cases, the general instruction translating unit 906 is activated. Here, activation refers to causing an activation target to start execution of a function process.

【0016】アセンブラ関数呼出翻訳部905は、制御
部904により起動され、関数呼出記述で呼び出される
アセンブラテンプレート関数に対応する定義をアセンブ
ラテンプレート記憶部903から得て、その本体的な記
述である「code={・・・}」において使用されて
いる「$p1」、「$p2」、「$p3」、「$t1」
に対して、割り当て候補のレジスタのうちのいずれかを
割り当てて引数及び戻り値の設定のコードとレジスタの
退避及び復元のためのコードとを付加することによりア
センブラコードを生成して、生成したアセンブラコード
を出力ファイル907に出力する。
The assembler function call translating unit 905 is activated by the control unit 904, obtains a definition corresponding to the assembler template function called by the function call description from the assembler template storage unit 903, and obtains a main description "code". = $...} ”,“ $ p1 ”,“ $ p2 ”,“ $ p3 ”,“ $ t1 ”
, An assembler code is generated by allocating one of the allocation candidate registers and adding a code for setting an argument and a return value and a code for saving and restoring the register. The code is output to the output file 907.

【0017】一般命令翻訳部906は、制御部904に
より起動され、一般命令翻訳処理を行なう。即ち、一般
命令翻訳部906は、アセンブラテンプレート関数の呼
出記述を含む文以外の文を、文の内容に応じてアセンブ
ラコードに変換して出力ファイル格納部907に出力す
る。なお、プログラム変換装置900は、ソースファイ
ル格納部901及びアセンブラテンプレートファイル格
納部902からソースプログラム及びアセンブラテンプ
レートを読み出した後は、これらを処理効率のよい所定
の内部形式に変換し、これらをアセンブラコードへ翻訳
する処理を実行する。
The general instruction translating unit 906 is activated by the control unit 904 and performs a general instruction translating process. That is, the general instruction translating unit 906 converts a statement other than the statement including the call description of the assembler template function into assembler code according to the contents of the statement, and outputs it to the output file storage unit 907. After reading the source program and the assembler template from the source file storage unit 901 and the assembler template file storage unit 902, the program conversion device 900 converts them into a predetermined internal format with high processing efficiency, and converts them into assembler code. Execute the process of translating to

【0018】図11は、図6に示したソースプログラム
を従来のプログラム変換装置900により変換した結果
として得られるアセンブラコードを示す図である。な
お、アセンブラテンプレートファイル格納部902に、
図10に示したアセンブラテンプレートが格納されてい
た場合に、図11に示すアセンブラコードが得られるこ
とになる。
FIG. 11 is a diagram showing assembler code obtained as a result of converting the source program shown in FIG. 6 by the conventional program conversion device 900. The assembler template file storage unit 902 stores
When the assembler template shown in FIG. 10 is stored, the assembler code shown in FIG. 11 is obtained.

【0019】図6に示したソースプログラムにおいて、
アセンブラテンプレート関数の1回目の使用については
全ての引数を変数とし、2回目の使用については第1引
数と第2引数とを変数とし第3引数を定数「10」とし
ている。しかし、このソースプログラムの変換結果とし
て生成されたアセンブラコードは、アセンブラテンプレ
ート関数の引数に変数を用いられたか定数を用いられた
かに関係なく、図11に示すように1回目の使用に相当
する部分も2回目の使用に相当する部分も形式的には同
じ命令列から構成されるものとなる。
In the source program shown in FIG.
For the first use of the assembler template function, all arguments are variables, and for the second use, the first and second arguments are variables and the third argument is a constant "10". However, the assembler code generated as a result of the conversion of the source program has a part corresponding to the first use as shown in FIG. 11, regardless of whether a variable or a constant is used as an argument of the assembler template function. Also, the part corresponding to the second use is formally composed of the same instruction sequence.

【0020】このように、従来のプログラム変換装置
は、同一のアセンブラテンプレート関数を使用する部分
についてはいずれも形式的に同じ命令列から構成される
アセンブラコードに変換する。
As described above, the conventional program conversion device converts any portion using the same assembler template function into assembler code composed of the same instruction sequence.

【0021】[0021]

【発明が解決しようとする課題】上述した従来のプログ
ラム変換装置は、ソースプログラムを最適なアセンブラ
コードに変換する、即ち最適なアセンブラコードを生成
するという観点からは、以下に示す問題がある。プロセ
ッサが実行可能な命令セットには、処理対象がレジスタ
の内容であるか定数値であるかによって異なる命令が用
意されている場合があり、効果的に各命令を使い分ける
ことにより最適なアセンブラコードの生成は可能にな
る。このような異なる命令が用意されている場合におい
て、例えば定数を処理対象とする命令が利用できるにも
関わらず、定数をレジスタに格納した後にレジスタを処
理対象とする命令を利用したならば、最適なアセンブラ
コードの生成を行ったとはいえない。
The above-mentioned conventional program conversion apparatus has the following problems from the viewpoint of converting a source program into an optimal assembler code, that is, generating an optimal assembler code. The instruction set that can be executed by the processor may have different instructions depending on whether the processing target is the contents of a register or a constant value, and by using each instruction effectively, the optimal assembler code Generation becomes possible. In the case where such different instructions are prepared, for example, even though an instruction for processing a constant can be used, if an instruction for processing a register is used after storing a constant in a register, the optimal It cannot be said that the assembler code was generated.

【0022】従来のプログラム変換装置によれば、アセ
ンブラテンプレート関数の呼出記述は、どのような引数
を用いた記述であっても、形式的に同じ命令列から構成
されるアセンブラコードに変換されてしまい、引数が変
数であるか定数であるかに応じて最適なアセンブラコー
ドに変換されるのではない。また、機能的に同様な処理
を行なうもので関数名が異なる複数のアセンブラテンプ
レート関数を用意しておき、引数が変数であるか定数で
あるかといった状況に応じて、ソースプログラムの作成
者がどのアセンブラテンプレート関数を使用するかを選
択して関数の呼出記述を行なう方法が考えられるが、作
成者に選択の負担を課すため生産性の低下を招く上、作
成者が必ずしも最適な選択を行うとは限らないという問
題がある。
According to the conventional program conversion apparatus, a call description of an assembler template function is converted into assembler code composed of the same sequence of instructions regardless of the description using any arguments. It is not converted to the optimal assembler code depending on whether the argument is a variable or a constant. Also, prepare multiple assembler template functions that perform the same function but have different function names, and the creator of the source program can determine which arguments are variables or constants. It is conceivable to call the function by selecting whether to use the assembler template function.However, it imposes the burden of selection on the creator, which lowers the productivity and causes the creator to always make the optimal selection. There is a problem that is not always.

【0023】そこで、本発明は、かかる問題点に鑑みて
なされたものであり、アセンブラテンプレート関数の呼
出記述における引数が変数であるか定数であるか等の呼
出記述の内容に応じてアセンブラテンプレート関数の呼
出記述を最適なアセンブラコードに変換するプログラム
変換装置を提供することを目的とする。更に、本発明
は、アセンブラテンプレート関数の呼出記述の内容に応
じて最適化のために命令を使い分ける他に、コードサイ
ズの面や実行サイクル数の面のうちどの面について最適
化を図るかという設定に応じて命令を使い分けることに
より、アセンブラテンプレート関数の呼出記述を最適な
アセンブラコードに変換するプログラム変換装置を提供
することをも目的とする。
Accordingly, the present invention has been made in view of such a problem, and an assembler template function is provided according to the contents of a call description such as whether a parameter in a call description of an assembler template function is a variable or a constant. It is an object of the present invention to provide a program conversion device for converting a call description into an optimal assembler code. In addition, the present invention uses instructions for optimization in accordance with the contents of the call description of the assembler template function, and also sets which of the code size and the number of execution cycles to optimize. Another object of the present invention is to provide a program conversion device that converts a call description of an assembler template function into an optimal assembler code by selectively using instructions according to the following.

【0024】[0024]

【課題を解決するための手段】上記目的を達成するため
に、本発明に係るプログラム変換装置は、高級言語で記
述されたソースプログラムをアセンブラコードに変換す
るプログラム変換装置であって、アセンブラテンプレー
ト関数についての複数の定義を記憶するテンプレート記
憶手段と、前記ソースプログラムにおけるアセンブラテ
ンプレート関数の呼出記述を検出する呼出検出手段と、
前記呼出検出手段により前記呼出記述が検出された場合
に、当該呼出記述により呼び出されるアセンブラテンプ
レート関数についての複数の定義のうち、最適な1つを
選択する選択手段と、前記呼出検出手段により検出され
た前記呼出記述を、前記選択手段により選択されたアセ
ンブラテンプレート関数の定義に基づいてアセンブラコ
ードに変換する変換手段とを備えることを特徴とする。
In order to achieve the above object, a program conversion device according to the present invention is a program conversion device for converting a source program described in a high-level language into assembler code, comprising an assembler template function. Template storage means for storing a plurality of definitions for: and call detection means for detecting a call description of an assembler template function in the source program;
When the call description is detected by the call detection unit, a selection unit that selects an optimal one from among a plurality of definitions of the assembler template function called by the call description, Conversion means for converting the call description into assembler code based on the definition of the assembler template function selected by the selection means.

【0025】ここで、アセンブラテンプレート関数の定
義とは、アセンブラコードを特定する内容の情報をい
う。これにより、アセンブラテンプレート関数について
の複数の定義のうちの1つが選択されるので、このプロ
グラム変換装置を利用する場合に、1つのアセンブラテ
ンプレート関数に対して複数の定義を用意しておけば、
ソースプログラム中のアセンブラテンプレート関数の呼
出記述を、その記述内容等に応じて最適なアセンブラコ
ードに変換することや、コードサイズ又は実行サイクル
数の面から最適なアセンブラコードに変換することが可
能になる。例えば、ソースプログラム中のアセンブラテ
ンプレート関数の呼出記述における引数が変数か定数か
等に応じ、又は、変換をコードサイズ優先で行うか実行
サイクル数優先で行うか等の設定に応じて、アセンブラ
テンプレート関数の呼出記述を、コードサイズの小さい
又は実行サイクル数の少ないといった最適なアセンブラ
コードに変換することが可能になる。
Here, the definition of an assembler template function refers to information on the contents specifying an assembler code. As a result, one of a plurality of definitions for the assembler template function is selected. Therefore, when using this program conversion device, if a plurality of definitions are prepared for one assembler template function,
It is possible to convert a call description of an assembler template function in a source program into an optimal assembler code according to the description contents, etc., and to convert it into an optimal assembler code in terms of code size or the number of execution cycles. . For example, the assembler template function is called according to whether the argument in the call description of the assembler template function in the source program is a variable or a constant, or whether the conversion is performed with priority on the code size or the number of execution cycles. Can be converted into an optimal assembler code having a small code size or a small number of execution cycles.

【0026】[0026]

【発明の実施の形態】以下、本発明の実地の形態に係る
プログラム変換装置について、図面を用いて説明する。 <構成>図1は、本発明の実施の形態に係るプログラム
変換装置100の機能ブロック図である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A program conversion device according to a practical embodiment of the present invention will be described below with reference to the drawings. <Structure> FIG. 1 is a functional block diagram of a program conversion device 100 according to an embodiment of the present invention.

【0027】なお、図1にはソースファイル格納部10
1、アセンブラテンプレートファイル格納部102、出
力ファイル格納部108も併せて記載している。ここ
で、ソースファイル格納部101は、アセンブラテンプ
レート関数の呼出記述を含むC言語のソースプログラム
を格納している記憶装置である。アセンブラテンプレー
トファイル格納部102は、アセンブラテンプレート関
数の定義であるアセンブラテンプレートを複数記述した
アセンブラテンプレートファイルを格納している記憶装
置である。
FIG. 1 shows a source file storage unit 10.
1, the assembler template file storage unit 102 and the output file storage unit 108 are also described. Here, the source file storage unit 101 is a storage device that stores a C language source program including a call description of an assembler template function. The assembler template file storage unit 102 is a storage device that stores an assembler template file in which a plurality of assembler templates that are definitions of assembler template functions are described.

【0028】また、出力ファイル格納部108は、プロ
グラム変換装置100により、ソースファイル格納部1
01に格納されたソースプログラムの変換結果として生
成されるアセンブラコードを格納するための記憶装置で
ある。プログラム変換装置100は、CPU、メモリ、
ハードディスク装置等を備えるパーソナルコンピュータ
で構成され、メモリに格納された制御プログラムがCP
Uにより実行されることによりソースプログラムをアセ
ンブラコードに変換する機能を実現するいわゆるコンパ
イラであり、機能的には、アセンブラテンプレート記憶
部103、制御部104、アセンブラテンプレート選択
部105、一般命令翻訳部106、アセンブラ関数呼出
翻訳部107から構成される。なお、ソースプログラム
をアセンブラコードに変換するとは、ソースプログラム
に基づいて、そのソースプログラムに記述された処理内
容をプロセッサに実行させるためのアセンブラコードを
生成することをいう。
The output file storage unit 108 is stored in the source file storage unit 1 by the program conversion device 100.
01 is a storage device for storing assembler code generated as a result of conversion of the source program stored in the source program 01. The program conversion device 100 includes a CPU, a memory,
The control program, which is constituted by a personal computer having a hard disk device or the like,
This is a so-called compiler that realizes a function of converting a source program into assembler code by being executed by the U. Functionally, the assembler template storage unit 103, the control unit 104, the assembler template selection unit 105, the general instruction translation unit 106 , And an assembler function call translator 107. Note that converting a source program into assembler code refers to generating assembler code for causing a processor to execute processing contents described in the source program based on the source program.

【0029】アセンブラテンプレート記憶部103は、
アセンブラテンプレートファイル格納部102からアセ
ンブラテンプレートを読み出して記憶するメモリ領域で
あり、従来のプログラム変換装置900におけるアセン
ブラテンプレート記憶部903と同等である。制御部1
04は、ソースファイル格納部101からソースプログ
ラムを読み出し、ソースプログラムの各文に逐次着目
し、着目した文が、関数の呼出記述を意味する文であり
かつその関数の名前がアセンブラテンプレート記憶部1
03に記憶されていた場合には、アセンブラ関数呼出翻
訳部107を起動し、その他の場合には、一般命令翻訳
部106を起動する。なお、制御部104は、従来のプ
ログラム変換装置900における制御部904と同等で
ある。
The assembler template storage unit 103
This is a memory area for reading and storing an assembler template from the assembler template file storage unit 102, and is equivalent to the assembler template storage unit 903 in the conventional program conversion device 900. Control unit 1
Reference numeral 04 denotes a source program that is read from the source file storage unit 101, sequentially pays attention to each statement of the source program, and the focused statement is a statement meaning a function call description, and the name of the function is the assembler template storage unit 1
03, the assembler function call translator 107 is activated, otherwise, the general instruction translator 106 is activated. The control unit 104 is equivalent to the control unit 904 in the conventional program conversion device 900.

【0030】アセンブラ関数呼出翻訳部905は、制御
部904により起動され、アセンブラテンプレート選択
部105を起動して、関数の呼出記述で呼び出されるア
センブラテンプレート関数に対応する定義をアセンブラ
テンプレート選択部105から受け取り、アセンブラテ
ンプレート関数の定義の本体的な記述において使用され
ている仮想レジスタに対して、割り当て候補のレジスタ
のうちのいずれかを割り当てて引数及び戻り値の設定の
コードとレジスタの退避及び復元のためのコードとを付
加することによりアセンブラコードを生成して、生成し
たアセンブラコードを出力ファイル格納部108に出力
する。
The assembler function call translating unit 905 is activated by the control unit 904, activates the assembler template selecting unit 105, and receives from the assembler template selecting unit 105 the definition corresponding to the assembler template function called by the function call description. Allocate any of the candidate registers to the virtual register used in the main description of the definition of the assembler template function, and save and restore the code and register for setting arguments and return values and registers To generate an assembler code and output the generated assembler code to the output file storage unit 108.

【0031】アセンブラテンプレート選択部105は、
アセンブラ関数呼出翻訳部107により起動され、関数
呼出記述で呼び出されるアセンブラテンプレート関数に
対応する複数の定義、即ち複数のアセンブラテンプレー
トを、アセンブラテンプレート記憶部103から獲得
し、それぞれのアセンブラテンプレートのコストを計算
し、最小のコストのアセンブラテンプレートを選択し、
アセンブラ関数呼出翻訳部107に渡す。なお、コスト
とは、アセンブラテンプレートの選択に用いるための指
標値をいい、コストが低いことは、アセンブラテンプレ
ート関数の翻訳結果であるアセンブラコードのコードサ
イズが小さい又はそのアセンブラコードの実行サイクル
数が短いものであることを表す。
The assembler template selection unit 105
A plurality of definitions corresponding to the assembler template functions invoked by the assembler function call translator 107 and called by the function call description, that is, a plurality of assembler templates are obtained from the assembler template storage 103, and the cost of each assembler template is calculated. And select the lowest cost assembler template,
It is passed to the assembler function call translator 107. Note that the cost refers to an index value for use in selecting an assembler template, and a low cost means that the code size of the assembler code that is the translation result of the assembler template function is small or the number of execution cycles of the assembler code is short. It represents a thing.

【0032】一般命令翻訳部106は、制御部104に
より起動され、アセンブラテンプレート関数の呼出記述
を含む文以外の文を、文の内容に応じてアセンブラコー
ドに変換して出力ファイル格納部108に出力する。な
お、一般命令翻訳部106は、従来のプログラム変換装
置900における一般命令翻訳部906と同等である。
The general instruction translating unit 106 is activated by the control unit 104, converts a sentence other than a statement including a call description of an assembler template function into assembler code according to the contents of the sentence, and outputs it to the output file storage unit 108. I do. The general instruction translating unit 106 is equivalent to the general instruction translating unit 906 in the conventional program conversion device 900.

【0033】なお、プログラム変換装置100は、ソー
スファイル格納部101及びアセンブラテンプレートフ
ァイル格納部102からソースプログラム及びアセンブ
ラテンプレートを読み出した後は、一般のコンパイラが
ソースプログラムを内部形式に変換して翻訳処理するの
と同様に、ソースプログラム及びアセンブラテンプレー
トを処理効率のよい所定の内部形式に変換しておき、こ
れらをアセンブラコードへ翻訳する処理を実行する。 <データ内容>以下、アセンブラテンプレートファイル
格納部102に格納されている複数のアセンブラテンプ
レートについて説明する。
After reading the source program and the assembler template from the source file storage unit 101 and the assembler template file storage unit 102, the program conversion apparatus 100 converts a source program into an internal format by a general compiler and performs a translation process. Similarly, the source program and the assembler template are converted into a predetermined internal format having high processing efficiency, and a process of translating these into assembler code is executed. <Data Content> Hereinafter, a plurality of assembler templates stored in the assembler template file storage unit 102 will be described.

【0034】図7は、複数のアセンブラテンプレートの
内容例を示す図である。同図の例では、同一の関数名の
2つのアセンブラテンプレート関数の定義記述である2
つのアセンブラテンプレートを示している。まず、同図
中のテンプレート1、即ち1つ目のアセンブラテンプレ
ート関数の定義について説明する。
FIG. 7 is a diagram showing an example of the contents of a plurality of assembler templates. In the example of FIG. 2, the definition description of two assembler template functions having the same function name is given.
Shows two assembler templates. First, the definition of template 1 in the figure, that is, the first assembler template function will be described.

【0035】「fir」は、アセンブラテンプレート関
数の関数名を表す。「$p1={p0,p1,p2,p
3}」は、「$p1」という仮想レジスタがアセンブラ
テンプレート関数の第1引数を表し、「{p0,p1,
p2,p3}」が第1引数の割り当て候補のレジスタを
表す。「$p2={p4,p5,p6,p7}」は、
「$p2」という仮想レジスタがアセンブラテンプレー
ト関数の第2引数を表し、「{p4,p5,p6,p
7}」が第2引数の割り当て候補のレジスタを表す。
"Fir" represents a function name of an assembler template function. "$ p1 = {p0, p1, p2, p
3}, the virtual register “$ p1” represents the first argument of the assembler template function, and “$ p0, p1,
p2, p3} "indicates a register of a candidate for assignment of the first argument. "{P2 = {p4, p5, p6, p7}"
The virtual register “$ p2” represents the second argument of the assembler template function, and “$ p4, p5, p6, p
7} "indicates a register of a candidate for assignment of the second argument.

【0036】「$p3={r0,r1,r2,r3}」
は、「$p3」という仮想レジスタがアセンブラテンプ
レート関数の第3引数を表し、「{r0,r1,r2,
r3}」が第3引数の割り当て候補のレジスタを表す。
「$t1={a0,a1}」は、「$t1」という仮想
レジスタがアセンブラテンプレート関数内で使用される
1番目の一時資源を表し、「{a0,a1}」が一時資
源への割り当て候補のレジスタを表す。
"{P3 = {r0, r1, r2, r3}"
Indicates that the virtual register “$ p3” represents the third argument of the assembler template function, and “$ r0, r1, r2,
r3} "indicates a register of a candidate for assignment of the third argument.
“{T1 = {a0, a1}” represents the first temporary resource whose virtual register “{t1” is used in the assembler template function, and “{a0, a1}” is a candidate for temporary resource allocation. Represents a register.

【0037】「ret={$t1}」は、アセンブラテ
ンプレート関数内で使用される1番目の一時資源が関数
の戻り値とされることを表す。「kill={$p1,
$p2}」は、第1引数、第2引数の値が関数内で変更
されることを表す。「code={・・・}」の内容と
して記述された「repn $p3」及び「mac $
t1,m($p1,1),m($p2,1)」は、アセ
ンブラテンプレート関数の定義の本体的な記述であり、
「$p1」、「$p2」、「$p3」、「$t1」とい
う仮想レジスタを用いて表されたアセンブラコードであ
る。
"Ret = {t1}" indicates that the first temporary resource used in the assembler template function is the return value of the function. "Kill = $ p1,
{P2} ”indicates that the values of the first and second arguments are changed in the function. "Repn @ p3" and "mac @@" described as the contents of "code = {...}"
“t1, m ($ p1,1), m ($ p2,1)” is the main description of the definition of the assembler template function.
This is an assembler code represented using virtual registers “$ p1”, “$ p2”, “$ p3”, and “$ t1”.

【0038】「cost=2]は、コストが2であるこ
とを表す。次に、同図中のテンプレート2、即ち関数名
「fir」の2つ目のアセンブラテンプレート関数の定
義について、テンプレート1と異なる点についてのみ説
明する。「$p3={imm}」は、「$p3」という
仮想レジスタがアセンブラテンプレート関数の第3引数
を表し、「{imm}」が第3引数の割り当て候補は定
数値であることを表す。
[Cost = 2] indicates that the cost is 2. Next, regarding the definition of the template 2 in FIG. Only the differences will be described. “{P3 = {imm}” indicates that the virtual register “{p3” ”indicates the third argument of the assembler template function, and“ {imm} ”indicates that the assignment candidate of the third argument is a constant value.

【0039】「code={・・・}」の内容として記
述された「macr $sp3,$t1,m($p1,
1),m($p2,1)」は、アセンブラテンプレート
関数の定義の本体的な記述であり、「$p1」、「$p
2」、「$p3」、「$t1」という仮想レジスタを用
いて表されたアセンブラコードである。「cost=
1]は、コストが1であることを表す。 <動作>以下、上述の構成を備えるプログラム変換装置
100の動作について、図6に示したC言語で記述され
たソースプログラムの変換を例として、説明する。
[Macr $ sp3, $ t1, m ($ p1,
1), m ($ p2, 1) "are the main descriptions of the definition of the assembler template function, and" $ p1 "and" $ p
This is an assembler code represented using virtual registers “2”, “$ p3”, and “$ t1”. "Cost =
1] indicates that the cost is 1. <Operation> Hereinafter, the operation of the program conversion device 100 having the above-described configuration will be described by taking as an example the conversion of a source program described in the C language shown in FIG.

【0040】前提として、この変換対象となる図6に示
したソースプログラムがソースファイル格納部101に
格納されているものとし、図7に示した2つのアセンブ
ラテンプレート関数の定義、即ち2つのアセンブラテン
プレートが、アセンブラテンプレートファイル格納部1
02に格納されているものとする。図2は、プログラム
変換装置100の動作を示すフローチャートである。
It is assumed that the source program shown in FIG. 6 to be converted is stored in the source file storage unit 101, and the two assembler template functions shown in FIG. Is the assembler template file storage 1
02 is stored. FIG. 2 is a flowchart showing the operation of the program conversion device 100.

【0041】まず、プログラム変換装置100は、アセ
ンブラテンプレートファイル格納部102に格納されて
いる全てのアセンブラテンプレートを読み出してプログ
ラム変換装置の内部形式に変換して、アセンブラテンプ
レート記憶部103に格納する(ステップS201)。
アセンブラテンプレートを読み出した後に、プログラム
変換装置100は、ソースファイル格納部101に格納
されているソースプログラムを読み出してメモリに格納
する(ステップS202)。
First, the program conversion apparatus 100 reads out all the assembler templates stored in the assembler template file storage unit 102, converts them into the internal format of the program conversion apparatus, and stores them in the assembler template storage unit 103 (step). S201).
After reading the assembler template, the program conversion device 100 reads the source program stored in the source file storage unit 101 and stores it in the memory (Step S202).

【0042】ソースプログラムがメモリに格納された後
に、制御部104は、ソースプログラム中の各文に逐次
着目して、その内容に応じて翻訳処理を行う(ステップ
S203〜S208)。即ち、制御部104は、ソース
プログラムの1文に着目し(ステップS203)、この
文が関数の呼出記述であるかを判断し(ステップS20
4)、関数の呼出記述である場合には次にアセンブラテ
ンプレート記憶部103にその呼び出す関数名が記憶さ
れているかを判断し(ステップS205)、記憶されて
いるときには、アセンブラ関数呼出翻訳部107を起動
して、アセンブラ関数呼出翻訳処理を実行させる(ステ
ップS206)。なお、アセンブラ関数呼出翻訳処理に
ついては、後に詳細に説明する。
After the source program is stored in the memory, the control unit 104 sequentially focuses on each sentence in the source program and performs a translation process according to the contents (steps S203 to S208). That is, the control unit 104 focuses on one statement of the source program (step S203), and determines whether this statement is a function call description (step S20).
4) If it is a function call description, it is next determined whether or not the function name to be called is stored in the assembler template storage unit 103 (step S205). Activate and execute assembler function call translation processing (step S206). The assembler function call translation process will be described later in detail.

【0043】図6に示すソースプログラム中の1つの文
である「result1=fir(v1,v2,n)」
は関数の呼出記述であり、かつ関数名「fir」はアセ
ンブラテンプレート記憶部103に格納されているので
(図7参照)、アセンブラ関数呼出翻訳処理が行われる
ことになる。また、制御部104は、着目した文が(ス
テップS203)、関数の呼出記述ではない場合か(ス
テップS204)、又は呼び出される関数の名前がアセ
ンブラテンプレート記憶部103に記憶されていない場
合には(ステップS205)、一般命令翻訳部106を
起動して、文の内容に応じてアセンブラコードに変換す
る一般命令翻訳処理を実行させる(ステップS20
7)。一般命令翻訳処理については、一般のコンパイラ
における翻訳処理と同様であるので、詳細な動作説明は
省略する。
One statement in the source program shown in FIG. 6, “result1 = fir (v1, v2, n)”
Is a function call description, and the function name "fir" is stored in the assembler template storage unit 103 (see FIG. 7), so that assembler function call translation processing is performed. Further, the control unit 104 determines whether the focused statement (step S203) is not a function call description (step S204), or if the name of the function to be called is not stored in the assembler template storage unit 103 ( (Step S205), the general instruction translating unit 106 is activated to execute a general instruction translating process for converting into an assembler code according to the contents of the sentence (Step S20).
7). The general instruction translating process is the same as the translating process in a general compiler, and a detailed description of the operation is omitted.

【0044】アセンブラ関数呼出翻訳処理(ステップS
206)又は一般命令翻訳処理(ステップS207)が
終了した後に、制御部104は、ソースプログラム中に
未だ着目していない文があるか否かを判断し(ステップ
S208)、未だ着目していない文があるならば次の文
に着目すべくステップS203の処理に戻る。図6に示
すソースプログラム中にはまだ次の文「result2
=fir(v3,v4,10)」があるのでその文に着
目することになる(ステップS203)。この文も関数
呼び出しで(ステップS204)、関数名「fir」は
アセンブラテンプレート記憶部103に格納されている
ので(ステップS205)、アセンブラ関数呼出翻訳処
理がなされることになる(ステップS206)。
Assembler function call translation processing (step S
206) or after the general instruction translation process (step S207) ends, the control unit 104 determines whether or not there is a sentence in the source program that has not been noticed yet (step S208). If there is, the process returns to step S203 to focus on the next sentence. In the source program shown in FIG. 6, the following statement “result2
= Fir (v3, v4,10) ", the sentence is focused on (step S203). This sentence is also a function call (step S204), and the function name "fir" is stored in the assembler template storage unit 103 (step S205), so that assembler function call translation processing is performed (step S206).

【0045】こうして、ステップS208の判断におい
て、未だ着目していない文がない場合、即ち、全ての文
を処理し終えた場合には、プログラム変換装置100
は、ソースプログラムの変換に関する動作を終了する。 <アセンブラ関数呼出翻訳処理>以下、アセンブラ関数
呼出翻訳部107が行なうアセンブラ関数呼出翻訳処理
について説明する。
As described above, in the judgment in step S208, when there is no sentence that has not been focused on yet, that is, when all the sentences have been processed, the program conversion apparatus 100
Ends the operation related to the conversion of the source program. <Assembler function call translation process> The assembler function call translation process performed by the assembler function call translation unit 107 will be described below.

【0046】図3は、アセンブラ関数呼出翻訳部107
が行なうアセンブラ関数呼出翻訳処理の内容を示すフロ
ーチャートである。アセンブラ関数呼出翻訳部107
は、メモリに格納されているソースプログラム中のアセ
ンブラテンプレート関数の呼出記述を参照するために必
要なメモリアドレス等の情報を制御部104から起動時
に渡される。図6に示すアセンブラテンプレート関数の
呼出記述である「result1=fir(v1,v
2,n)」を参照するための情報が渡されて、アセンブ
ラ関数呼出翻訳部107が起動される場合を例にして説
明する。
FIG. 3 shows an assembler function call translator 107.
3 is a flowchart showing the contents of an assembler function call translation process performed by the program. Assembler function call translator 107
, Information such as a memory address necessary for referring to the call description of the assembler template function in the source program stored in the memory is passed from the control unit 104 at the time of startup. “Result1 = fir (v1, v1), which is a call description of the assembler template function shown in FIG.
(2, n) "will be described by way of example, when information for referring to" 2, n) is passed and the assembler function call translating unit 107 is activated.

【0047】アセンブラ関数呼出翻訳部107は、起動
されると、ソースプログラムに記述された変数に割り当
てないレジスタ、即ち退避及び復元なしで使用可能なレ
ジスタを求め(ステップS301)、その退避及び復元
なしで使用可能なレジスタを示す情報とアセンブラテン
プレート関数の呼出記述を示す情報とを渡して、アセン
ブラテンプレート選択部105を起動する。なお、変数
に割り当てないレジスタがどれであるか等は従来のコン
パイラにおいてなされている手法により求めることがで
きる。
When activated, the assembler function call translator 107 obtains a register that is not assigned to a variable described in the source program, that is, a register that can be used without saving and restoring (step S301). Then, the assembler template selection unit 105 is activated by passing the information indicating the registers that can be used and the information indicating the call description of the assembler template function. Incidentally, which register is not assigned to a variable can be obtained by a method used in a conventional compiler.

【0048】アセンブラテンプレート選択部105は起
動されると、複数のアセンブラテンプレートから最適な
アセンブラテンプレートを選択するアセンブラテンプレ
ート選択処理を行い、ここでは、「result1=f
ir(v1,v2,n)」について「fir」というアセ
ンブラテンプレート関数の定義として図7に示したテン
プレート1を選択しアセンブラ関数呼出翻訳部107に
通知する(ステップS302)。このアセンブラテンプ
レート選択処理については後に詳細に説明する。
When activated, the assembler template selection unit 105 performs an assembler template selection process of selecting an optimal assembler template from a plurality of assembler templates. In this case, "result1 = f
For “ir (v1, v2, n)”, the template 1 shown in FIG. 7 is selected as the definition of the assembler template function “fir” and is notified to the assembler function call translator 107 (step S302). This assembler template selection processing will be described later in detail.

【0049】次に、アセンブラ関数呼出翻訳部107
は、アセンブラテンプレート選択部105により選択さ
れたアセンブラテンプレート関数の定義をアセンブラコ
ードに変換する際に引数と戻り値についての受渡しのコ
ードが必要か否かを判断する(ステップS303)。必
要である場合には、アセンブラ関数呼出翻訳部107
は、引数及び戻り値について必要な受渡しのコードを生
成する(ステップS304)。また、引数及び戻り値に
ついての受渡しのコードが必要でなければステップS3
04をスキップする。
Next, the assembler function call translator 107
Determines whether a code for passing arguments and return values is required when converting the definition of the assembler template function selected by the assembler template selection unit 105 into assembler code (step S303). If necessary, the assembler function call translator 107
Generates the necessary delivery code for the argument and the return value (step S304). If the delivery code for the argument and the return value is not necessary, step S3
Skip 04.

【0050】ステップS304で、アセンブラ関数呼出
翻訳部107は、「result1=fir(v1,v
2,n)」に対して、引数「v1」、「v2」、「n」
についてはそれぞれ「mov$p1,v1」、「mov
$p2,v2」、「mov$p3,(n)」という受渡
しのコードを、戻り値result1については「mo
v(result1),$t1」という受渡しのコード
を生成する。
In step S304, the assembler function call translating unit 107 sets “result1 = fir (v1, v
2, n)], the arguments “v1”, “v2”, “n”
For "mov @ p1, v1" and "mov
$ P2, v2 "," mov @ p3, (n) ", and the return value result1 is" mo
v (result1), {t1 "is generated.

【0051】なお、アセンブラ関数翻訳部107は、引
数についての受渡しのコードは、アセンブラテンプレー
ト関数の定義の本体的記述に対応して生成するアセンブ
ラコードの前に挿入し、戻り値についての受渡しのコー
ドは本体的記述に対して生成するアセンブラコードの後
に挿入する。必要に応じて引数及び戻り値についての受
渡しのコードを生成した後に、アセンブラ関数呼出翻訳
部107は、アセンブラテンプレート中の割り当て候補
のレジスタについての記述を参照して、アセンブラテン
プレート関数の定義の本体的記述における仮想レジスタ
「$p3」、「$t1」、「$p1」及び「$p2」に
割り当てる現実のレジスタを決定し、これらの仮想レジ
スタを決定した現実のレジスタに置き換えることにより
アセンブラコードを生成する(ステップS305)。な
お、置き換える現実のレジスタの決定は、従来のプログ
ラム変換装置における手法と同様の手法で実現できるの
で、ここでは、説明を省略する。
The assembler function translator 107 inserts the delivery code for the argument before the assembler code generated corresponding to the body description of the definition of the assembler template function, and delivers the delivery code for the return value. Is inserted after the assembler code generated for the body description. After generating the code for passing the arguments and return values as necessary, the assembler function call translator 107 refers to the description of the register of the allocation candidate in the assembler template, and determines the definition of the assembler template function. Assembler code is generated by determining actual registers to be assigned to virtual registers “$ p3”, “$ t1”, “$ p1”, and “$ p2” in the description, and replacing these virtual registers with the determined real registers. (Step S305). The actual register to be replaced can be determined by a method similar to the method in the conventional program conversion device, and the description is omitted here.

【0052】ここでは、テンプレート1のパラメータで
ある仮想レジスタ「$p1」、「$p2」、「$p3」
及び「$t1」が、それぞれ実レジスタ「p0」、「p
4」、「r0」及び「a0」に置き換えられることとし
て説明する。次に、アセンブラ関数翻訳部107は、置
き換える現実のレジスタが、既にアセンブラコードに変
換済みの部分において使用されている場合は、関数の呼
出記述に関して変換する場合における従来のプログラム
変換装置における手法と同様の手法により、退避及び復
元のコードが必要か否かを判断する(ステップS30
6)。
Here, the virtual registers “$ p1”, “$ p2”, “$ p3” which are the parameters of template 1
And "@ t1" are the real registers "p0" and "p
4 "," r0 "and" a0 ". Next, when the actual register to be replaced is used in a portion that has already been converted into assembler code, the assembler function translating unit 107 performs the same conversion as that of the conventional program conversion device in converting the function call description. It is determined whether or not the save and restore codes are necessary by the method (step S30).
6).

【0053】退避及び復元が必要であると判断した場合
には、アセンブラ関数翻訳部107は、レジスタの退避
及び復元のアセンブラコードを生成し、アセンブラテン
プレート関数の定義の本体的記述に対応して生成された
アセンブラコードの前に退避のコードを挿入し、本体的
記述に対応して生成するアセンブラコードの後に復元の
コードを挿入する(ステップS307)。また、退避及
び復元が必要でないと判断した場合には、ステップS3
07をスキップする。
If it is determined that saving and restoring are necessary, the assembler function translating unit 107 generates assembler codes for register saving and restoring, and generates the assembler template function in accordance with the main description of the definition of the assembler template function. A save code is inserted before the generated assembler code, and a restoration code is inserted after the assembler code generated corresponding to the main description (step S307). If it is determined that saving and restoring are not necessary, step S3
Skip 07.

【0054】ここでは、「p0」、「p4」、「r0」
及び「a0」は退避及び復元の必要がなく、ステップS
307の処理は行なわれないこととして説明する。最後
に、アセンブラ関数翻訳部107は、アセンブラテンプ
レート関数の定義の本体的記述に対応して生成されたア
センブラコードを出力ファイル106に出力し(ステッ
プS308)、アセンブラ関数呼出翻訳処理を終了す
る。
Here, "p0", "p4", "r0"
And "a0" do not need to be saved and restored, and
It is assumed that the process of 307 is not performed. Finally, the assembler function translator 107 outputs the assembler code generated corresponding to the main description of the definition of the assembler template function to the output file 106 (step S308), and ends the assembler function call translation process.

【0055】また、図6に示すアセンブラテンプレート
関数の呼出記述である「result2=fir(v
3,v4,10)」を参照するための情報が渡されて起
動された場合には、アセンブラ関数翻訳部107は、基
本的には上述した「result1=fir(v1,v
2,n)」が渡された場合と同様の動作を行うが、アセ
ンブラテンプレート選択部105によりなされるアセン
ブラテンプレート選択処理(ステップS302)におい
て、図7に示したテンプレート2が選択されるため、結
果的に「result1=fir(v1,v2,n)」
に対応して生成される命令列とは異なる命令列からなる
アセンブラコードを生成する。
Further, "result2 = fir (v)" which is a call description of the assembler template function shown in FIG.
3, v4, 10) ”, the assembler function translating unit 107 basically executes the above-mentioned“ result1 = fir (v1, v1, v4, 10) ”.
2, n)] is passed, but the template 2 shown in FIG. 7 is selected in the assembler template selection processing (step S302) performed by the assembler template selection unit 105, and the result is "Result1 = fir (v1, v2, n)"
, An assembler code including an instruction sequence different from the instruction sequence generated in response to is generated.

【0056】このようなアセンブラ関数呼出翻訳処理に
よって、図6に示したソースプログラムは図8に示すア
センブラコードに変換される。プログラム変換装置10
0は、「fir」というアセンブラテンプレート関数
を、最適なアセンブラコードに変換するため、その呼出
記述における引数に応じて、定義としてテンプレート1
又はテンプレート2を選択的に採用し、図8に示すよう
に、各呼出記述を「repn」と「mac」という命令
列を中心としたアセンブラコード又は「macr」とい
う命令を中心としたアセンブラコードに変換する。
By such assembler function call translation processing, the source program shown in FIG. 6 is converted into the assembler code shown in FIG. Program conversion device 10
0 is used to convert an assembler template function “fir” into an optimal assembler code.
Alternatively, the template 2 is selectively adopted, and as shown in FIG. 8, each call description is converted into an assembler code centered on an instruction sequence of “repn” and “mac” or an assembler code centered on an instruction “macr”. Convert.

【0057】<アセンブラテンプレート選択処理>以
下、アセンブラテンプレート選択部105が行なうアセ
ンブラテンプレート選択処理について説明する。図4
は、アセンブラテンプレート選択部105が行なうアセ
ンブラテンプレート選択処理の内容を示すフローチャー
トである。
<Assembler template selection processing> The assembler template selection processing performed by the assembler template selection unit 105 will be described below. FIG.
9 is a flowchart showing the contents of assembler template selection processing performed by the assembler template selection unit 105.

【0058】アセンブラテンプレート選択部105は、
アセンブラ関数翻訳部107に起動され、起動される際
に、退避及び復元なしで使用可能なレジスタを示す情報
とアセンブラテンプレート関数の呼出記述を示す情報と
を渡される。ここでは、図6に示すアセンブラテンプレ
ート関数の呼出記述である「result1=fir
(v1,v2,n)」が渡される場合と、「resul
t2=fir(v3,v4,10)」が渡される場合と
を例として説明する。
The assembler template selection unit 105
It is activated by the assembler function translating unit 107, and at the time of activation, information indicating a register that can be used without saving and restoring and information indicating a call description of an assembler template function are passed. Here, "result1 = file" which is a call description of the assembler template function shown in FIG.
(V1, v2, n) "and" resul
t2 = fir (v3, v4, 10) "will be described as an example.

【0059】アセンブラテンプレート選択部105は、
アセンブラテンプレート関数の呼出記述において呼出対
象とされた関数名を持つ複数のアセンブラテンプレート
関数の定義をアセンブラテンプレート記憶部103から
獲得する(ステップS401)。アセンブラテンプレー
ト選択部105は、「result1=fir(v1,
v2,n)」や「result2=fir(v3,v
4,n)」については図7に示した「fir」という関
数名のテンプレート1及びテンプレート2を獲得する。
The assembler template selection unit 105
The definition of a plurality of assembler template functions having the function names to be called in the call description of the assembler template function is obtained from the assembler template storage unit 103 (step S401). The assembler template selection unit 105 determines “result1 = fir (v1,
v2, n) ”or“ result2 = fir (v3, v
[4, n)], the template 1 and the template 2 having the function name “fir” shown in FIG. 7 are obtained.

【0060】アセンブラテンプレート選択部105は、
獲得した複数のアセンブラテンプレート関数の定義のう
ち、コストが最小であるアセンブラテンプレート関数の
定義を選択するものであり、このためステップS402
からS407までの処理を行なう。アセンブラテンプレ
ート選択部105は、アセンブラテンプレート関数の1
つの定義に着目し(ステップS402)、アセンブラテ
ンプレート関数の呼出記述を変換するのに使用可能な定
義であるか否かを判断する(ステップS403)。
The assembler template selection unit 105
Among the acquired definitions of the plurality of assembler template functions, the definition of the assembler template function having the minimum cost is selected. Therefore, step S402 is performed.
To S407. The assembler template selection unit 105 outputs one of the assembler template functions.
Focusing on one definition (step S402), it is determined whether or not the definition can be used to convert the call description of the assembler template function (step S403).

【0061】アセンブラテンプレート選択部105は、
図7に示したテンプレート1に着目した場合、「res
ult1=fir(v1,v2,n)」に対する場合で
も「result2=fir(v3,v4,10)」に
対する場合でも、使用可能であると判断する。このよう
に判断するのは、引数が定数、即ち即値でないと使用で
きない旨の条件、つまり後述するimmを用いた記述
が、テンプレート1中に含まれていないからである。
The assembler template selecting unit 105
Focusing on template 1 shown in FIG. 7, “res
It is determined that it can be used regardless of whether “ult1 = fir (v1, v2, n)” or “result2 = fir (v3, v4, 10)”. This determination is made because the template 1 does not include a condition that the argument cannot be used unless it is a constant, that is, an immediate value, that is, a description using imm described later.

【0062】しかし、アセンブラテンプレート選択部1
05は、図7に示したテンプレート2に着目した場合、
テンプレート2の定義内の「$p3={imm}」は第
3引数が即値でなければならないことを示しているの
で、第3引数が即値である呼出記述では使用可能である
が、第3引数が即値でない呼出記述では使用可能でない
と判断する。従って、「result1=fir(v
1,v2,n)」に対する場合には、「fir」の第3
引数「n」が即値でないので使用可能でないと判断し、
「result2=fir(v3,v4,10)」に対
する場合には、「fir」の第3引数「10」が即値な
ので使用可能であると判断する。
However, assembler template selecting section 1
05 focuses on template 2 shown in FIG.
Since “{p3 = {imm}” in the definition of template 2 indicates that the third argument must be an immediate value, it can be used in a call description in which the third argument is an immediate value. Is not usable in a call description that is not an immediate value. Therefore, “result1 = fir (v
1, v2, n)], the third of “fir”
Judge that the argument "n" is not usable because it is not an immediate value,
In the case of “result2 = fir (v3, v4,10)”, it is determined that the third argument “10” of “fir” can be used because it is an immediate value.

【0063】アセンブラテンプレート選択部105は、
着目しているアセンブラテンプレート関数の定義が使用
可能であると判断した場合には、その定義についてのコ
ストを計算するコスト計算処理を行なう(ステップS4
04)。このコスト計算処理については後に詳細に説明
する。次に、計算結果であるコストが、過去に計算した
コストの中で最小のものであるか否かを判断し(ステッ
プS405)、最小のコストであると判断した場合に
は、着目しているアセンブラテンプレート関数の定義を
選択し(ステップS406)、未だ着目していないアセ
ンブラテンプレート関数の定義があるか否かの判断を行
う(ステップS407)。
The assembler template selection unit 105
If it is determined that the definition of the focused assembler template function is usable, a cost calculation process for calculating the cost for the definition is performed (step S4).
04). This cost calculation process will be described later in detail. Next, it is determined whether or not the calculated cost is the smallest of the costs calculated in the past (step S405), and if it is determined that the cost is the minimum, attention is paid. The definition of the assembler template function is selected (step S406), and it is determined whether there is an assembler template function definition that has not been focused on yet (step S407).

【0064】なお、ステップS406において、着目し
ているアセンブラテンプレート関数の定義を選択すると
きに、既にアセンブラテンプレート関数の定義が選択さ
れているならば、それに替えて、着目しているアセンブ
ラテンプレート関数の定義を新たに選択する。また、ス
テップS405において最小のコストでないと判断した
場合にはステップS406をスキップして、ステップS
407の判断を行う。
In step S406, when the definition of the focused assembler template function is selected, if the definition of the focused assembler template function has already been selected, the definition of the focused assembler template function is replaced. Select a new definition. If it is determined in step S405 that the cost is not the minimum, step S406 is skipped and step S406 is skipped.
407 is determined.

【0065】また、ステップS403において、着目し
ているアセンブラテンプレート関数の定義が使用可能で
ないと判断した場合には、ステップS404からステッ
プS406をスキップして、ステップS407の判断を
行う。ステップS407において、未だ着目していない
アセンブラテンプレート関数の定義があると判断した
ら、次のアセンブラテンプレート関数の定義に着目すべ
くステップS402の処理に戻り、全てのアセンブラテ
ンプレート関数の定義を処理し終えたならば、アセンブ
ラテンプレート選択処理を終了する。
If it is determined in step S403 that the definition of the assembler template function of interest is not usable, steps S404 to S406 are skipped, and the determination in step S407 is performed. If it is determined in step S407 that there is a definition of an assembler template function that has not been focused on, the process returns to step S402 to focus on the definition of the next assembler template function, and all the assembler template function definitions have been processed. If so, the assembler template selection process ends.

【0066】こうして、「result1=fir(v
1,v2,n)」の場合は、選択候補が図7に示すテン
プレート1のみであるため、アセンブラテンプレート選
択部105により最終的に選択されるものはテンプレー
ト1となる。なお、使用可能な定義が1つしかない場合
においては、最小のコストのものを探すためのステップ
S404及びステップS405を行わない。
Thus, "result1 = fir (v
In the case of “1, v2, n)”, only the template 1 shown in FIG. 7 is selected, so that the template 1 is finally selected by the assembler template selecting unit 105. If there is only one usable definition, steps S404 and S405 for searching for the one with the lowest cost are not performed.

【0067】また、「result2=fir(v3,
v4,10)」の場合は、選択候補は図7に示すテンプ
レート1及びテンプレート2の両方であり、後述するコ
スト計算処理の結果として、図7に示すテンプレート1
のコストが6と計算され、テンプレート2のコストが4
と計算されるので、アセンブラテンプレート選択部10
5により最終的に選択されるものはテンプレート2とな
る。
Also, "result2 = fir (v3,
v4, 10) ", the selection candidates are both the template 1 and the template 2 shown in FIG. 7, and as a result of the cost calculation process described later, the template 1 shown in FIG.
Is calculated as 6, and the cost of template 2 is 4
Is calculated, the assembler template selecting unit 10
5 is finally selected as template 2.

【0068】<コスト計算処理>以下、コスト計算処理
について説明する。図5は、アセンブラテンプレート選
択部105が行うコスト計算処理の内容を示すフローチ
ャートである。コスト計算処理として、アセンブラテン
プレート選択部105は、例えば図7に示したテンプレ
ート1では「cost=2」というように、アセンブラ
テンプレート関数の定義において記述されているコスト
を得てこれをコスト計算値の初期値とし(ステップS5
01)、引数についての受渡しのコードが必要か否かを
判断する(ステップS502)。なお、この例では、
「cost」の数値は実行サイクル数を表すものとす
る。
<Cost Calculation Process> The cost calculation process will be described below. FIG. 5 is a flowchart illustrating the content of the cost calculation process performed by the assembler template selection unit 105. As a cost calculation process, the assembler template selecting unit 105 obtains the cost described in the definition of the assembler template function, such as “cost = 2” in the template 1 shown in FIG. Initial value (step S5
01), it is determined whether or not a code for passing an argument is necessary (step S502). In this example,
The numerical value of “cost” indicates the number of execution cycles.

【0069】アセンブラテンプレート選択部105は、
引数についての受渡しのコードが必要である場合には引
数についての受渡しのコードのコストをコスト計算値に
加算することにより新たにコスト計算値を求め(ステッ
プS503)、必要でない場合にはステップS503を
スキップし、次にレジスタの退避・復元のコードが必要
か否かを判断する(ステップS504)。
The assembler template selection unit 105
If the code for the delivery of the argument is necessary, the cost of the code for the delivery of the argument is added to the cost calculation value to obtain a new cost calculation value (step S503). Skipping is performed, and it is determined whether a code for saving and restoring the register is necessary (step S504).

【0070】アセンブラテンプレート選択部105は、
レジスタの退避及び復元のコードが必要である場合には
レジスタの退避及び復元のコードのコストをコスト計算
値に加算することにより新たにコスト計算値を求め(ス
テップS505)、必要でない場合には、ステップS5
05をスキップし、コスト計算処理を終了する。つま
り、「テンプレート関数の定義の本体的記述部分のコス
ト」と「引数についての受渡しコードのコスト」と「レ
ジスタの退避及び復元のコードのコスト」との和が、ア
センブラテンプレート関数の定義についての最終的なコ
スト計算値となる。
The assembler template selection unit 105
If the register save and restore codes are required, the cost of the register save and restore codes is added to the cost calculated value to obtain a new cost calculated value (step S505). Step S5
05 is skipped, and the cost calculation process ends. In other words, the sum of the "cost of the body description part of the template function definition", the "cost of the passing code for arguments", and the "cost of the register save and restore code" is the final value of the assembler template function definition. Cost calculation value.

【0071】このようなコスト計算処理により、「re
sult2=fir(v3,v4,10)」に関しての
図7に示したテンプレート1のコストは、2+4+0=
6と計算され、テンプレート2のコストは、1+3+0
=4と計算される。引数の受け渡しのコードやレジスタ
の退避及び復元のコードのコストについては、一般のプ
ログラム変換装置と同様の処理であるところの、各種変
数等をレジスタに割り付ける処理を実行した結果を踏ま
えて、特にアセンブラテンプレート関数の呼出記述を変
換する際に新たに必要となるコードのみを計算して求め
る。また、これらのコードのコストは、レジスタを利用
する数に応じて求めることができるように算出用の情報
を予め保持していることとしてもよい。例えば、引数と
して変数が3つあれば、1つの戻り値の分と合わせて、
コストを4とする。 <補足>以上、本発明に係るファイル転送システムにつ
いて、実施の形態に基づいて説明したが、本発明はこれ
らの実施の形態に限られないことは勿論である。即ち、 (1)本実施の形態では、プログラム変換装置はアセン
ブラコードを出力することとしたが、アセンブラコード
を機械語の形式に変換して出力することとしてもよい。 (2)ソースファイル格納部101、アセンブラテンプ
レートファイル格納部102及び出力ファイル格納部1
08は、それぞれ別個のハードディスク装置等の記憶装
置であっても、同一の記憶装置であってもよい。 (3)本実施の形態では、アセンブラテンプレート中に
「cost=」という記述形式でもって、コストを明示
する情報が含まれていることを表したが、このようにコ
ストを明示しなくても、用いうる全ての命令それぞれに
ついて、命令と、実行サイクル数、コードサイズ等のコ
ストを示す情報とを対応付けたテーブルを予めメモリ等
に記憶しておき、そのテーブルを参照することによりア
センブラテンプレートに基づき変換されるであろうアセ
ンブラコードについてのコストを算出することとしても
よい。このような方法で、アセンブラテンプレート関数
の複数の定義それぞれについて、コストを算出して比較
することによって、最もコストの小さい定義を選択し
て、その定義に従ってアセンブラテンプレート関数の呼
出記述をアセンブラコードに変換することとしてもよ
い。 (4)本実施の形態では、コストとして実行サイクル数
に着目した例に基づいてプログラム変換装置の動作につ
いて説明したが、実行サイクル数の代わりにコードサイ
ズをコストとして用いることとしてもよい。例えば「c
ost=」の記述がコードサイズを表すように予め記述
しておくこととしてもよい。
By such a cost calculation process, “re
The cost of template 1 shown in FIG. 7 for “sult2 = fir (v3, v4,10)” is 2 + 4 + 0 =
6 and the cost of template 2 is 1 + 3 + 0
= 4. The cost of the code for passing arguments and the code for saving and restoring registers, especially assemblers, are based on the result of executing the process of allocating various variables to registers, which is the same process as general program conversion equipment. Only the code newly required when converting the call description of the template function is calculated and obtained. In addition, the information for calculation may be held in advance so that the cost of these codes can be obtained according to the number of using the registers. For example, if there are three variables as arguments, together with one return value,
The cost is 4. <Supplement> The file transfer system according to the present invention has been described based on the embodiments. However, it is needless to say that the present invention is not limited to these embodiments. That is, (1) In the present embodiment, the program conversion device outputs the assembler code. However, the program conversion device may convert the assembler code into a machine language format and output it. (2) Source file storage unit 101, assembler template file storage unit 102, and output file storage unit 1
Reference numeral 08 may be a storage device such as a separate hard disk device or the same storage device. (3) In the present embodiment, the description format “cost =” is used to indicate that the information specifying the cost is included in the assembler template. For each instruction that can be used, a table in which the instruction is associated with information indicating the cost such as the number of execution cycles and code size is stored in a memory or the like in advance, and the table is referred to based on the assembler template. The cost for the assembler code to be converted may be calculated. In this way, for each of the multiple definitions of the assembler template function, the cost is calculated and compared, the definition with the lowest cost is selected, and the call description of the assembler template function is converted into assembler code according to the definition. You may do it. (4) In the present embodiment, the operation of the program conversion device has been described based on an example in which attention is paid to the number of execution cycles as a cost. However, a code size may be used as a cost instead of the number of execution cycles. For example, "c
The description “ost =” may be described in advance so as to represent the code size.

【0072】また、実行サイクル数とコードサイズとの
値を両方計算できるようにしておき、実行サイクル数と
コードサイズのいずれをコストとして用いるかをプログ
ラムの作成者その他の者による設定に従って決定しアセ
ンブラテンプレート関数の複数の定義のうちコストを最
小とする1つの定義を選択して、その定義に従ってアセ
ンブラテンプレート関数の呼出記述をアセンブラコード
に変換することとしてもよい。 (5)本実施の形態では、テンプレート2の定義内の
「$p3={imm}」により第3引数が即値でなけれ
ばならない旨の引数に関する条件が記述されていること
としたが、引数に関する条件は、引数である即値の大き
さに関する条件であってもよい。例えば、「$p3=
{0<=imm<256}」等といった記述で、第3引
数が0以上256未満の値であることを条件とする等、
引数が所定範囲内の数値であること条件としてもよい。 (6)各アセンブラテンプレート関数についての複数の
定義それぞれについて、その定義が選択候補となり得る
条件をどのような形式で記憶していてもよい。例えば、
引数が1つしかないアセンブラテンプレート関数Aにつ
いてのテンプレートA1とテンプレートA2という2つ
の定義がある場合に、引数が変数ならテンプレートA1
で引数が即値、即ち定数ならテンプレートA2を選択候
補とすることを示す選択用情報を記憶しておくこととし
てもよい。この場合は、選択用情報を参照してステップ
S403の判断を行うことになる。また、各定義につい
てのコストも、どのような形式で記憶していてもよい。 (7)本実施の形態では、退避及び復元のコードや引数
についての受渡しのコードをコスト計算において考慮す
ることとしたが、必ずしもこれらを考慮する必要はな
く、テンプレート関数の定義の本体的記述部分のコスト
のみをコスト計算の結果とすることとしてもよい。 (8)本実施の形態におけるプログラム変換装置の処理
手順(図2〜図5のフローチャートの手順)等を、汎用
のコンピュータ等に実行させるためのコンピュータプロ
グラムを、記録媒体に記録し又は各種通信路等を介し
て、流通させ頒布することもできる。このような記録媒
体には、ICカード、光ディスク、フレキシブルディス
ク、ROM等がある。流通、頒布されたコンピュータプ
ログラムは、コンピュータ等にインストール等されるこ
とにより利用に供され、コンピュータは、当該コンピュ
ータプログラムを実行して、本実施の形態で示したよう
なプログラム変換装置を実現する。
Further, both the number of execution cycles and the code size can be calculated, and which of the number of execution cycles and the code size is used as the cost is determined according to the setting by the creator of the program or other persons, and the assembler determines the cost. One of the plurality of definitions of the template function that minimizes the cost may be selected, and the call description of the assembler template function may be converted into assembler code according to the definition. (5) In the present embodiment, the condition regarding the argument that the third argument must be an immediate value is described by “{p3 = {imm}” in the definition of the template 2. The condition may be a condition relating to the magnitude of an immediate value as an argument. For example, "@ p3 =
A description such as {0 <= imm <256} ", on condition that the third argument is a value of 0 or more and less than 256,
The condition may be that the argument is a numerical value within a predetermined range. (6) For each of a plurality of definitions for each assembler template function, conditions in which the definitions can be selection candidates may be stored in any format. For example,
If there are two definitions, template A1 and template A2, for an assembler template function A that has only one argument, if the argument is a variable, the template A1
If the argument is an immediate value, that is, if it is a constant, selection information indicating that the template A2 is a selection candidate may be stored. In this case, the determination in step S403 is made with reference to the selection information. Further, the cost for each definition may be stored in any format. (7) In the present embodiment, the saving and restoring codes and the code for passing the arguments are taken into account in the cost calculation. However, these need not always be taken into account, and the main description part of the definition of the template function is not necessary. May be the result of the cost calculation. (8) A computer program for causing a general-purpose computer or the like to execute the processing procedure (the procedure of the flowcharts in FIGS. 2 to 5) of the program conversion device according to the present embodiment is recorded on a recording medium or various communication paths. It can also be distributed and distributed through such means. Such a recording medium includes an IC card, an optical disk, a flexible disk, a ROM, and the like. The distributed and distributed computer programs are provided for use by being installed in a computer or the like, and the computer executes the computer programs to realize the program conversion device as described in the present embodiment.

【0073】[0073]

【発明の効果】以上の説明から明らかなように、本発明
に係るプログラム変換装置は、高級言語で記述されたソ
ースプログラムをアセンブラコードに変換するプログラ
ム変換装置であって、アセンブラテンプレート関数につ
いての複数の定義を記憶するテンプレート記憶手段と、
前記ソースプログラムにおけるアセンブラテンプレート
関数の呼出記述を検出する呼出検出手段と、前記呼出検
出手段により前記呼出記述が検出された場合に、当該呼
出記述により呼び出されるアセンブラテンプレート関数
についての複数の定義のうち、最適な1つを選択する選
択手段と、前記呼出検出手段により検出された前記呼出
記述を、前記選択手段により選択されたアセンブラテン
プレート関数の定義に基づいてアセンブラコードに変換
する変換手段とを備えることを特徴とする。
As is apparent from the above description, the program conversion device according to the present invention is a program conversion device for converting a source program described in a high-level language into assembler code. Template storage means for storing the definition of
A call detecting means for detecting a call description of an assembler template function in the source program; and a plurality of definitions of an assembler template function called by the call description when the call description is detected by the call detecting means. Selecting means for selecting an optimum one, and converting means for converting the call description detected by the call detecting means into assembler code based on the definition of the assembler template function selected by the selecting means. It is characterized by.

【0074】これにより、アセンブラテンプレート関数
についての複数の定義のうちの1つが選択されるので、
このプログラム変換装置を利用する場合に、1つのアセ
ンブラテンプレート関数に対して複数の定義を用意して
おけば、ソースプログラム中のアセンブラテンプレート
関数の呼出記述を、その記述内容等に応じた最適なアセ
ンブラコードに変換することが可能になる。
As a result, one of a plurality of definitions for the assembler template function is selected.
When this program conversion device is used, if a plurality of definitions are prepared for one assembler template function, the call description of the assembler template function in the source program can be converted into the optimal assembler according to the description contents. It can be converted to code.

【0075】また、前記呼出検出手段は、前記ソースプ
ログラム中の関数の呼出記述を検出して、当該呼出記述
により呼び出される関数についての定義が前記テンプレ
ート記憶手段に記憶されているか否かを判断し、定義が
記憶されている場合に当該呼出記述をアセンブラテンプ
レート関数の呼出記述として検出することとしてもよ
い。
Further, the call detecting means detects a call description of a function in the source program, and judges whether a definition of a function called by the call description is stored in the template storage means. Alternatively, when the definition is stored, the call description may be detected as a call description of the assembler template function.

【0076】これにより、ソースプログラム上において
通常の関数の呼出記述と同様の形式でもって記述された
アセンブラテンプレート関数の呼出記述を検出して、最
適なアセンブラコードに変換することができるようにな
る。また、前記テンプレート記憶手段は、前記アセンブ
ラテンプレート関数の定義毎に、関数への引数について
の条件がある場合にはその条件を示す条件情報をも記憶
しており、前記選択手段は、前記条件情報に従い、前記
呼出記述に含まれる関数への引数の記述に応じて前記選
択を行うこととしてもよい。
As a result, a call description of an assembler template function described in a format similar to a normal function call description on a source program can be detected and converted into an optimal assembler code. Further, the template storage means also stores, for each definition of the assembler template function, condition information indicating a condition for an argument to the function, when the condition information has a condition, and the selecting means stores the condition information. May be selected according to the description of the argument to the function included in the call description.

【0077】これにより、アセンブラテンプレート関数
の呼出記述において、変数を引数としているか、即値、
即ち定数を引数としているか等、引数の別に対応して、
アセンブラテンプレート関数の呼出記述をより最適なア
センブラコードに変換することができるようになる。ま
た、前記条件情報は、引数が即値でなければならない旨
を示す情報であり、前記選択手段は、前記条件情報に従
い、前記呼出記述に含まれる関数への引数の記述が即値
であるか否かに応じて前記選択を行うこととしてもよ
い。
Thus, in the call description of the assembler template function, whether a variable is an argument,
That is, corresponding to each argument, such as whether a constant is used as an argument,
The call description of the assembler template function can be converted into more optimal assembler code. Further, the condition information is information indicating that the argument must be an immediate, and the selecting means determines whether or not the description of the argument to the function included in the call description is an immediate according to the condition information. May be selected according to the above.

【0078】これにより、アセンブラテンプレート関数
の呼出記述において、変数を引数としているか、定数を
引数としているかに応じて異なるアセンブラコードを生
成すること、即ちアセンブラテンプレート関数の呼出記
述をより最適なアセンブラコードに変換することができ
るようになる。また、前記条件情報は、引数が所定範囲
値内の即値でなければならない旨を示す情報であり、前
記選択手段は、前記条件情報に従い、前記呼出記述に含
まれる関数への引数の記述が所定範囲内の即値であるか
否かに応じて前記選択を行うこととしてもよい。
Thus, in the call description of the assembler template function, different assembler codes are generated depending on whether a variable is used as an argument or a constant is used as an argument, that is, the call description of the assembler template function is converted into a more optimal assembler code. Can be converted. Further, the condition information is information indicating that the argument must be an immediate value within a predetermined range value, and the selecting means determines that the description of the argument to the function included in the call description is in accordance with the condition information. The selection may be made according to whether or not the value is an immediate value within the range.

【0079】これにより、アセンブラテンプレート関数
の呼出記述において、定数を引数としていても、その定
数が所定の範囲の値であるか否かによって、生成するア
センブラコードを異なるものとすることができるように
なる。例えば、0から255まで等の1バイトで表せる
数値範囲の定数であれば、1バイトの即値が指定できる
命令が使えるが、256以上の数値の定数であれば、2
バイトの数値を指定する命令を使わなければならないと
いったような場合において、0から255までの数値の
定数を引数としたアセンブラテンプレート関数の呼出記
述を、2バイトの数値を指定する命令を含むアセンブラ
コードに変換するような無駄を防止することができるよ
うになる。
Thus, even when a constant is used as an argument in the call description of the assembler template function, the generated assembler code can be made different depending on whether the constant is a value within a predetermined range. Become. For example, in the case of a constant in a numerical range that can be represented by 1 byte such as 0 to 255, an instruction that can specify an immediate value of 1 byte can be used.
In the case where an instruction to specify a byte numerical value must be used, the assembler code including an instruction to specify a 2-byte numerical value by calling the assembler template function with a numerical constant from 0 to 255 as an argument. Can be prevented.

【0080】また、前記テンプレート記憶手段は、前記
アセンブラテンプレート関数の定義毎に、最適なものを
選択するための基準となる評価値をも記憶しており、前
記選択手段は、前記各定義についての評価値に基づい
て、前記選択を行うこととしてもよい。これにより、ア
センブラテンプレート関数についての複数の定義のうち
最適な定義を高速に選択することが可能となり、プログ
ラムの変換が迅速に行えるようになる。
Further, the template storage means also stores, for each definition of the assembler template function, an evaluation value serving as a reference for selecting an optimum one, and the selection means stores the evaluation value for each of the definitions. The selection may be made based on the evaluation value. This makes it possible to quickly select an optimal definition from among a plurality of definitions for the assembler template function, and to quickly convert a program.

【0081】また、前記テンプレート記憶手段は、前記
定義毎に当該定義が特定するアセンブラコードについて
の実行サイクル数を示す情報を前記評価値として記憶し
ており、前記選択手段は、前記複数の定義のうち、実行
サイクル数が最小であるアセンブラコードに変換される
ことになる1つの定義を選択することとすることもでき
る。
The template storage means stores, for each of the definitions, information indicating the number of execution cycles for the assembler code specified by the definition as the evaluation value. One of the definitions may be selected to be converted into the assembler code having the minimum number of execution cycles.

【0082】これにより、アセンブラテンプレート関数
の呼出記述を実行速度の速いアセンブラコードに変換す
ることができるようになる。また、前記テンプレート記
憶手段は、前記定義毎に当該定義が特定するアセンブラ
コードについてのコードサイズを示す情報を前記評価値
として記憶しており、前記選択手段は、前記複数の定義
のうち、コードサイズが最小であるアセンブラコードに
変換されることになる1つの定義を選択することとして
もよい。
Thus, the call description of the assembler template function can be converted into assembler code having a high execution speed. The template storage unit stores, for each of the definitions, information indicating a code size of an assembler code specified by the definition as the evaluation value, and the selection unit includes a code size of the plurality of definitions. May be selected to be converted into the assembler code with the minimum.

【0083】これにより、アセンブラテンプレート関数
の呼出記述をサイズの小さなアセンブラコードに変換す
ることができるようになる。また、前記選択手段は、前
記呼出記述を仮に前記定義それぞれにより特定されるア
センブラコードに変換するとした場合に、引数をレジス
タに設定するためのコード並びにレジスタ退避及び復元
のためのコードのうち必要となるコードがあればそのコ
ードをも含めて得られる変換結果のコードについての実
行サイクル数又はコードサイズに基づいて判断すること
により、前記選択を行うこととしてもよい。
Thus, the call description of the assembler template function can be converted into a small-size assembler code. In addition, if the call description is assumed to be converted into assembler code specified by each of the definitions, the selecting means may need to include a code for setting an argument in a register and a code for saving and restoring a register. If there is such a code, the selection may be performed by making a determination based on the number of execution cycles or the code size of the code resulting from the conversion including the code.

【0084】これにより、コスト計算を厳密に行うこと
が可能となり、コストの最小となる最適な定義を選択す
ることができ、この結果として、アセンブラテンプレー
ト関数の呼出記述を最適なアセンブラコードに変換する
ことができるようになる。
As a result, cost calculation can be strictly performed, and an optimal definition that minimizes cost can be selected. As a result, a call description of an assembler template function is converted into an optimal assembler code. Will be able to do it.

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

【図1】本発明の実施の形態に係るプログラム変換装置
100の機能ブロック図である。
FIG. 1 is a functional block diagram of a program conversion device 100 according to an embodiment of the present invention.

【図2】プログラム変換装置100の動作を示すフロー
チャートである。
FIG. 2 is a flowchart showing an operation of the program conversion device 100.

【図3】アセンブラ関数呼出翻訳部107が行なうアセ
ンブラ関数呼出翻訳処理の内容を示すフローチャートで
ある。
FIG. 3 is a flowchart showing the contents of an assembler function call translation process performed by an assembler function call translation unit 107;

【図4】アセンブラテンプレート選択部105が行なう
アセンブラテンプレート選択処理の内容を示すフローチ
ャートである。
FIG. 4 is a flowchart illustrating an assembler template selection process performed by an assembler template selection unit 105;

【図5】アセンブラテンプレート選択部105が行うコ
スト計算処理の内容を示すフローチャートである。
FIG. 5 is a flowchart illustrating the contents of a cost calculation process performed by an assembler template selection unit 105;

【図6】アセンブラテンプレート関数を呼び出す旨の記
述を含むソースプログラムの例を示す図である。
FIG. 6 is a diagram showing an example of a source program including a description for calling an assembler template function.

【図7】アセンブラテンプレートの内容例を示す図であ
る。
FIG. 7 is a diagram showing an example of the contents of an assembler template.

【図8】本発明に係るプログラム変換装置100により
図6に示すソースプログラムを変換した結果のアセンブ
ラコードを示す図である。
8 is a diagram showing assembler code as a result of converting the source program shown in FIG. 6 by the program conversion device 100 according to the present invention.

【図9】従来のプログラム変換装置900の機能ブロッ
ク図である。
FIG. 9 is a functional block diagram of a conventional program conversion device 900.

【図10】従来のアセンブラテンプレートの内容例を示
す図である。
FIG. 10 is a diagram showing a content example of a conventional assembler template.

【図11】従来のプログラム変換装置900により図6
に示すソースプログラムを変換した結果のアセンブラコ
ードを示す図である。
FIG. 11 shows a conventional program conversion apparatus 900 shown in FIG.
FIG. 14 is a diagram showing assembler code resulting from converting the source program shown in FIG.

【符号の説明】[Explanation of symbols]

100 プログラム変換装置 101 ソースファイル格納部 102 アセンブラテンプレートファイル格納部 103 アセンブラテンプレート記憶部 104 制御部 105 アセンブラテンプレート選択部 106 一般命令翻訳部 107 アセンブラ関数呼出翻訳部 108 出力ファイル格納部 REFERENCE SIGNS LIST 100 program conversion device 101 source file storage unit 102 assembler template file storage unit 103 assembler template storage unit 104 control unit 105 assembler template selection unit 106 general instruction translation unit 107 assembler function call translation unit 108 output file storage unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 橋口 渉 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5B081 CC21  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Wataru Hashiguchi 1006 Kazuma Kadoma, Kadoma-shi, Osaka Matsushita Electric Industrial Co., Ltd. F-term (reference) 5B081 CC21

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 高級言語で記述されたソースプログラム
をアセンブラコードに変換するプログラム変換装置であ
って、 アセンブラテンプレート関数についての複数の定義を記
憶するテンプレート記憶手段と、 前記ソースプログラムにおけるアセンブラテンプレート
関数の呼出記述を検出する呼出検出手段と、 前記呼出検出手段により前記呼出記述が検出された場合
に、当該呼出記述により呼び出されるアセンブラテンプ
レート関数についての複数の定義のうち、最適な1つを
選択する選択手段と、 前記呼出検出手段により検出された前記呼出記述を、前
記選択手段により選択されたアセンブラテンプレート関
数の定義に基づいてアセンブラコードに変換する変換手
段とを備えることを特徴とするプログラム変換装置。
1. A program conversion apparatus for converting a source program described in a high-level language into assembler code, comprising: template storage means for storing a plurality of definitions of an assembler template function; Call detecting means for detecting a call description; and selecting, when the call description is detected by the call detecting means, an optimum one of a plurality of definitions of an assembler template function called by the call description. Means for converting the call description detected by the call detection means into assembler code based on the definition of the assembler template function selected by the selection means.
【請求項2】 前記呼出検出手段は、前記ソースプログ
ラム中の関数の呼出記述を検出して、当該呼出記述によ
り呼び出される関数についての定義が前記テンプレート
記憶手段に記憶されているか否かを判断し、定義が記憶
されている場合に当該呼出記述をアセンブラテンプレー
ト関数の呼出記述として検出することを特徴とする請求
項1記載のプログラム変換装置。
2. The call detecting means detects a call description of a function in the source program, and determines whether a definition of a function called by the call description is stored in the template storage means. 2. The program conversion device according to claim 1, wherein when the definition is stored, the call description is detected as a call description of an assembler template function.
【請求項3】 前記テンプレート記憶手段は、前記アセ
ンブラテンプレート関数の定義毎に、関数への引数につ
いての条件がある場合にはその条件を示す条件情報をも
記憶しており、 前記選択手段は、前記条件情報に従い、前記呼出記述に
含まれる関数への引数の記述に応じて前記選択を行うこ
とを特徴とする請求項1又は2記載のプログラム変換装
置。
3. The template storage unit stores, for each definition of the assembler template function, condition information indicating a condition for an argument to the function, if there is one. 3. The program conversion device according to claim 1, wherein the selection is performed according to a description of an argument to a function included in the call description in accordance with the condition information.
【請求項4】 前記条件情報は、引数が即値でなければ
ならない旨を示す情報であり、 前記選択手段は、前記条件情報に従い、前記呼出記述に
含まれる関数への引数の記述が即値であるか否かに応じ
て前記選択を行うことを特徴とする請求項3記載のプロ
グラム変換装置。
4. The condition information is information indicating that an argument must be an immediate value, and the selecting means is, according to the condition information, a description of an argument to a function included in the call description is an immediate value. 4. The program conversion device according to claim 3, wherein the selection is made according to whether or not the program is executed.
【請求項5】 前記条件情報は、引数が所定範囲値内の
即値でなければならない旨を示す情報であり、 前記選択手段は、前記条件情報に従い、前記呼出記述に
含まれる関数への引数の記述が所定範囲内の即値である
か否かに応じて前記選択を行うことを特徴とする請求項
4記載のプログラム変換装置。
5. The condition information is information indicating that an argument must be an immediate value within a predetermined range value, and the selecting means, in accordance with the condition information, transmits an argument to a function included in the call description. 5. The program conversion device according to claim 4, wherein the selection is performed according to whether the description is an immediate value within a predetermined range.
【請求項6】 前記テンプレート記憶手段は、前記アセ
ンブラテンプレート関数の定義毎に、最適なものを選択
するための基準となる評価値をも記憶しており、 前記選択手段は、前記各定義についての評価値に基づい
て、前記選択を行うことを特徴とする請求項1又は2記
載のプログラム変換装置。
6. The template storage unit also stores, for each definition of the assembler template function, an evaluation value serving as a criterion for selecting an optimum one. 3. The program conversion device according to claim 1, wherein the selection is performed based on an evaluation value.
【請求項7】 前記テンプレート記憶手段は、前記定義
毎に当該定義が特定するアセンブラコードについての実
行サイクル数を示す情報を前記評価値として記憶してお
り、 前記選択手段は、前記複数の定義のうち、実行サイクル
数が最小であるアセンブラコードに変換されることにな
る1つの定義を選択することを特徴とする請求項6記載
のプログラム変換装置。
7. The template storage unit stores, for each of the definitions, information indicating the number of execution cycles for an assembler code specified by the definition as the evaluation value. 7. The program conversion device according to claim 6, wherein one of the definitions to be converted into assembler code having the minimum number of execution cycles is selected.
【請求項8】 前記テンプレート記憶手段は、前記定義
毎に当該定義が特定するアセンブラコードについてのコ
ードサイズを示す情報を前記評価値として記憶してお
り、 前記選択手段は、前記複数の定義のうち、コードサイズ
が最小であるアセンブラコードに変換されることになる
1つの定義を選択することを特徴とする請求項6記載の
プログラム変換装置。
8. The template storage unit stores, for each of the definitions, information indicating a code size of an assembler code specified by the definition as the evaluation value. 7. The program conversion device according to claim 6, wherein one definition to be converted into assembler code having the smallest code size is selected.
【請求項9】 前記選択手段は、前記呼出記述を仮に前
記定義それぞれにより特定されるアセンブラコードに変
換するとした場合に、引数をレジスタに設定するための
コード並びにレジスタ退避及び復元のためのコードのう
ち必要となるコードがあればそのコードをも含めて得ら
れる変換結果のコードについての実行サイクル数又はコ
ードサイズに基づいて判断することにより、前記選択を
行うことを特徴とする請求項1又は2記載のプログラム
変換装置。
9. The method according to claim 8, wherein the selecting unit converts a code for setting an argument into a register and a code for saving and restoring a register when the call description is supposed to be converted into assembler code specified by each of the definitions. 3. The method according to claim 1, wherein if there is a necessary code, the selection is performed by making a determination based on the number of execution cycles or the code size of the code resulting from the conversion including the code. The program conversion device according to the above.
【請求項10】 アセンブラテンプレート関数について
の複数の定義を記憶するメモリを備えるコンピュータ
に、高級言語で記述されたソースプログラムをアセンブ
ラコードに変換するプログラム変換処理を実行させるた
めの制御プログラムを記録した記録媒体であって、 前記プログラム変換処理は、 前記ソースプログラムにおけるアセンブラテンプレート
関数の呼出記述を検出する呼出検出ステップと、 前記呼出検出ステップにより前記呼出記述が検出された
場合に、前記メモリに記憶されており当該呼出記述によ
り呼び出されるアセンブラテンプレート関数についての
複数の定義のうち、最適な1つを選択する選択ステップ
と、 前記呼出検出ステップにより検出された前記呼出記述
を、前記選択ステップにより選択されたアセンブラテン
プレート関数の定義に基づいてアセンブラコードに変換
する変換ステップとを含むことを特徴とする記録媒体。
10. A recording program for recording a control program for causing a computer having a memory for storing a plurality of definitions of assembler template functions to execute a program conversion process for converting a source program described in a high-level language into assembler code. A medium, wherein the program conversion processing includes: a call detection step of detecting a call description of an assembler template function in the source program; and when the call description is detected by the call detection step, the program conversion process is stored in the memory. A selecting step of selecting an optimum one of a plurality of definitions of an assembler template function called by the call description; and calling the call description detected by the call detecting step to the assembler selected by the selecting step. Te Recording medium, characterized in that it comprises a conversion step of converting the assembler code based on the definition of the plate function.
JP2000087626A 2000-03-27 2000-03-27 Device for converting program Pending JP2001273150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000087626A JP2001273150A (en) 2000-03-27 2000-03-27 Device for converting program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000087626A JP2001273150A (en) 2000-03-27 2000-03-27 Device for converting program

Publications (1)

Publication Number Publication Date
JP2001273150A true JP2001273150A (en) 2001-10-05

Family

ID=18603604

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000087626A Pending JP2001273150A (en) 2000-03-27 2000-03-27 Device for converting program

Country Status (1)

Country Link
JP (1) JP2001273150A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1313926C (en) * 2003-11-05 2007-05-02 松下电器产业株式会社 Template compilation method
US7284241B2 (en) 2002-08-02 2007-10-16 Matsushita Electric Industrial Co., Ltd. Compiler, compiler apparatus and compilation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7284241B2 (en) 2002-08-02 2007-10-16 Matsushita Electric Industrial Co., Ltd. Compiler, compiler apparatus and compilation method
US8151254B2 (en) 2002-08-02 2012-04-03 Panasonic Corporation Compiler, compiler apparatus and compilation method
CN1313926C (en) * 2003-11-05 2007-05-02 松下电器产业株式会社 Template compilation method

Similar Documents

Publication Publication Date Title
JP4130713B2 (en) Program converter
US6820252B2 (en) Selective conversion to native code using hardware translator, software translator, and software interpreter
JP5139987B2 (en) Extensible metadata
JP4638484B2 (en) Data integrity in data processing equipment
JP6951442B2 (en) Computer program products for sibling call processing, computer systems and methods implemented by computers
US20040205697A1 (en) Transferring data along with code for program overlays
CN102388363B (en) Electron device and perform the method for instruction in virtual machine
CN114721719A (en) Method and system for containerized deployment of heterogeneous applications in cluster
JP2000040005A (en) Program converting device
JP5157534B2 (en) Behavioral synthesis apparatus and program
JP5777843B1 (en) Processor, processing device, and program creation method
JP2007226784A (en) Calling method of in-lined method, and java virtual machine using it
US20030088865A1 (en) Apparatus and method for incrementally performing remote loading
US20070011440A1 (en) Processor and processing method
JP2001273150A (en) Device for converting program
JP2000353097A (en) Method and device for generating low density interference graph
US10310871B2 (en) Non-transitory computer-readable recording medium storing control program, control device and control method
JP2000122876A (en) Information processor
JP3241214B2 (en) Distributed processing apparatus and process execution method
JP6475888B1 (en) Program conversion system
CN112882944A (en) Media drive debugging method and device, electronic equipment and storage medium
TW480445B (en) Method for downloading application programs on the compiler system platform of an electronic communication device
CN118192952A (en) Method, device, storage medium and program product for generating shader file
CN114691131A (en) Frame code file generation method and device for user interface UI file
CN115878282A (en) Cross-platform interaction method, device and equipment