JPH02103638A - System for improving built-in function executing time performance - Google Patents

System for improving built-in function executing time performance

Info

Publication number
JPH02103638A
JPH02103638A JP25495488A JP25495488A JPH02103638A JP H02103638 A JPH02103638 A JP H02103638A JP 25495488 A JP25495488 A JP 25495488A JP 25495488 A JP25495488 A JP 25495488A JP H02103638 A JPH02103638 A JP H02103638A
Authority
JP
Japan
Prior art keywords
procedure
function
built
processing
function value
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.)
Granted
Application number
JP25495488A
Other languages
Japanese (ja)
Other versions
JPH06100972B2 (en
Inventor
Keiko Suzuki
景子 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP25495488A priority Critical patent/JPH06100972B2/en
Publication of JPH02103638A publication Critical patent/JPH02103638A/en
Publication of JPH06100972B2 publication Critical patent/JPH06100972B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To improve the performance when a built-in function is executed by not evaluating the propriety of an argument twice when the procedure for executing another built-in function is called during the executing procedure of the built-in function, and not changing environment in which modification is unnecessary. CONSTITUTION:This system is constituted of a procedure 1 for executing a built-in function called from both of an object program prepared by a compiler and a procedure for executing another built-in function, the object program 2 prepared by the compiler, and procedure 3 for executing the built-in function for calling the procedure for executing the another built-in function. It is arranged that the procedure for executing the another built-in function can be called during the executing procedure 1 of the built-in function when one of the two registers is saved so that an argument evaluating process, operation exceptional mask saving, changing, and restoring operations, and the other register saving and restoring processes can be omitted. Therefore, the performance when the built-in function executing procedure is executed can be improved.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、コンパイラ方式の高級言語で組まれたプログ
ラムを計算機で実行する際の該高級言語に提供されてい
る組込み関数の実行方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for executing built-in functions provided in a high-level language using a compiler when a program written in a high-level language is executed on a computer.

[従来の技術] 従来、組込み関数を実行する手続きにおいて他の組込み
関数を実行する手続きを呼び出す場合の命令例とコンパ
イラが生成したオブジェクトプログラムにおいて数組込
み関数を呼び出す場合の命令例とは同じ形式であった。
[Prior Art] Conventionally, an example of an instruction when a procedure that executes an intrinsic function calls a procedure that executes another intrinsic function and an example of an instruction when calling several intrinsic functions in an object program generated by a compiler have the same format. there were.

また、組込み関数を実行する手続きでは、数千続きがコ
ンパイラが生成したオブジェクトプログラムから呼ばれ
たか、他の組込み関数を実行する手続きから呼ばれたか
の区別を行わず、常に同じ処理を実行していた。
In addition, procedures that execute intrinsic functions always execute the same process without distinguishing whether they are called from an object program generated by the compiler or from a procedure that executes another intrinsic function. .

[発明が解決しようとする課題] 組込み関数を実行する手続きが他の組込み関数を実行す
る手続きから呼ばれた場合、引数の正当性の評価は呼び
出し側の手続きで行われているため引数は常に正しく、
引数の正当性の評価は必要でない。
[Problem to be solved by the invention] When a procedure that executes an intrinsic function is called from a procedure that executes another intrinsic function, the validity of the argument is evaluated by the calling procedure, so the argument is always Correctly,
No evaluation of the validity of the arguments is necessary.

また、関数値を近似するために使用するレジスタの待避
・復元、演算例外を検出すべきか否かを制御する演算例
外マスクの待避・変更・復元等の環境を整える処理につ
いては、他の組込み関数を実行する手続きから呼ばれた
場合には、呼び出し側の手続きで行っているために必要
でないこともある。
In addition, other built-in functions are required for processing that prepares the environment, such as saving and restoring registers used to approximate function values, and saving, changing, and restoring the calculation exception mask that controls whether or not calculation exceptions should be detected. If it is called from a procedure that executes , it may not be necessary because it is being performed by the calling procedure.

しかし、上述した従来の技術においては、オブジェクト
プログラムから呼ばれたか、他の組込み関数を実行する
手続きから呼ばれたかの区別を行っていないため、常に
すべての処理を実行してしまい、無駄な命令をも実行し
てしまうという欠点がある。
However, in the above-mentioned conventional technology, it does not distinguish whether the call is from an object program or a procedure that executes another built-in function, so all processes are always executed, resulting in wasted instructions. The disadvantage is that it also executes

そこで、本発明の技術的課題は、上記欠点に鑑み、組込
み関数の実行時の性能を向上させる方式を提供すること
である。
SUMMARY OF THE INVENTION In view of the above-mentioned drawbacks, a technical object of the present invention is to provide a method for improving the execution performance of built-in functions.

[課題を解決するための手段] 本発明によれば、高級言語からなるソースプログラムを
翻訳してオブジェクトプログラムを生成するコンパイラ
と、 該高級言語に提供されている組込み関数に対し、入口で
必要な処理と、引数の正当性を評価する引数評価処理と
、関数値の近似を行う関数値近似処理と、前記関数値近
似処理を実行するための環境を整える関数値近似前処理
と、前記関数値近似前処理により変更された環境を元の
環境に戻す関数値近似後処理と、出口で必要な処理とか
ら成立する組込み関数を実行する手続きとを有している
計算機システムにおいて、 コンパイラの生成したオブジェクトプログラムと他の組
込み関数を実行する手続きとの両方から呼ばれる組込み
関数を実行する手続きに対して、数千続きがコンパイラ
が生成したオブジェクトプログラムから呼ばれた場合の
入口と他の組込み関数を実行する手続きから呼ばれた場
合の入口とを設けることにより、どちらから呼ばれたか
の区別を可能とする手段と、 コンパイラが生成したオブジェクトプログラムから呼ば
れた場合には、入口で必要な処理と、引数評価処理と、
関数値近似前処理と、関数値近似処理と、関数値近似後
処理と、出口で必要な処理とを実行する手段と他の組込
み関数を実行する手続きから呼ばれた場合には、入口で
必要な処理と、関数値近似処理と、出口で必要な処理と
を実行する手段とを有し、 また、他の組込み関数を実行する手続きを呼び出す場合
には、呼び出される手続きの関数値近似処理において必
要とされる環境と呼び出す時点の環境とを比較し、異な
る点のみを変更する手続き呼び出し前処理手段と、 組込み関数を実行する手続きを呼び出す手続き呼び出し
手段と、 手続き呼び出し前処理手段によって変更した環境をもと
に戻す手続き呼び出し後処理手段とを有していることを
特徴とする組込み関数実行時の性能向上方式が得られる
[Means for Solving the Problems] According to the present invention, a compiler that generates an object program by translating a source program in a high-level language, and a compiler that generates an object program by translating a source program in a high-level language, and an argument evaluation process that evaluates the validity of an argument, a function value approximation process that approximates a function value, a function value approximation preprocess that prepares an environment for executing the function value approximation process, and the function value In a computer system that has a function value approximation post-processing that returns the environment changed by the approximation pre-processing to the original environment, and a procedure that executes an intrinsic function consisting of the processing required at the exit, For a procedure that executes an intrinsic function that is called from both an object program and a procedure that executes other intrinsic functions, thousands of continuations are executed at the entrance and other intrinsic functions when called from an object program generated by the compiler. By providing an entrance when the procedure is called from a procedure, it is possible to distinguish from which one it is called, and when it is called from an object program generated by the compiler, the necessary processing at the entrance and the argument evaluation process,
Means for executing function value approximation pre-processing, function value approximation processing, function value approximation post-processing, and processing required at exit.When called from a procedure that executes another built-in function, it is necessary at entry. , a function value approximation process, and a process required at exit. Also, when calling a procedure that executes another built-in function, the function value approximation process of the called procedure A procedure call preprocessing means that compares the required environment with the environment at the time of invocation and changes only the differences; a procedure call preprocessing means that calls a procedure that executes an intrinsic function; and an environment changed by the procedure call preprocessing means. A method for improving performance when executing an intrinsic function is obtained, which is characterized by having a procedure call post-processing means for restoring the process to its original state.

[実施例〕 次に、本発明の実施例について、図面を参照して詳細に
説明する。
[Example] Next, an example of the present invention will be described in detail with reference to the drawings.

第1図は、本発明の一実施例を示す。FIG. 1 shows one embodiment of the invention.

本実施例は、コンパイラの生成したオブジェクトプログ
ラムと他の組込み関数を実行する手続きとの両方から呼
ばれる組込み関数を実行する手続き1とコンパイラが生
成したオブジェクトプログラム2と他の組込み関数を実
行する手続きを呼び出す組込み関数を実行する手続き3
とから構成される。
This embodiment includes a procedure 1 that executes an intrinsic function that is called from both an object program generated by the compiler and a procedure that executes another intrinsic function, and a procedure that executes an object program 2 generated by the compiler and another intrinsic function. Procedure 3 to execute the built-in function to be called
It consists of

コンパイラの生成したオブジェクトプログラム2におい
て組込み関数を引用した場合は、手続き呼び出し手段2
1により、制御を手続き1内のコンパイラの生成したオ
ブジェクトプログラムから呼ばれた場合の入口11に移
し、入口で必要な処理121、引数評価処理122、関
数値近似前処理123、関数値近似処理124、関数値
近似後処理125、出口で必要な処理126を含む組込
み関数の通常実行手段12を実行し、制御をオブジェク
トプログラム2に戻す。
When an intrinsic function is cited in the object program 2 generated by the compiler, the procedure calling means 2
1, control is transferred to the entrance 11 when called from the object program generated by the compiler in procedure 1, and the processing necessary at the entrance 121, argument evaluation processing 122, function value approximation preprocessing 123, and function value approximation processing 124 are performed. , function value approximation post-processing 125 , and processing 126 necessary for exit, the built-in function normal execution means 12 is executed, and control is returned to the object program 2 .

他の組込み関数を実行する手続きを呼び出す組込み関数
を実行する手続き3において他の組込み関数を実行する
手続きを呼び出す場合は、手続き呼び出し前処理手段3
1により、この時点の環境と呼び出される手続きの関数
値近似処理142が必要とする環境とを比較し、変更の
必要な点のみを変更した後、手続き呼び出し手段32に
より、制御を手続き1内の組込み関数を実行する手続き
から呼ばれた場合の入口13に制御を移し、入口で必要
な処理141、関数値近似処理142、出口で必要な処
理143を含む組込み関数の簡略実行手段14を実行し
、制御を手続き3に戻し、手続き呼び出し後処理手段3
3により、手続き呼び出し前処理手段31により変更し
た環境を元に戻す。
When calling a procedure that executes another built-in function in procedure 3 for executing an built-in function that calls a procedure that executes another built-in function, the procedure call preprocessing means 3
1, the environment at this point is compared with the environment required by the function value approximation process 142 of the called procedure, and after changing only the points that need to be changed, the procedure calling means 32 transfers the control to the procedure 1. Control is transferred to the entrance 13 when called from a procedure that executes the built-in function, and the built-in function simplified execution means 14 including processing 141 necessary at the entrance, function value approximation processing 142, and processing 143 necessary at the exit is executed. , returns control to procedure 3, and executes procedure call post-processing means 3
3, the environment changed by the procedure call preprocessing means 31 is restored to its original state.

ここで、入口で必要な処理121と141、関数値近似
処理124と142、出口で必要な処理126と143
とは同じ処理である。
Here, processes 121 and 141 required at the entrance, function value approximation processes 124 and 142, and processes 126 and 143 required at the exit
is the same process.

以上に示した手段を実現することにより、本発明を実施
することが可能となる。
By realizing the means shown above, it becomes possible to implement the present invention.

次に、−例として、FORTRAN言語で組込み関数C
EXPを引用した場合について、説明する。(演算例外
を検出する機構と、ある演算例外を検出すべきか否かを
一般に演算例外マスクと呼ばれるフラグ群によって制御
する機構とを持つ計算機システム上で実行される場合に
ついて、説明する。) 第2図に、組込み関数SINを実行する手続き4におけ
る処理の流れを、第3図に、組込み関数CEXPを実行
する手続き6における処理の流れを示す。
Then - as an example, in the FORTRAN language the built-in function C
The case where EXP is cited will be explained. (We will explain the case where the execution is performed on a computer system that has a mechanism for detecting arithmetic exceptions and a mechanism for controlling whether or not a certain arithmetic exception should be detected using a group of flags generally called an arithmetic exception mask.) Second FIG. 3 shows the flow of processing in procedure 4 for executing the built-in function SIN, and FIG. 3 shows the flow of processing in procedure 6 for executing the built-in function CEXP.

組込み関数CEXPは、組込み関数SINを呼び出すの
で、まず、組込み関数SINを実行する手続き4につい
て説明する。
Since the built-in function CEXP calls the built-in function SIN, procedure 4 for executing the built-in function SIN will be described first.

コンパイラが生成したオブジェクトプログラムから呼ば
れた場合、入口で必要な処理41、関数値近似前処理4
2を順に実行する。ここで、関数値近似処理45におい
ては、浮動小数点演算命令における指数アンダフローを
抑止することが必要であり、また、レジスタSL、S2
を使用するため、これらレジスタを関数値近似処理45
の前後において、待避争復元をすることが必要である。
When called from an object program generated by a compiler, processing required at the entrance 41, function value approximation preprocessing 4
Execute 2 in order. Here, in the function value approximation process 45, it is necessary to suppress exponent underflow in floating point arithmetic instructions, and registers SL, S2
In order to use these registers, function value approximation processing 45
It is necessary to restore the dispute before and after.

すなわち、関数値近似前処理42では、浮動小数点演算
命令における指数アンダフローを抑止するために、演算
例外マスクの待避、及び変更を行い、レジスタSl、S
2の待避を行う。
That is, in the function value approximation preprocessing 42, in order to suppress exponent underflow in floating point arithmetic instructions, arithmetic exception masks are saved and changed, and registers Sl and S
Perform step 2 evacuation.

次に、フラグ判定処理43において、フラグをonに設
定し、引数評価処理44の引数判定処理441において
、引数が正しいか否かを判定し、引数が正しい場合には
、関数値近似処理45において、関数値を近似し、フラ
グ判定処理46を実行する。引数が正しくない場合には
、エラーメツセージ出力処理442においてエラーメツ
セージ出力後、フラグ判定処理46を実行する。フラグ
判定処理46では、フラグを判定し、フラグがon(オ
ブジェクトプログラムから呼ばれた)ならば、関数値近
似後処理47を実行し、その後、出口で必要な処理48
を実行し、組込み関数SINを実行する手続き4の処理
を終了する。フラグ判定処理46において、フラグがo
ff(組込み関数を実行する手続きから呼ばれた)なら
ば、出口で必要名処理48を実行し、組込み関数SIN
を実行する手続き4の処理を終了する。ここで、関数値
近似後処理47においては、演算例外マスク及びレジス
タSl、S2の復元を行う。
Next, in flag determination processing 43, the flag is set to on, and in argument determination processing 441 of argument evaluation processing 44, it is determined whether the argument is correct. If the argument is correct, function value approximation processing 45 is performed. , approximates the function value, and executes flag determination processing 46. If the argument is incorrect, an error message is output in error message output processing 442, and then flag determination processing 46 is executed. In flag determination processing 46, the flag is determined, and if the flag is on (called from the object program), function value approximation post-processing 47 is executed, and then processing 48 necessary at the exit is executed.
is executed, and the process of procedure 4 for executing the built-in function SIN is completed. In the flag determination process 46, the flag is o.
ff (called from the procedure that executes the built-in function), executes the necessary name processing 48 at the exit and returns the built-in function SIN.
The process of procedure 4, which executes the process, ends. Here, in the function value approximation post-processing 47, the operation exception mask and the registers Sl and S2 are restored.

組込み関数を実行する手続きから呼ばれた場合には、入
口で必要な処理49、フラグ判定処理50(フラグof
fに設定する)、関数値近似処理45を順に実行する。
When called from a procedure that executes a built-in function, the process 49 necessary at the entrance and the flag judgment process 50 (flag of
f), and the function value approximation process 45 is executed in sequence.

関数値近似処理45以降は、オブジェクトプログラムか
ら呼ばれた場合と同様である。
Function value approximation processing 45 and subsequent steps are the same as when called from an object program.

次に、組込み関数CEXPを実行する手続き6について
説明する。
Next, procedure 6 for executing the built-in function CEXP will be explained.

組込み関数CEXPを実行する手続き6では、関数値近
似処理64内で、組込み関数SINを実行する手続き4
を呼び出すが、この部分についてのみ説明する。
In procedure 6 for executing the built-in function CEXP, procedure 4 for executing the built-in function SIN is executed in the function value approximation process 64.
, but only this part will be explained.

引数評価処理63において引数の評価は行われているの
で、組込み関数SINに渡される引数は常に正しく、ま
た、関数値近似前処理62においては、浮動小数点演算
命令における指数アンダフローを抑止し、レジスタS1
を待避している。
Since the arguments are evaluated in the argument evaluation process 63, the arguments passed to the built-in function SIN are always correct.Furthermore, in the function value approximation preprocessing 62, exponent underflow in floating point arithmetic instructions is suppressed, and registers are S1
is being evacuated.

組込み関数SINを実行する手続き4内の関数値近似処
理45では、浮動小数点演算命令における指数アンダフ
ローの抑止が必要であり、また、レジスタSl、S2を
破壊することが分かっているので関数値近似処理45の
前後でレジスタSl。
In function value approximation processing 45 in procedure 4 that executes the built-in function SIN, it is necessary to suppress exponent underflow in floating point arithmetic instructions, and since it is known that registers Sl and S2 will be destroyed, function value approximation is not performed. Register Sl before and after processing 45.

S2を待避・復元することが必要である。しかし、組込
み関数CEXPの関数値近似処理64内の組込み関数S
INを呼び出す処理の前後でレジスタS1は破壊されて
もよいということも分かっている。
It is necessary to save and restore S2. However, the built-in function S in the function value approximation process 64 of the built-in function CEXP
It is also known that register S1 may be destroyed before and after the process of calling IN.

以上の事より、手続き呼び出し前処理641ではレジス
タS2のみを待避すればよく、その後、手続き呼び出し
処理642において、組込み関数SINを実行する手続
き4を呼び出す、手続き呼び出し後処理643では、レ
ジスタS2の復元を行う。
From the above, it is only necessary to save register S2 in the procedure call preprocessing 641, and then in the procedure call process 642, call procedure 4 that executes the built-in function SIN.In the procedure call postprocessing 643, register S2 is restored. I do.

従来の方法だと、組込み関数CEXPを実行する場合、
組込み関数SINを実行する手続き内で、引数の正当性
の評価、演算例外マスクの待避・変更・復元、レジスタ
S1の待避・復元、レジスタS2の待避・復元を行って
いたが、この方法により、引数の正当性の評価、演算例
外マスクの待避・変更・復元、レジスタS1の待避・復
元の処理を省略することが可能となり、組込み関数CE
XPを実行する手続きの実行時性能が向上する。
In the conventional method, when executing the built-in function CEXP,
In the procedure to execute the built-in function SIN, the validity of the argument was evaluated, the operation exception mask was saved, changed, and restored, register S1 was saved and restored, and register S2 was saved and restored, but with this method, It is now possible to omit the processing of evaluating the validity of arguments, saving, changing, and restoring the operation exception mask, and saving and restoring register S1, and the built-in function CE
The runtime performance of procedures that run XP is improved.

また、組込み関数CEXPを実行する手続きでは、組込
み関数COS、組込み関数EXPをも呼び出しており、
それぞれに対して同様のことが言えるので、実行時の性
能はより向上する。
Also, in the procedure to execute the built-in function CEXP, the built-in functions COS and built-in functions EXP are also called.
The same can be said for each, so runtime performance is further improved.

[発明の効果] 以上説明したように、本発明を実現することにより、組
込み関数を実行する手続きにおいて他の組込み関数を実
行する手続きを呼び出す際に、無駄な処理を省略できる
ので、実行時の性能が向上するという効果がある。
[Effects of the Invention] As explained above, by implementing the present invention, unnecessary processing can be omitted when a procedure that executes an intrinsic function calls a procedure that executes another intrinsic function. This has the effect of improving performance.

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

第1図は本発明の一実施例に使用する機能プログラム図
である。第2図は、本発明を実現した組込み関数SIN
を実行する手続きの処理の流れを示し、第3図は、本発
明を実現した組込み関数CEXPを実行する手続きの処
理の流れを示す図である。 1・・・コンパイラの生成したオブジェクトプログラム
と組込み関数を実行する手続きとの両方から呼ばれる組
込み関数を実行する手続き、 11・・・オブジェクトプログラムから呼ばれる場合の
入口、 12・・・組込み関数の通常実行手段、121・・・入
口で必要な処理、 122・・・引数評価処理、 123・・・関数値近似前処理、 124・・・関数値近似処理、 125・・・関数値近似後処理、 126・・・出口で必要な処理、 13・・・組込み関数を実行する手続きから呼ばれる場
合の入口、 14・・・組込み関数の簡略実行手段、141・・・入
口で必要な処理、 142・・・関数値近似処理、 143・・・出口で必要な処理、 2・・・コンパイラが生成したオブジェクトプログラム
、 21・・・手続き呼び出し手段、 3・・・他の組込み関数を実行する手続きを呼び出す組
込み関数を実行する手続き、 31・・・手続き呼び出し前処理手段、32・・・手続
き呼び出し手段、 33・・・手続き呼び出し後処理手段、4・・・組込み
関数SINを実行する手続き、41・・・手続き4にお
ける入口で必要な処理、42・・・手続き4における関
数値近似前処理、43・・・フラグOn処理、 44・・・手続き4における引数評価処理、441・・
・手続き4における引数判定処理、442・・・手続き
4におけるエラーメツセージ出力処理、 45・・・手続き4における関数値近似処理、46・・
・フラグ判定処理、 47・・・手続き4における関数値近似後処理、48・
・・手続き4における出口で必要な処理、49・・・手
続き4における入口で必要な処理、50・・・フラグ判
定処理、 6・・・組込み関数CEXPを実行する手続き、61・
・・手続き6における入口で必要な処理、62・・・手
続き6における関数値近似前処理、63・・・手続き6
における引数判定処理、631・・・手続き6における
引数判定処理、632・・・手続き6におけるエラーメ
ツセージ出力処理、 64・・・手続き6における関数値近似処理、641・
・・手続き6における手続き呼び出し前処理、 642・・・手続き6における手続き呼び出し処理、6
43・・・手続き6における手続き呼び出し後処理、 65・・・手続き6における関数値近似処理、66・・
・手続き6における出口で必要な処理。 第 図 第3図
FIG. 1 is a functional program diagram used in an embodiment of the present invention. Figure 2 shows the built-in function SIN that realizes the present invention.
FIG. 3 is a diagram showing the flow of a procedure for executing the built-in function CEXP that implements the present invention. 1... A procedure that executes an intrinsic function that is called from both the object program generated by the compiler and the procedure that executes the intrinsic function, 11... Entrance when called from the object program, 12... Normal execution of the intrinsic function Means, 121... Processing required at the entrance, 122... Argument evaluation processing, 123... Function value approximation pre-processing, 124... Function value approximation processing, 125... Function value approximation post-processing, 126 ... Processing required at the exit, 13... Entrance when called from a procedure that executes the built-in function, 14... Simplified execution means for the built-in function, 141... Processing necessary at the entry, 142... Function value approximation processing, 143...Processing required at exit, 2...Object program generated by the compiler, 21...Procedure calling means, 3...Intrinsic function that calls a procedure that executes another intrinsic function 31... Procedure call pre-processing means, 32... Procedure call means, 33... Procedure call post-processing means, 4... Procedure for executing built-in function SIN, 41... Procedure 42...Function value approximation preprocessing in procedure 4, 43...Flag ON processing, 44...Argument evaluation processing in procedure 4, 441...
- Argument determination processing in procedure 4, 442... Error message output processing in procedure 4, 45... Function value approximation processing in procedure 4, 46...
・Flag determination processing, 47...Function value approximation post-processing in procedure 4, 48.
... Processing required at the exit of procedure 4, 49... Processing necessary at the entrance of procedure 4, 50... Flag judgment processing, 6... Procedure for executing the built-in function CEXP, 61.
...Processing required at the entrance of procedure 6, 62...Function value approximation preprocessing in procedure 6, 63...Procedure 6
Argument determination processing in procedure 6, 631...Argument determination processing in procedure 6, 632...Error message output processing in procedure 6, 64...Function value approximation processing in procedure 6, 641.
...Procedure call preprocessing in procedure 6, 642...Procedure call processing in procedure 6, 6
43...Procedure call post-processing in procedure 6, 65...Function value approximation processing in procedure 6, 66...
- Processing required at the exit in procedure 6. Figure Figure 3

Claims (1)

【特許請求の範囲】 1)高級言語からなるソースプログラムを翻訳してオブ
ジェクトプログラムを生成するコンパイラと、 該高級言語に提供されている組込み関数に対し、入口で
必要な処理と、引数の正当性を評価する引数評価処理と
、関数値の近似を行う関数値近似処理と、前記関数値近
似処理を実行するための環境を整える関数値近似前処理
と、前記関数値近似処理により変更された環境を元の環
境に戻す関数値近似処理と、出口で必要な処理とから成
立する組込み関数を実行する手続きとを有している計算
機システムにおいて、 コンパイラの生成したオブジェクトプログラムと他の組
込み関数を実行する手続きとの両方から呼ばれる組込み
関数を実行する手続きに対して、該手続きがコンパイラ
が生成したオブジェクトプログラムから呼ばれた場合の
入口と、他の組込み関数を実行する手続きから呼ばれた
場合の入口とを設けることにより、どちらから呼ばれた
かの区別を可能とし、コンパイラが生成したオブジェク
トプログラムから呼ばれた場合には、入口で必要な処理
と、引数評価処理と、関数値近似前処理と、関数値近似
処理と、関数値近似後処理と、出口で必要な処理とを実
行する手段と、 他の組込み関数を実行する手続きから呼ばれた場合には
、入口で必要な処理と、関数値近似処理と、出口で必要
な処理とを実行する手段とを設け、また、他の組込み関
数を実行する手続きを呼び出す場合には、呼び出される
手続きの関数値近似処理において必要とされる環境と呼
び出す時点の環境とを比較し、異なる点のみを変更する
手続き呼び出し前処理手段と、組込み関数を実行する手
続きを呼び出す手続き呼び出し手段と、 手続き呼び出し前処理手段によって変更した環境をもと
に戻す手続き呼び出し後処理手段とを設け、 組込み関数を実行する手続きにおいて他の組込み関数を
実行する手続きを呼び出す際に、引数の正当性を二重に
評価することと、変更の必要でない環境を変更すること
とを防ぎ、実行時の性能を上げることを特徴とする組込
み関数実行時の性能向上方式。
[Claims] 1) A compiler that generates an object program by translating a source program in a high-level language, processing required at the entrance to built-in functions provided in the high-level language, and validity of arguments. an argument evaluation process that evaluates a function value, a function value approximation process that approximates a function value, a function value approximation preprocess that prepares an environment for executing the function value approximation process, and an environment changed by the function value approximation process. In a computer system that has a function value approximation process that returns a function value to its original environment, and a procedure that executes an intrinsic function that is established from the processing required at exit, an object program generated by a compiler and other intrinsic functions can be executed. An entrance when the procedure is called from an object program generated by the compiler, and an entrance when it is called from a procedure that executes another intrinsic function, for a procedure that executes an intrinsic function that is called from both a procedure that executes By providing a A means for executing value approximation processing, function value approximation post-processing, and processing required at exit, and when called from a procedure that executes another built-in function, processing required at entry and function value approximation. In addition, when calling a procedure that executes another built-in function, the environment required for function value approximation processing of the called procedure and the time of calling. A procedure call pre-processing means that compares the environment with the previous one and changes only the differences, a procedure call means that calls a procedure that executes the built-in function, and a procedure call pre-processing means that restores the environment changed by the procedure call pre-processing means. When a procedure that executes an intrinsic function calls a procedure that executes another intrinsic function, the validity of the argument is double-evaluated, and the environment that does not need to be changed is changed. A method for improving performance when executing built-in functions, which is characterized by preventing and improving performance during execution.
JP25495488A 1988-10-12 1988-10-12 Performance improvement method when executing built-in functions Expired - Fee Related JPH06100972B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25495488A JPH06100972B2 (en) 1988-10-12 1988-10-12 Performance improvement method when executing built-in functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25495488A JPH06100972B2 (en) 1988-10-12 1988-10-12 Performance improvement method when executing built-in functions

Publications (2)

Publication Number Publication Date
JPH02103638A true JPH02103638A (en) 1990-04-16
JPH06100972B2 JPH06100972B2 (en) 1994-12-12

Family

ID=17272166

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25495488A Expired - Fee Related JPH06100972B2 (en) 1988-10-12 1988-10-12 Performance improvement method when executing built-in functions

Country Status (1)

Country Link
JP (1) JPH06100972B2 (en)

Also Published As

Publication number Publication date
JPH06100972B2 (en) 1994-12-12

Similar Documents

Publication Publication Date Title
KR100317768B1 (en) IEEE compliant floating point unit
JPH01130224A (en) Exception processing system
JPH06309178A (en) Method and computer system for processing interruption by interruption processing cord
JPH02103638A (en) System for improving built-in function executing time performance
JP2557629B2 (en) Interrupt method
JP2871693B2 (en) Critical section optimization method
JP2708647B2 (en) How coprocessors support auxiliary functions
JPH0378832A (en) Data processor
JPH03240831A (en) Interruption processing system
JPS60163134A (en) Virtual computer system
JPH0340143A (en) Debugging system for pipeline type computer
JPS6214241A (en) Debug processing system at exceptional condition detection
JPH0527963A (en) Simultaneous support method for various floating point calculating instructions
JPH0546444A (en) Debugger with log function
JPH02170235A (en) Register saving/restoring system for call of subroutine
JPS61241843A (en) Information processor
JPS6143347A (en) Simulation method of vector instruction
JPS62233844A (en) Interruption control system
JPS63247834A (en) Processing method for pseudo instruction of floating point function
JPH0353335A (en) Compiler processing system
JPS63187332A (en) Arithmetic processing unit
JPH04237337A (en) Information processor
JPH02144724A (en) Output process system for error message
JPH0375933A (en) Stack size calculation processing system
JPS61272871A (en) System for controlling vector arithmetic register

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees