JP2005196436A - Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method - Google Patents

Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method Download PDF

Info

Publication number
JP2005196436A
JP2005196436A JP2004001651A JP2004001651A JP2005196436A JP 2005196436 A JP2005196436 A JP 2005196436A JP 2004001651 A JP2004001651 A JP 2004001651A JP 2004001651 A JP2004001651 A JP 2004001651A JP 2005196436 A JP2005196436 A JP 2005196436A
Authority
JP
Japan
Prior art keywords
program
symbol
variable
accessing
language
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.)
Withdrawn
Application number
JP2004001651A
Other languages
Japanese (ja)
Inventor
Masaki Kawai
正樹 河合
Takuji Kawamoto
琢二 川本
Naosuke Haruna
修介 春名
Hiroshi Fujiwara
寛 藤原
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 JP2004001651A priority Critical patent/JP2005196436A/en
Publication of JP2005196436A publication Critical patent/JP2005196436A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To generate position independence codes for a data area corresponding to a dynamic module link without changing a compiler and a linker and also generate an execution code by linking the position independence codes corresponding to the dynamic module link. <P>SOLUTION: Global variables in a module are confined in a structural body, and register-relative offset access is executed. An immediate value relative address is converted to a symbol name by a difference detection method, and the linker decides the conversion and does not link unused variables. By this, a code corresponding to a dynamic link can be generated without correcting a compiler even if the compiler does not correspond to the dynamic link. Such a method is high in portability and easily applicable to many compilers, and labor for the maintenance of the compilers is consequently reduced. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

コンピュータに何らかの作用を行わせるためにはコンピュータプログラムを必要とする。このコンピュータプログラムは種々の言語で記述される。これらの言語にはコンピュータに行わせるその作用内容を人間が理解しやすいような言語や、その作用内容をコンピュータが実行する時に負荷が軽いような言語がある。   A computer program is required to make the computer perform some action. This computer program is written in various languages. Among these languages, there are languages that make it easy for humans to understand the action content that the computer performs, and languages that lighten the load when the computer executes the action content.

コンピュータが行う作用内容を人間が確認したり、コンピュータに行わせる作用内容を記述するには、その作用内容を人間が理解しやすい言語が必要になるし、その作用内容をコンピュータに実行させる時には、その作用内容をコンピュータが実行する時に、コンピュータにとって負荷が軽い言語で記述されていることが望ましいからである。   In order for humans to confirm the content of actions performed by a computer or to describe the contents of actions to be performed by a computer, it is necessary to have a language that is easy for humans to understand the contents of actions. This is because it is desirable that the action content be described in a language that is light on the computer when the computer executes it.

そして人間が確認したコンピュータに行わせる作用内容はそのままコンピュータに実行させなければならないので、人間が理解しやすい言語で記述された内容をそのまま変えることなくコンピュータにとって負荷が軽い言語での記述に変更処理することが必要になる。   And since the action contents to be performed by the computer confirmed by the human must be executed by the computer as it is, the description process in the language that is light on the computer is changed without changing the contents described in the language that is easy for humans to understand. It becomes necessary to do.

更にこの時、人間が理解しやすい言語で記述された内容をそのまま全く変えることなくコンピュータにとって負荷が軽い言語での記述に変更処理するだけでなく、少しでもコンピュータが実行する時の効率が改善されるような記述に変更処理することが要求される。   Furthermore, at this time, not only the contents described in a language that is easy to understand for human beings are not changed at all, but also the processing is changed to a description in a language that is light on the computer, and the efficiency when the computer is executed is improved as much as possible. It is required to change to such a description.

ここでのコンピュータが実行する時の効率の改善とは例えば、コンピュータが実行するスピードが早くなることや、コンピュータが実行するのに必要となるメモリサイズが小さくなることや、その他を言う。   Here, the improvement in efficiency when the computer is executed means, for example, that the speed at which the computer is executed is increased, the memory size required for the computer to be executed is reduced, and the like.

そしてこのような、人間が理解しやすい言語で記述された内容をそのまま変えることなくコンピュータにとって負荷が軽い言語での記述に変更処理は、プログラム処理プログラムによってコンピュータで実行される。   Such a process of changing to a description in a language that is light on the computer without changing the content described in a language that is easy for humans to understand is executed by the computer by a program processing program.

本発明は、このようなプログラム処理プログラム及びプログラム処理プログラムを記録した記録媒体及びプログラム処理装置及びプログラム処理方法に関するものである。   The present invention relates to such a program processing program, a recording medium recording the program processing program, a program processing apparatus, and a program processing method.

更に近年、1つのコンピュータのメモリーに複数のプログラムをロードし、これらのプログラムを順次或いは並列に実行させることが行われる。これらの複数のプログラムはOS等の管理プログラムであることも、アプリケーション・プログラムであることも、その他の各種プログラムであることも、これらの任意の組み合わせであることもある。   Furthermore, in recent years, a plurality of programs are loaded into the memory of one computer, and these programs are executed sequentially or in parallel. The plurality of programs may be management programs such as an OS, application programs, various other programs, or any combination thereof.

これらのプログラムはユーザーのニーズに応じて、自由な組み合わせでメモリー上にロードして実行できることが望まれ、これが可能であるための条件の1つとして、各プログラムモジュールは、メモリー上のどのアドレスにロードされても実行できなければならない。   It is desirable that these programs can be loaded and executed in memory in any combination according to the user's needs, and one of the conditions for making this possible is that each program module is assigned to any address in memory. It must be able to run when loaded.

これを動的プログラムモジュール配置、或いはこのように複数のプログラムモジュールを任意の組み合わせでメモリー上の自由なアドレスで実行可能な1つのプログラムとしてまとめることを、動的プログラムモジュールリンク、或いは、動的プログラムリンク、或いは、動的モジュールリンク等と呼ぶ。   Dynamic program module linking, or dynamic program module linking, or combining a plurality of program modules as one program that can be executed at a free address on the memory in any combination. It is called a link or a dynamic module link.

そしてこのような動的モジュールリンクが可能であるためには、上記プログラム処理プログラムが、人間が理解しやすい言語で記述された内容をコンピュータにとって負荷が軽い言語での記述に変更処理する時、この動的モジュールリンクが可能であるような処理を行うことが必要になる。   In order for such dynamic module linking to be possible, when the program processing program changes the content described in a language that is easy for humans to understand in a language that is light on the computer, It is necessary to perform processing that enables dynamic module linking.

本発明は、このような動的モジュールリンクが可能であるコンピュータにとって負荷が軽い言語で記述されたプログラムに変更処理するプログラム処理プログラム及びプログラム処理プログラムを記録した記録媒体及びプログラム処理装置及びプログラム処理方法に関するものである。   The present invention relates to a program processing program, a recording medium storing the program processing program, a program processing apparatus, and a program processing method for changing the program into a program written in a language that has a light load on a computer capable of such dynamic module linking It is about.

従来の、動的モジュールリンクが可能であるコンピュータにとって負荷が軽い言語で記述されたプログラムに変更処理するプログラム処理プログラム及びプログラム処理プログラムを記録した記録媒体及びプログラム処理装置及びプログラム処理方法には、例えば下記特許文献1に記載された「動的リンク・ライブラリをプログラムにリンクする方法」があった。   For example, a conventional program processing program for changing to a program written in a language with a light load on a computer capable of dynamic module linking, a recording medium recording the program processing program, a program processing apparatus, and a program processing method include: There is a “method for linking a dynamic link library to a program” described in Patent Document 1 below.

この従来の方法は、コンパイラ、プレリンカ及び実行時ライブラリの使用により、アプリケーション実行時に別のプログラムを動的にロードするためにプログラムを部分的にリンクし、システム・リンカまたはローダのサポートを要求せずに、部分的にリンクされたプログラム内のアドレスを解決する方法を提供することを主たる目的とするものであった。   This traditional method uses a compiler, prelinker, and runtime library to partially link a program to dynamically load another program at application run time without requiring support for the system linker or loader. In particular, it was intended to provide a method for resolving addresses in partially linked programs.

そしてこれは、アプリケーション・プログラムのソース・コードの変更無しに達成されうるものであった。   This could be achieved without changing the source code of the application program.

この従来の方法は、上記目的を達成するため、動的にリンクされるライブラリをデータ処理システム上で実行されるプログラムにリンクする方法を提案するものであり、データ処理システムがコンパイラ、プレリンカ、実行時ライブラリ、システム・リンカ及びシステム・ローダを有していた。   This conventional method proposes a method for linking a dynamically linked library to a program executed on a data processing system in order to achieve the above object. The data processing system is a compiler, prelinker, and execution. Had a library, a system linker and a system loader.

そしてこの従来の方法は、次のステップを含んでいる。   This conventional method includes the following steps.

第1には、各動的リンク・ライブラリに対応して、プレリンカにより、ライブラリ内で使用可能な外部記号のセットに関する情報を含む定義ファイルを生成するステップであって、前記プレリンカが前記定義ファイルを前記動的リンク・ライブラリ内の任意の変更を反映して最新に維持する前記生成ステップである。   First, for each dynamic link library, a prelinker generates a definition file containing information about a set of external symbols available in the library, wherein the prelinker generates the definition file. The generating step of keeping up to date reflecting any changes in the dynamic link library.

第2には、前記コンパイラにより、アプリケーション・プログラム・コードをコンパイルするステップであって、前記コンパイル・コードがトリガ・ルーチンを呼び出すコードを含む前記コンパイル・ステップである。   The second is a step of compiling application program code by the compiler, wherein the compiled code includes code for calling a trigger routine.

第3には、前記アプリケーション・プログラム・コードを前記定義ファイルにプレリンクするステップであって、エクスポート定義セクションを含み、前記システム・リンカによりリンクされるオブジェクト・デックを生成する前記プレリンク・ステップである。   Third, prelinking the application program code to the definition file, wherein the prelinking step includes an export definition section and generates an object deck linked by the system linker. is there.

第4には、前記システム・リンカにより前記アプリケーション・プログラム・コードをリンクするステップである。   Fourth, there is a step of linking the application program code by the system linker.

第5には、前記コードを実行し、前記トリガ・ルーチンにより前記コード内の未解決記号の参照を解決するステップであって、前記トリガ・ルーチンが前記プレリンカにより生成された前記エクスポート定義セクションをアクセスすることにより、前記実行時ライブラリが前記未解決記号を含む前記動的リンク・ライブラリをアクセスし、前記動的リンク・ライブラリをロードし、前記記号参照を解決することを可能にし、前記システム・リンカまたはローダの支援を必要とせずに前記アプリケーション・プログラムに前記記号を提供する、前記実行及び解決ステップである。
特開平8−339296号公報
Fifth, executing the code and resolving unresolved symbol references in the code by the trigger routine, wherein the trigger routine accesses the export definition section generated by the prelinker Enabling the runtime library to access the dynamic link library containing the unresolved symbol, load the dynamic link library, and resolve the symbol reference; Or the execution and resolution step of providing the symbol to the application program without the assistance of a loader.
JP-A-8-339296

前記従来の動的モジュールリンクが可能であるコンピュータにとって負荷が軽い言語で記述されたプログラムに変更処理するプログラム処理プログラム及びプログラム処理プログラムを記録した記録媒体及びプログラム処理装置及びプログラム処理方法では、動的モジュールを実行時にリンクするため、各プロセッサ毎にコンパイラを修正し、コンパイラにより実行時リンクが可能な位置独立コードを生成していた。   In the program processing program, the recording medium storing the program processing program, the program processing apparatus, and the program processing method for changing the program into a program written in a language with a light load on the computer capable of the conventional dynamic module link, In order to link modules at runtime, the compiler was modified for each processor, and the compiler generated position-independent code that could be linked at runtime.

しかしながらこの従来の方法では、コンパイラが対応していない限り、動的モジュールリンクに対応した位置独立コードを生成することができなかった。   However, this conventional method cannot generate position-independent code corresponding to dynamic module linking unless the compiler supports it.

従って、動的モジュールリンク可能な位置独立コードを生成するにはコンパイラ自身の書き換えが必要となり、しかもコンパイラは各プロセッサ毎に存在するので、全体では膨大な量の修正が必要となった。   Therefore, the compiler itself needs to be rewritten to generate position-independent code capable of dynamic module linking. Moreover, since the compiler exists for each processor, a huge amount of correction is required as a whole.

更に、新しいプロセッサが開発されたり、プロセッサのバージョンアップが行われる毎に、コンパイラの修正を行うことが必要となり、多くの労力を必要とする上に、誤りが発生する確率もそれに伴って上昇することは避けられなかった。   Furthermore, each time a new processor is developed or upgraded, it is necessary to modify the compiler, which requires a lot of labor and increases the probability of errors. That was inevitable.

本発明はこれらの課題を解決し、コンパイラやリンカを変更することなく、動的モジュールリンクに対応したデータ領域に付いての位置独立コードを生成することが可能であり、更にこの動的モジュールリンクに対応した位置独立コードをリンクすることによって実行コードを生成することができる、プログラム処理プログラム及びプログラム処理プログラムを記録した記録媒体及びプログラム処理装置及びプログラム処理方法に関するものである。   The present invention solves these problems, and can generate position-independent code for a data area corresponding to dynamic module linking without changing the compiler or linker. The present invention relates to a program processing program, a recording medium on which a program processing program is recorded, a program processing apparatus, and a program processing method, which can generate an execution code by linking position-independent codes corresponding to.

上記課題を解決するため、本特許出願に係る発明は次のような手段を採る。   In order to solve the above problems, the invention according to the present patent application adopts the following means.

本特許出願に係る請求項1に記載の発明は、変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するステップを有するコンピュータプログラムであって、前記シンボルで宣言された変数に相対アドレスを設定する第1のステップと、前記シンボルで宣言された変数に対してアクセスするステップを前記第1のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第2のステップと、前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第3のステップと、前記追加された変数を含めて前記シンボルで宣言された変数に相対アドレスを設定する第4のステップと、前記シンボルで宣言された変数に対してアクセスするステップを前記第4のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第5のステップと、前記第2のステップと前記第5のステップとで変換されたアクセスするステップの相対アドレスが異なる前記アクセスするステップを検出する第6のステップと、前記第6のステップで検出した相対アドレスが異なるアクセスするステップを前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップに変換する第7のステップと、を有する、プログラム処理プログラムである。   The invention according to claim 1 of the present patent application is a computer program including a step of processing a computer program including a step of declaring a variable with a symbol and a step of accessing the variable declared with the symbol. A first step of setting a relative address for the variable declared in the symbol and a step of accessing the variable declared in the symbol by the relative address set in the first step. A second step of converting to a step of accessing the declared variable; a third step of adding another variable declared in the symbol before the variable declared in the symbol; and the added variable And a fourth step of setting a relative address to a variable declared with the symbol, A fifth step of converting a step of accessing a variable declared in BOL to a step of accessing a variable declared in the symbol by the relative address set in the fourth step; and the second step And the fifth step detects the accessing step in which the relative address of the accessing step converted is different from the fifth step, and the accessing step in which the relative address detected in the sixth step is different. A program processing program comprising: a seventh step of converting a variable to be accessed into a step of accessing by a declared symbol.

本特許出願に係る請求項2に記載の発明は、変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するステップを有するコンピュータプログラムであって、前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第1のステップと、前記追加された変数を含めずに前記シンボルで宣言された変数に対してアクセスするステップが前記宣言された変数の相対アドレスでアクセスするステップに変換された時の第1の相対値と前記追加された変数を含めて前記シンボルで宣言された変数に対してアクセスするステップが前記宣言された変数の相対アドレスでアクセスするステップに変換された時の第2の相対値との比較を行う第2のステップと、前記比較された第1の相対値と第2の相対値とが異なる前記シンボルで宣言された変数にアクセスするステップを前記シンボルで宣言された変数に対してシンボルでアクセスするステップに変換する第3のステップと、を有する、プログラム処理プログラムである。   The invention according to claim 2 of the present patent application is a computer program having a step of processing a computer program including a step of declaring a variable with a symbol and a step of accessing the variable declared with the symbol. A first step of adding another variable declared in the symbol before the variable declared in the symbol, and accessing the variable declared in the symbol without including the added variable The step of accessing the variable declared by the symbol including the first relative value when the step is converted to the step of accessing by the relative address of the declared variable and the added variable is the declaration. The second step of comparing with the second relative value when converted to the step of accessing with the relative address of the specified variable And the step of accessing the variable declared by the symbol different from the compared first relative value and the second relative value by accessing the variable declared by the symbol by symbol. A program processing program comprising: a third step of converting.

本特許出願に係る請求項3に記載の発明は、前記シンボルで宣言された変数に対してアクセスするステップは、前記シンボルで宣言された変数に対して間接アドレス指定によってアクセスするステップであり、前記相対アドレスによって前記シンボルで宣言された変数にアクセスするステップは、相対アドレスと間接アドレス指定とによって前記シンボルで宣言された変数にアクセスするステップである、請求項1に記載のプログラム処理プログラムである。   In the invention according to claim 3 of the present patent application, the step of accessing the variable declared by the symbol is a step of accessing the variable declared by the symbol by indirect addressing, The program processing program according to claim 1, wherein the step of accessing a variable declared in the symbol by a relative address is a step of accessing a variable declared in the symbol by a relative address and indirect addressing.

本特許出願に係る請求項4に記載の発明は、前記シンボルで宣言された変数に対してシンボルでアクセスするステップは、相対アドレスと間接アドレス指定とによって前記シンボルで宣言された変数に対してアクセスするステップである、請求項2に記載のプログラム処理プログラムである。   In the invention according to claim 4 of the present patent application, the step of accessing the variable declared by the symbol by the symbol accesses the variable declared by the symbol by relative address and indirect addressing. The program processing program according to claim 2, wherein the program processing program is a program processing program.

本特許出願に係る請求項5に記載の発明は、前記間接アドレス指定のためのアドレス変数領域を設定するステップを有する、請求項3又は請求項4に記載のプログラム処理プログラムである。   The invention according to claim 5 of the present patent application is the program processing program according to claim 3 or 4, further comprising a step of setting an address variable area for the indirect addressing.

本特許出願に係る請求項6に記載の発明は、前記変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対して処理を行うステップとを含むプログラムは、C言語、またはC++言語、またはJAVA(登録商標)言語、またはFORTRAN言語、またはCOBOL言語、またはBASIC言語、またはAPL言語、またはPL/1言語、またはLISP言語、またはProlog言語、またはこれら以外のコンパイラ言語、またはこれら以外のインタープリタ言語、またはアセンブラ言語、のいずれか1つまたは複数で記述されたプログラムである請求項1から請求項5の何れか1項に記載のプログラム処理プログラムである。   The invention according to claim 6 of the present patent application is a program including a step of declaring the variable with a symbol and a step of performing processing on the variable declared with the symbol, in C language, or C ++ language, Or JAVA (registered trademark) language, FORTRAN language, COBOL language, BASIC language, BASIC language, APL language, PL / 1 language, LISP language, Prolog language, compiler language other than these, or other interpreter The program processing program according to any one of claims 1 to 5, wherein the program is a program described in any one or more of a language and an assembler language.

本特許出願に係る請求項7に記載の発明は、前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップは、コンパイラ言語、またはインタープリタ言語、またはアセンブラ言語、または機械語、または中間言語、のいずれか1つまたは複数で記述されたステップである請求項1から請求項6の何れか1項に記載のプログラム処理プログラムである。   In the invention according to claim 7 of the present patent application, the step of accessing by the symbol declaring the variable to be accessed is performed in a compiler language, an interpreted language, an assembler language, a machine language, or an intermediate language. The program processing program according to any one of claims 1 to 6, which is a step described in any one or a plurality of languages.

本特許出願に係る請求項8に記載の発明は、コンピュータ読み取り可能な記録媒体であって、請求項1から請求項7の何れか1項に記載のプログラム処理プログラムを記録した記録媒体である。   The invention according to claim 8 of the present patent application is a computer-readable recording medium on which the program processing program according to any one of claims 1 to 7 is recorded.

本特許出願に係る請求項9に記載の発明は、変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するプログラム処理装置であって、前記シンボルで宣言された変数に相対アドレスを設定する第1の手段と、前記シンボルで宣言された変数に対してアクセスするステップを前記第1のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第2の手段と、前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第3の手段と、前記追加された変数を含めて前記シンボルで宣言された変数に相対アドレスを設定する第4の手段と、前記シンボルで宣言された変数に対してアクセスするステップを前記第4のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第5の手段と、前記第2のステップと前記第5のステップとで変換されたアクセスするステップの相対アドレスが異なる前記アクセスするステップを検出する第6の手段と、前記第6のステップで検出した相対アドレスが異なるアクセスするステップを前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップに変換する第7の手段と、を有する、プログラム処理装置である。   The invention according to claim 9 of the present patent application is a program processing apparatus for processing a computer program including a step of declaring a variable with a symbol and a step of accessing the variable declared with the symbol, A first means for setting a relative address for a variable declared in the symbol, and a step for accessing the variable declared in the symbol is declared in the symbol by the relative address set in the first step; Including a second means for converting to a step of accessing the variable, a third means for adding another variable declared in the symbol before the variable declared in the symbol, and including the added variable A fourth means for setting a relative address to the variable declared by the symbol, and access to the variable declared by the symbol; A fifth means for converting the step of accessing into the step of accessing the variable declared in the symbol by the relative address set in the fourth step, and the second step and the fifth step. The sixth means for detecting the accessing step having a different relative address in the accessing step and the accessing step having the different relative address detected in the sixth step are declared as variables to be accessed. And a seventh means for converting into a step of accessing by a symbol.

本特許出願に係る請求項10に記載の発明は、変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するプログラム処理方法であって、前記シンボルで宣言された変数に相対アドレスを設定する第1の工程と、前記シンボルで宣言された変数に対してアクセスするステップを前記第1のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第2の工程と、前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第3の工程と、前記追加された変数を含めて前記シンボルで宣言された変数に相対アドレスを設定する第4の工程と、前記シンボルで宣言された変数に対してアクセスするステップを前記第4のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第5の工程と、前記第2のステップと前記第5のステップとで変換されたアクセスするステップの相対アドレスが異なる前記アクセスするステップを検出する第6の工程と、前記第6のステップで検出した相対アドレスが異なるアクセスするステップを前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップに変換する第7の工程と、を有する、プログラム処理方法である。   The invention according to claim 10 of the present patent application is a program processing method for processing a computer program including a step of declaring a variable with a symbol and a step of accessing the variable declared with the symbol, A first step of setting a relative address for a variable declared in the symbol, and a step of accessing the variable declared in the symbol are declared in the symbol by the relative address set in the first step. Including a second step of converting to a step of accessing the variable, a third step of adding another variable declared in the symbol before the variable declared in the symbol, and including the added variable A fourth step of setting a relative address for a variable declared with the symbol, and an access to the variable declared with the symbol. A fifth step of converting the step of accessing the variable declared in the symbol by the relative address set in the fourth step, and converting between the second step and the fifth step. Declaring the variable to be accessed in the sixth step of detecting the accessing step having a different relative address of the accessing step and the accessing step having a different relative address detected in the sixth step, And a seventh step of converting to the step of accessing by the symbol being present.

本発明の、プログラム処理プログラム及びプログラム処理プログラムを記録した記録媒体及びプログラム処理装置及びプログラム処理方法によると、コンパイラやリンカを変更することなく、動的モジュールリンクに対応したデータ領域に付いての位置独立コードを生成することが可能であり、更にこの動的モジュールリンクに対応した位置独立コードをリンクすることによって実行コードを生成することができ、その実用的価値は極めて大きい。   According to the program processing program, the recording medium on which the program processing program is recorded, the program processing apparatus, and the program processing method of the present invention, the position of the data area corresponding to the dynamic module link without changing the compiler or the linker. Independent code can be generated, and further, executable code can be generated by linking position-independent code corresponding to the dynamic module link, and its practical value is extremely large.

以下に本発明の実施の形態について、図面を参照しながら説明する。   Embodiments of the present invention will be described below with reference to the drawings.

(実施の形態1)
図1は、本発明に係るプログラム処理プログラムの1実施の形態であるプリコンパイラ(131)とコンパイラ(133)とポストコンパイラ(135)に対して入力され、これらが処理する対象であるプログラムと、これらが処理した結果であって、これらが出力するプログラムの構成を示す図である。
(Embodiment 1)
FIG. 1 shows a program that is input to and processed by a precompiler (131), a compiler (133), and a postcompiler (135) as an embodiment of a program processing program according to the present invention. It is a figure which shows the structure of the program which these are the results of processing and which these output.

本発明に係るプログラム処理プログラムのこの実施の形態は、プリコンパイラ(131)とコンパイラ(133)とポストコンパイラ(135)とシンボル情報生成部(142)とから構成される。   This embodiment of the program processing program according to the present invention comprises a precompiler (131), a compiler (133), a post compiler (135), and a symbol information generation unit (142).

本発明に係るプログラム処理プログラムのこの実施の形態が処理する対象プログラムは、C言語ソースプログラム−1(121)である。   The target program processed by this embodiment of the program processing program according to the present invention is the C language source program-1 (121).

図1に示すように、この実施の形態のプリコンパイラ(131)はC言語ソースプログラム−1(121)を入力とし、この入力したC言語ソースプログラム−1(121)を処理し、その処理をした結果として、C言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)とを出力する。   As shown in FIG. 1, the precompiler (131) of this embodiment receives C language source program-1 (121) as input, processes the input C language source program-1 (121), and performs the processing. As a result, C language source program-2 (122) and C language source program-3 (123) are output.

プリコンパイラ(131)が出力したC言語ソースプログラム−2(122)はコンパイラ(133)に入力され、コンパイラ(133)によって処理の対象とされる。   The C language source program-2 (122) output from the precompiler (131) is input to the compiler (133) and is processed by the compiler (133).

同様に、プリコンパイラ(131)が出力したC言語ソースプログラム−3(123)もコンパイラ(133)に入力され、コンパイラ(133)によって処理の対象とされる。   Similarly, the C language source program-3 (123) output from the precompiler (131) is also input to the compiler (133) and is processed by the compiler (133).

コンパイラ(133)は図1では2つ示しているが、同じ番号を付していることから解る通り、同一のものである。   Although two compilers (133) are shown in FIG. 1, they are the same as understood from the fact that they have the same numbers.

コンパイラ(133)は入力されたC言語ソースプログラム−2(122)を処理して、アセンブラ言語プログラム−1(124)を作成して出力し、入力されたC言語ソースプログラム−3(123)を処理して、アセンブラ言語プログラム−2(125)を作成して出力する。   The compiler (133) processes the input C language source program-2 (122), creates and outputs an assembler language program-1 (124), and outputs the input C language source program-3 (123). The assembler language program-2 (125) is generated and processed.

一方、シンボル情報生成部(142)もC言語ソースプログラム−1(121)を入力とし、この入力したC言語ソースプログラム−1(121)を処理し、その処理をした結果として、シンボル情報ファイル(144)を出力する。   On the other hand, the symbol information generation unit (142) also receives the C language source program-1 (121), processes the input C language source program-1 (121), and, as a result of the processing, the symbol information file ( 144) is output.

コンパイラ(133)が出力したアセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)と、シンボル情報生成部(142)が出力したシンボル情報ファイル(144)とは、ポストコンパイラ(135)に対して入力され、処理される。   The assembler language program-1 (124) and assembler language program-2 (125) output by the compiler (133) and the symbol information file (144) output by the symbol information generation unit (142) are the post-compiler (135). Is input and processed.

ポストコンパイラ(135)は入力されたアセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)とシンボル情報ファイル(144)とを処理して、アセンブラ言語プログラム−3(126)を作成して出力する。   The post compiler (135) processes the input assembler language program-1 (124), assembler language program-2 (125), and symbol information file (144) to create an assembler language program-3 (126). Output.

ポストコンパイラ(135)によって作成され出力されたアセンブラ言語プログラム−3(126)は、アセンブラ(137)に入力され、アセンブラ(137)によって翻訳され、翻訳された結果オブジェクトプログラム(127)が生成され、これが出力される。   The assembler language program-3 (126) created and output by the post compiler (135) is input to the assembler (137), translated by the assembler (137), and a translated result object program (127) is generated. This is output.

このオブジェクトプログラム(127)はリンカ(138)に入力され処理される。   This object program (127) is input to the linker (138) and processed.

リンカ(138)は、アセンブラ(137)が出力したオブジェクトプログラム(127)とその他のオブジェクトプログラム(128)とを入力し、これらを処理して、実行プログラム(129)を作成し出力する。   The linker (138) inputs the object program (127) output from the assembler (137) and the other object program (128), processes them, and creates and outputs an execution program (129).

尚、オブジェクトプログラム(127)とその他のオブジェクトプログラム(128)とは、それぞれ1つのオブジェクトプログラムであっても良いし、それぞれ複数のプログラムであっても構わない。   The object program (127) and the other object program (128) may each be one object program or a plurality of programs.

リンカ(138)によって作成され出力された実行プログラム(129)は、各種のコンピュータの仕様が規定するフォーマットで作成され、それぞれのコンピュータがそのまま実行することのできるプログラムである。   The execution program (129) created and output by the linker (138) is a program that is created in a format defined by various computer specifications and can be executed by each computer as it is.

図2は、本発明に係るプログラム処理プログラムのこの実施の形態であるプリコンパイラ(131)が処理する対象プログラムであるC言語ソースプログラム−1(121)の内容の一例と、このC言語ソースプログラム−1(121)がプリコンパイラ(131)に入力され、プリコンパイラ(131)によって処理され、プリコンパイラ(131)によって出力されるC言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)と、C言語ソースプログラム−1(121)がシンボル情報生成部(142)に入力され、シンボル情報生成部(142)によって処理され、その処理をした結果として出力されるシンボル情報ファイル(144)とのそれぞれの内容の一例とを示す図である。   FIG. 2 shows an example of the contents of a C language source program-1 (121) which is a target program processed by the precompiler (131) which is this embodiment of the program processing program according to the present invention, and the C language source program. -1 (121) is input to the precompiler (131), processed by the precompiler (131), and output by the precompiler (131). The C language source program-2 (122) and the C language source program-3 ( 123) and a C language source program-1 (121) are input to the symbol information generation unit (142), processed by the symbol information generation unit (142), and output as a result of the processing. ) And an example of each content.

更に図2は、本発明に係るプログラム処理プログラムのこの実施の形態であるコンパイラ(133)が処理する対象プログラムであるC言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)との内容の一例と、このC言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)とがコンパイラ(133)に入力され、コンパイラ(133)によって処理され、コンパイラ(133)によって出力されるアセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)とのそれぞれの内容の一例とをも示している。   Further, FIG. 2 shows C language source program-2 (122) and C language source program-3 (123), which are target programs to be processed by the compiler (133), which is this embodiment of the program processing program according to the present invention. The C language source program-2 (122) and the C language source program-3 (123) are input to the compiler (133), processed by the compiler (133), and output by the compiler (133). Also shown are examples of the contents of the assembled assembler language program-1 (124) and assembler language program-2 (125).

又、図4には本発明に係るプログラム処理プログラムの実施の形態であるプリコンパイラ(131)とコンパイラ(133)とポストコンパイラ(135)とが行う主な処理だけを「S」で始まる番号を付し、その時系列に従って示している。   In FIG. 4, only the main processes performed by the precompiler (131), the compiler (133), and the post compiler (135), which are embodiments of the program processing program according to the present invention, are numbered starting with “S”. It is attached according to the time series.

更に図5には本発明に係るプログラム処理プログラムの実施の形態であるプリコンパイラ(131)とコンパイラ(133)とポストコンパイラ(135)とシンボル情報生成部(142)とが実行されるコンピュータ環境の主な構成を示している。   Further, FIG. 5 shows a computer environment in which the precompiler (131), the compiler (133), the post compiler (135), and the symbol information generation unit (142), which are embodiments of the program processing program according to the present invention, are executed. The main configuration is shown.

これらプリコンパイラ(131)、コンパイラ(133)、ポストコンパイラ(135)、及びC言語ソースプログラム−1(121)、言語ソースプログラム−2(122)、言語ソースプログラム−3(123)、アセンブラ言語プログラム−1(124)、アセンブラ言語プログラム−2(125)、アセンブラ言語プログラム−3(126)、或いはアセンブラ(137)、リンカ(138)、シンボル情報生成部(142)、オブジェクトプログラム(127)、他のオブジェクトプログラム(128)、シンボル情報ファイル(144)、実行プログラム(129)のそれぞれや、それ以外の必要なプログラムやデータは補助記憶装置(503)に記憶され、必要に応じて主記憶装置(502)に読み出され、CPU(501)によって実行や処理が行われる。CPUが行うこれらの実行や処理は、操作者が入力装置(504)を使用することによって選択され起動される。CPUが行ったこれらの実行や処理の結果は表示装置(505)に表示されることもあり、主記憶装置(502)に記憶されることもあり、必要に応じて補助記憶装置(503)に記憶され、必要に応じて通信装置(506)によって通信される。これらプログラムやデータのCPU(501)、主記憶装置(502)、補助記憶装置(503)、入力装置(504)、表示装置(505)、通信装置(506)、その他の機器や部材間の移動はバス(507)を経由して行われる。   These precompiler (131), compiler (133), postcompiler (135), C language source program-1 (121), language source program-2 (122), language source program-3 (123), assembler language program -1 (124), assembler language program-2 (125), assembler language program-3 (126), or assembler (137), linker (138), symbol information generation unit (142), object program (127), etc. The object program (128), the symbol information file (144), the execution program (129), and other necessary programs and data are stored in the auxiliary storage device (503), and the main storage ( 502) and the CPU (501) Therefore, execution and processing is carried out. These executions and processes performed by the CPU are selected and activated by the operator using the input device (504). The results of the execution and processing performed by the CPU may be displayed on the display device (505) or may be stored in the main storage device (502), and may be stored in the auxiliary storage device (503) as necessary. Stored and communicated by the communication device (506) as necessary. Transfer of these programs and data between the CPU (501), the main storage device (502), the auxiliary storage device (503), the input device (504), the display device (505), the communication device (506), and other devices and members Is performed via the bus (507).

このコンピュータ環境はその他の部材や機器を含むこともあるが、その詳細は省略する。   The computer environment may include other members and devices, but details thereof are omitted.

図2に示す例では、本発明に係るプログラム処理プログラムのこの実施の形態の処理対象となる最初のプログラムは、C言語で記述されたC言語ソースプログラム−1(121)である。   In the example shown in FIG. 2, the first program to be processed in this embodiment of the program processing program according to the present invention is C language source program-1 (121) described in C language.

しかしながら、この実施の形態の処理対象となる最初のプログラムは必ずしもC言語で記述されていることが必要ではなく、他の言語、例えば、C++言語、またはJAVA(登録商標)言語、またはFORTRAN言語、またはCOBOL言語、またはBASIC言語、またはAPL言語、またはPL/1言語、またはLISP言語、またはProlog言語、またはこれら以外のコンパイラ言語、またはこれら以外のインタープリタ言語、またはアセンブラ言語、のいずれか1つまたは複数の言語の組み合わせによって記述されたプログラムであっても構わない。   However, the first program to be processed in this embodiment does not necessarily have to be written in the C language, and other languages such as C ++ language, JAVA (registered trademark) language, or FORTRAN language, Or COBOL language, or BASIC language, or APL language, or PL / 1 language, or LISP language, or Prolog language, or any other compiler language, or any other interpreted language, or any assembler language, or It may be a program written in a combination of a plurality of languages.

図2に示すように、このC言語ソースプログラム−1(121)は、このプログラムで使用するグローバル変数(外部変数)を宣言している部分と、これら宣言されたグローバル変数やその他のローカル変数(内部変数)を使って行う処理を記述している関数部分とに分けられる。   As shown in FIG. 2, this C language source program-1 (121) includes a part that declares global variables (external variables) used in this program, and these declared global variables and other local variables ( It can be divided into function parts that describe processing to be performed using internal variables.

このC言語ソースプログラム−1(121)の例では、グローバル変数(外部変数)を宣言している部分は、「int var_a;」と「int var_b;」とである。   In the example of the C language source program-1 (121), the parts declaring global variables (external variables) are “int var_a;” and “int var_b;”.

これは2つのグローバル変数であるvar_aとvar_bとを使用することを宣言し、且つこれらの2つのグローバル変数が共に整数データを扱うことを宣言している。   This declares the use of two global variables, var_a and var_b, and declares that these two global variables together handle integer data.

このC言語ソースプログラム−1(121)の例では、処理を記述している関数部分は、「void func1(void){ 」から「 } 」までである。   In the example of the C language source program-1 (121), the function part describing the process is from “void func1 (void) {” to “}”.

この関数部分では、「func1」という名前の関数について、その処理内容を記述しており、具体的には、この関数は返り値を有さず(void)、引き数をも有さない(void)ことが宣言される。   In this function portion, the processing content of the function named “func1” is described. Specifically, this function has no return value (void) and no argument (void). ) Is declared.

具体的な処理の内容としては、「var_b」という名前のグローバル変数に値「40」を代入する処理だけが記述されている。   As specific processing contents, only processing for substituting the value “40” into the global variable named “var_b” is described.

この例では簡単にこれだけの具体的な処理内容しか挙げていないが、実際にはより多くの種々の処理を含んでおり、それらは記号「:」によって省略して表現している。   In this example, only such specific processing contents are simply described, but actually, various types of processing are included, and these are expressed by omitting them by the symbol “:”.

図2に示すように、本発明に係るプログラム処理プログラムのこの実施の形態であるプリコンパイラ(131)は、このC言語ソースプログラム−1(121)を入力情報として読み込み(図4のS401)、処理を行い、C言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)とを生成して出力する。   As shown in FIG. 2, the precompiler (131) which is this embodiment of the program processing program according to the present invention reads this C language source program-1 (121) as input information (S401 in FIG. 4), Processing is performed to generate and output C language source program-2 (122) and C language source program-3 (123).

即ち、ここで言うプリコンパイラ(131)が行う処理とは、C言語ソースプログラム−1(121)から、C言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)とを生成する処理である。   That is, the processing performed by the precompiler (131) referred to here generates C language source program-2 (122) and C language source program-3 (123) from C language source program-1 (121). It is processing.

そのより具体的な処理内容を次に説明する。   More specific processing contents will be described next.

C言語ソースプログラム−2(122)は、C言語ソースプログラム−1(121)において、外部変数として宣言されていたものを、グローバル構造体(外部構造体と呼ぶこともある)のメンバーとして宣言し直したものである。そしてこの変数にアクセスする処理の記述を外部変数へのアクセスから、グローバル構造体のメンバーにアクセスする処理の記述に変更したものである。   The C language source program-2 (122) declares what was declared as an external variable in the C language source program-1 (121) as a member of a global structure (sometimes called an external structure). It has been fixed. The description of the process for accessing the variable is changed from the access to the external variable to the description of the process for accessing the member of the global structure.

尚、ここでは外部変数として宣言されていた変数だけについて説明するが、static宣言された内部変数及び外部変数を含むものであっても構わない。   Here, only variables that have been declared as external variables will be described, but they may include internal variables and external variables that have been declared static.

即ち、C言語ソースプログラム−2(122)ではまず、グローバル構造体として「_globals」という名前の構造体を宣言する。   That is, in the C language source program-2 (122), first, a structure named “_globals” is declared as a global structure.

尚、この構造体の名前は一例であってこれに限るものでは無く、他の名前と重複しない限り何であっても構わない。   The name of the structure is an example and is not limited to this. Any name may be used as long as it does not overlap with other names.

次に、C言語ソースプログラム−1(121)において外部変数として宣言する記述である「int var_a;」と「int var_b;」との記述を、前記宣言したグローバル構造体(_globals)のメンバーとしての宣言である、「int var_a;」と「int var_b;」との記述に置き換えている。   Next, a description of “int var_a;” and “int var_b;”, which are descriptions declared as external variables in the C language source program-1 (121), is used as a member of the declared global structure (_globals). The declarations are replaced with descriptions of “int var_a;” and “int var_b;”.

次に、C言語ソースプログラム−2(122)ではその処理を記述している関数の最初に、前記宣言したグローバル構造体(_globals)の先頭アドレスをレジスター「DP」に保持することを記述している。   Next, in the C language source program-2 (122), at the beginning of the function describing the process, it is described that the start address of the declared global structure (_globals) is held in the register “DP”. Yes.

尚このグローバル構造体の先頭アドレスを「DP」レジスターに保持することも一例であって、その他のレジスターを使用してグローバル構造体の先頭アドレスを保持しても構わないし、メモリー上のスタック領域等を使用しても構わないし、その他のメモリー領域を使用して保持する方法であっても構わない。このグローバル構造体の先頭アドレスを保持する方法に応じて、以下に説明するこのグローバル構造体へのアクセス方法が変るだけである。   Note that holding the start address of this global structure in the “DP” register is an example, and other registers may be used to hold the start address of the global structure. May be used, or a method of holding using other memory areas may be used. The access method to the global structure described below only changes depending on the method for holding the start address of the global structure.

更に、C言語ソースプログラム−1(121)において外部変数であるvar_bにアクセスして値「40」を代入する記述である「var_b=40;」を、このグローバル構造体のメンバーであるvar_bにアクセスして値「40」を代入する処理に相当する「globals_ptr−>var_b=40;」との記述に書き換えている。   Furthermore, in the C language source program-1 (121), access is made to “var_b = 40;” which is a description for accessing the external variable var_b and assigning the value “40” to the global structure member var_b. Thus, the description “globals_ptr → var_b = 40;” corresponding to the process of substituting the value “40” is rewritten.

上記グローバル構造体の先頭アドレスを「DP」レジスターに保持する記述によって、globals_ptrの実体は、レジスター「DP」である。   The entity of globals_ptr is the register “DP” based on the description that holds the start address of the global structure in the “DP” register.

C言語ソースプログラム−3(123)も、C言語ソースプログラム−2(122)とほとんど同じである。   The C language source program-3 (123) is almost the same as the C language source program-2 (122).

異なるのは、前記宣言したグローバル構造体(_globals)のメンバーの宣言の最初に、「int _dummy;」との記述が行われていることだけである(図4のS404)。   The only difference is that “int_dummy;” is described at the beginning of the declaration of the members of the declared global structure (_globals) (S404 in FIG. 4).

C言語ソースプログラム−1(121)において外部変数として宣言する記述である「int var_a;」と「int var_b;」との記述を置き換える、前記宣言したグローバル構造体(_globals)のメンバーとしての宣言である、「int var_a;」と「int var_b;」との記述は、この_dummyの後に続けて記載される。   A declaration as a member of the declared global structure (_globals), which replaces the description of “int var_a;” and “int var_b;”, which are descriptions declared as external variables in the C language source program-1 (121) A description of “int var_a;” and “int var_b;” is described after _dummy.

C言語ソースプログラム−3(123)は、この部分においてのみC言語ソースプログラム−2(122)と異なっており、他の部分は全く同じである。   The C language source program-3 (123) is different from the C language source program-2 (122) only in this portion, and the other portions are exactly the same.

図2に示すように、このようにして生成されたC言語ソースプログラム−2(122)とC言語ソースプログラム−3(123)とは、コンパイラ(133)によってコンパイルされ、それぞれアセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)とが変換生成される。   As shown in FIG. 2, the C language source program-2 (122) and the C language source program-3 (123) generated in this way are compiled by the compiler (133), and each of them is an assembler language program-1. (124) and assembler language program-2 (125) are converted and generated.

この2つのアセンブラ言語プログラムは共に、グローバル構造体のメンバーであるvar_bに値「40」を代入する処理を記述している。   Both of these two assembler language programs describe a process of assigning the value “40” to var_b which is a member of the global structure.

その具体的な内容は次の通りである。   The specific contents are as follows.

アセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)との両方において、第1の命令である「mov 40,D0」は、値「40」をレジスターD0に格納することを表している。   In both assembler language program-1 (124) and assembler language program-2 (125), the first instruction “mov 40, D0” indicates that the value “40” is stored in the register D0. Yes.

第2の命令である「mov D0,(4,DP)」と「mov D0,(8,DP)」とは、レジスターD0に格納した値「40」を変数var_bに移動するための命令であり、レジスターDPの内容に相対アドレス(オフセットアドレスとも言う。以下同じ。)値である「4」又は「8」を加えた値を対象アドレスとして間接アクセスを行い、レジスターD0の内容を移動することを示している(図4のS403とS406)。   The second instructions “mov D0, (4, DP)” and “mov D0, (8, DP)” are instructions for moving the value “40” stored in the register D0 to the variable var_b. Indirect access is performed using a value obtained by adding “4” or “8”, which is a relative address (also referred to as an offset address) value, to the contents of the register DP, and moving the contents of the register D0. (S403 and S406 in FIG. 4).

即ち、変数var_bはグローバル構造体_globalsのメンバーであり、このグローバル構造体_globalsの先頭アドレスは関数func1の最初の記述によって、レジスターDPに格納されている。   That is, the variable var_b is a member of the global structure_globals, and the start address of the global structure_globals is stored in the register DP by the first description of the function func1.

そして変数var_bは、このグローバル構造体_globalsの、C言語ソースプログラム−2(122)では第2番目のメンバーであり、C言語ソースプログラム−3(123)では第3番目のメンバーであり、C言語ソースプログラム−2(122)ではその前に1つの整数型のメンバーvar_aが存在し、C言語ソースプログラム−3(123)ではその前に2つの整数型のメンバー_dummyとvar_aが存在し、それぞれこれらはグローバル構造体内に4バイトと8バイトの領域を占めているので、アセンブラ言語プログラム−1(124)ではレジスターDPの内容にオフセットアドレス値として「4」を加えた値を対象アドレスとして間接アクセスを行い、アセンブラ言語プログラム−2(125)ではレジスターDPの内容にオフセットアドレス値として「8」を加えた値を対象アドレスとして間接アクセスを行う(図4のS402とS405)。   The variable var_b is the second member of the global structure _globals in the C language source program-2 (122) and the third member in the C language source program-3 (123). Source program-2 (122) has one integer type member var_a before it, and C language source program-3 (123) has two integer type members _dummy and var_a before them. Occupies an area of 4 bytes and 8 bytes in the global structure, so in the assembler language program-1 (124), the contents of the register DP plus “4” as the offset address value are used for indirect access. And register in assembler language program-2 (125) Performing indirect access to the contents of P as a target address value obtained by adding "8" as an offset address value (S402 and S405 in FIG. 4).

これによって、レジスターD0の内容である「40」を、グローバル構造体のメンバーである変数var_bに格納することができる。   Thus, “40” that is the content of the register D0 can be stored in the variable var_b that is a member of the global structure.

一方、このC言語ソースプログラム−1(121)はシンボル情報生成部(142)にも入力され、シンボル情報生成部(142)によって処理され、シンボル情報ファイル(144)が作成され出力される。このシンボル情報ファイル(144)の内容は、図2に示すように、C言語ソースプログラム−1(121)によって宣言されている全ての外部変数の名称と、その外部変数のために使用される領域の相対アドレスとの対応を示す表である。   On the other hand, the C language source program-1 (121) is also input to the symbol information generation unit (142), processed by the symbol information generation unit (142), and a symbol information file (144) is created and output. As shown in FIG. 2, the contents of this symbol information file (144) are the names of all external variables declared by the C language source program-1 (121) and the areas used for the external variables. It is a table | surface which shows a response | compatibility with relative address.

図1に示すように、コンパイラ133が生成出力した2つのアセンブラ言語プログラムであるアセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)と、シンボル情報生成部(142)が生成出力したシンボル情報ファイル(144)とは、共にポストコンパイラ(135)に入力され、ポストコンパイラ(135)によって行われる処理の対象とされる。   As shown in FIG. 1, the assembler language program-1 (124), the assembler language program-2 (125), which are two assembler language programs generated and output by the compiler 133, and the symbol information generation unit (142) are generated and output. Both the symbol information file (144) is input to the post compiler (135) and is subjected to processing performed by the post compiler (135).

そしてポストコンパイラ(135)によって処理された結果、アセンブラ言語プログラム−3(126)が生成され、出力される。   As a result of processing by the post compiler (135), an assembler language program-3 (126) is generated and output.

この様子と、ポストコンパイラ(135)に入力され、ポストコンパイラ(135)から出力されるプログラムの例を、図3に示す。   FIG. 3 shows an example of this state and a program that is input to the post compiler (135) and output from the post compiler (135).

図3に示す通り、又上記の説明から解る通り、ポストコンパイラ(135)に入力されるのは、コンパイラ(133)が生成出力した2つのアセンブラ言語プログラムであるアセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)と、シンボル情報生成部(142)が生成出力したシンボル情報ファイル(144)とである。   As shown in FIG. 3 and as understood from the above description, the post-compiler (135) is inputted with two assembler language programs generated and output by the compiler (133), that is, an assembler language program-1 (124). The assembler language program-2 (125) and the symbol information file (144) generated and output by the symbol information generation unit (142).

従って、これら2つのアセンブラ言語プログラムとシンボル情報ファイル(144)とは、図2に示すものとその内容が同一である。   Therefore, the contents of these two assembler language programs and the symbol information file (144) are the same as those shown in FIG.

ポストコンパイラ(135)はまず、これら2つのアセンブラ言語プログラムを入力し、その差分、即ち異なる部分を検出する(図4のS407)。   The post compiler (135) first inputs these two assembler language programs and detects the difference, that is, a different part (S407 in FIG. 4).

図3に示す例では、アセンブラ言語プログラム−1(124)とアセンブラ言語プログラム−2(125)との、第2の命令である、「mov D0,(4,DP)」と「mov D0,(8,DP)」との、レジスターDPに対するオフセットアドレスだけが異なっている。   In the example shown in FIG. 3, “mov D0, (4, DP)” and “mov D0, (second instructions) of the assembler language program-1 (124) and the assembler language program-2 (125). 8, DP) ", only the offset address for the register DP is different.

次に、この差分を検出したポストコンパイラ(135)は、この異なる部分、即ちアセンブラ言語プログラム−1(124)の第2の命令である、「mov D0,(4,DP)」のレジスターDPに対するオフセットアドレス「4」を、シンボル情報ファイル(144)で検索し、この「4」に対応する外部変数の名称「var_b」を検出する。   Next, the post-compiler (135) that has detected this difference performs processing on this different part, that is, the register DP of “mov D0, (4, DP)”, which is the second instruction of the assembler language program-1 (124). The offset address “4” is searched in the symbol information file (144), and the name “var_b” of the external variable corresponding to this “4” is detected.

そしてこの異なる部分であるアセンブラ言語プログラム−1(124)の第2の命令の「mov D0,(4,DP)」のレジスターDPに対するオフセットアドレス「4」を、この外部変数の名称である「var_b」に置き換えた命令、即ち「mov D0,(var_b,DP)」を生成出力する(図4のS408)。   The offset address “4” with respect to the register DP of “mov D0, (4, DP)” of the second instruction of the assembler language program-1 (124), which is this different part, is used as the name of this external variable “var_b”. ", That is," mov D0, (var_b, DP) "is generated and output (S408 in FIG. 4).

尚、2つのアセンブラ言語プログラムの同一部分は、そのまま出力する。   The same part of the two assembler language programs is output as it is.

このようにして、ポストコンパイラ135は、アセンブラ言語プログラム−3(126)を生成し、出力する。   In this way, the post compiler 135 generates and outputs an assembler language program-3 (126).

アセンブラ言語プログラム−3(126)はアセンブラ(137)に入力され、アセンブルが行われ、オブジェクトプログラム(127)が生成出力される。オブジェクトプログラム(127)では、命令、例えば上記例では「mov」は機械語の命令に変換され、オペランドは相対アドレスが計算され、保存され、後述するリンカによる領域割当の対象とされる。この処理を含め、これ以降の処理は従来行われているアセンブルやリンク処理と同様であるから、簡単にのみ説明する。   The assembler language program-3 (126) is input to the assembler (137), assembled, and an object program (127) is generated and output. In the object program (127), an instruction, for example, “mov” in the above example is converted into a machine language instruction, the relative address of the operand is calculated and stored, and is subject to area allocation by the linker described later. Since the subsequent processing including this processing is the same as the conventional assembly and link processing, only a brief description will be given.

オブジェクトプログラム(127)は他のオブジェクトプログラム(128)と共にリンカ(138)に入力され、リンクが行われて実行プログラム(129)が生成出力される。   The object program (127) is input to the linker (138) together with the other object program (128), linked, and an execution program (129) is generated and output.

このリンク処理では、1つの作業を完結するために必要な命令が1つにまとめられ、この命令群が使用する領域も1つにまとめられて領域割当が行われ、割り当てられた領域が各命令のオペランド部に設定され、これが実行プログラム(129)となる。   In this link processing, instructions necessary for completing one work are grouped into one, areas used by this group of instructions are grouped into one, and area allocation is performed. This is the execution program (129).

尚、この例では、プリコンパイラ(131)により外部変数(「var_a」、「var_b」)を構造体のメンバーとして宣言し、相対アドレスのベースアドレスとして構造体の先頭アドレス「globals_ptr」をレジスター「DP」に保持し、外部変数へのアクセス「var_b=40;」を構造体アクセス「globals_ptr−>var_b=40;」に書き換えることにより、DP相対アクセスを生成していたが、プリコンパイラ(131)により外部変数(「var_a」、「var_b」)に対して一意な番号を付与し、外部変数の定義以外を番号に置き換えるよう#define命令(例えば「#define var_a 0」、「#define var_b 1」)を生成し、相対アドレスのベースアドレスとしてポインター変数「base_ptr」を用意し、そのアドレスをレジスター「DP」に保持し、外部変数へのアクセス「var_b=40;」を「*(base_ptr+var_b)=40;」に書き換えることによりDP相対アクセスを生成するとしてもよい。   In this example, an external variable (“var_a”, “var_b”) is declared as a member of the structure by the precompiler (131), and the start address “globals_ptr” of the structure is set in the register “DP” as the base address of the relative address. , And the DP relative access is generated by rewriting the access “var_b = 40;” to the external variable to the structure access “globals_ptr−> var_b = 40;”, but the precompiler (131) #Define instructions (for example, “#define var_a 0”, “#define var_b 1”) are assigned unique numbers to external variables (“var_a”, “var_b”) and replaced with numbers other than the definition of external variables. And the base address of the relative address Prepare the pointer variable “base_ptr” as follows, hold the address in the register “DP”, and change the relative access by rewriting “var_b = 40;” to “* (base_ptr + var_b) = 40;” to the external variable. It may be generated.

また、プリコンパイラ(131)により外部変数に対して一意な番号を付与し、相対アドレスのベースアドレスとして配列を用意し、そのアドレスをレジスター「DP」に保持し、外部変数へのアクセスを、あらかじめ外部変数に対して付与した番号をインデクスとした配列アクセスに書き換えることによりDP相対アクセスを生成するとしてもよい。   The precompiler (131) assigns a unique number to the external variable, prepares an array as a base address of the relative address, holds the address in the register “DP”, and accesses the external variable in advance. The DP relative access may be generated by rewriting the array access using the number assigned to the external variable as an index.

この構成によれば、シンボル情報生成部(142)は、シンボル情報ファイル(144)を作成するためにコンパイラ(133)の情報を必要としないため、シンボル情報生成部(142)の作りをコンパイラに依存しないようにすることができる。   According to this configuration, the symbol information generation unit (142) does not need the information of the compiler (133) in order to create the symbol information file (144). It can be made independent.

(実施の形態2)
次に本発明に係るプログラム処理プログラムの実施の形態2を説明する。しかしこの実施の形態2は多くの点で上記実施の形態1と同様であるから、同じ部分については説明を省略し異なる点に関してのみ説明を行う。
(Embodiment 2)
Next, a second embodiment of the program processing program according to the present invention will be described. However, since the second embodiment is the same as the first embodiment in many respects, the description of the same parts will be omitted and only the different points will be described.

図1は、本発明に係るプログラム処理プログラムの実施の形態2であるプログラムと、このプログラムの処理対象と、これらが処理した結果であってこれらが出力するプログラムとの構成を示す図でもある。但し、この実施の形態2の説明では、プリコンパイラ(631)とコンパイラ(633)とポストコンパイラ(635)とのように、番号を変えることによって実施の形態1と区別する。   FIG. 1 is also a diagram showing a configuration of a program that is a second embodiment of the program processing program according to the present invention, a processing target of the program, and a program that is output as a result of processing. However, in the description of the second embodiment, it is distinguished from the first embodiment by changing the numbers such as the precompiler (631), the compiler (633), and the post compiler (635).

従って、本発明に係るプログラム処理プログラムの実施の形態2は、プリコンパイラ(631)とコンパイラ(633)とポストコンパイラ(635)とシンボル情報生成部(642)とから構成される。   Therefore, the second embodiment of the program processing program according to the present invention includes a precompiler (631), a compiler (633), a post compiler (635), and a symbol information generation unit (642).

本発明に係るプログラム処理プログラムの実施の形態2が処理する対象プログラムは、C言語ソースプログラム−1(621)である。   The target program processed by the second embodiment of the program processing program according to the present invention is C language source program-1 (621).

実施の形態2のプリコンパイラ(631)はC言語ソースプログラム−1(621)を入力とし、この入力したC言語ソースプログラム−1(621)を処理し、その処理をした結果として、C言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)と、C言語ソースプログラム(652)とを出力する。   The precompiler (631) of the second embodiment receives the C language source program-1 (621), processes the input C language source program-1 (621), and, as a result of the processing, the C language source Program-2 (622), C language source program-3 (623), and C language source program (652) are output.

プリコンパイラ(631)が出力したC言語ソースプログラム−2(622)はコンパイラ(633)に入力され、コンパイラ(633)による処理の対象とされる。   The C language source program-2 (622) output from the precompiler (631) is input to the compiler (633) and is subjected to processing by the compiler (633).

同様に、プリコンパイラ(631)が出力したC言語ソースプログラム−3(623)も、コンパイラ(633)に入力され、コンパイラ(633)による処理の対象とされる。   Similarly, the C language source program-3 (623) output from the precompiler (631) is also input to the compiler (633) and is processed by the compiler (633).

同様に、プリコンパイラ(631)が出力したC言語ソースプログラム(652)も、コンパイラ(633)に入力され、コンパイラ(633)による処理の対象とされる。   Similarly, the C language source program (652) output by the precompiler (631) is also input to the compiler (633) and is processed by the compiler (633).

コンパイラ(633)は入力されたC言語ソースプログラム−2(622)を処理し、アセンブラ言語プログラム−1(624)を作成して出力し、入力されたC言語ソースプログラム−3(623)を処理し、アセンブラ言語プログラム−2(625)を作成して出力し、入力されたC言語ソースプログラム(652)を処理し、アセンブラ言語プログラム(654)を作成して出力する。   The compiler (633) processes the input C language source program-2 (622), creates and outputs an assembler language program-1 (624), and processes the input C language source program-3 (623). Then, the assembler language program-2 (625) is generated and output, the input C language source program (652) is processed, and the assembler language program (654) is generated and output.

一方、シンボル情報生成部(642)もC言語ソースプログラム−1(621)を入力とし、この入力したC言語ソースプログラム−1(621)を処理し、その処理をした結果として、シンボル情報ファイル(644)を出力する。   On the other hand, the symbol information generation unit (642) also receives the C language source program-1 (621), processes the input C language source program-1 (621), and, as a result of the processing, the symbol information file ( 644) is output.

コンパイラ(633)が出力したアセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)と、シンボル情報生成部(642)が出力したシンボル情報ファイル(644)とは、ポストコンパイラ(635)に対して入力され、処理される。   The assembler language program-1 (624) and assembler language program-2 (625) output from the compiler (633) and the symbol information file (644) output from the symbol information generation unit (642) are the post-compiler (635). Is input and processed.

ポストコンパイラ(635)は入力されたアセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)とシンボル情報ファイル(644)とを処理し、アセンブラ言語プログラム−3(626)を作成して出力する。   The post compiler (635) processes the input assembler language program-1 (624), assembler language program-2 (625), and symbol information file (644) to create an assembler language program-3 (626). Output.

ポストコンパイラ(635)によって作成され出力されたアセンブラ言語プログラム−3(626)は、アセンブラ(137)に入力され、アセンブラ(137)によって翻訳され、翻訳された結果オブジェクトプログラム(127)が生成され、これが出力される。   The assembler language program-3 (626) created and output by the post compiler (635) is input to the assembler (137), translated by the assembler (137), and a translated result object program (127) is generated. This is output.

このアセンブラ(137)が行う処理は、本発明の実施の形態1と同じである。   The processing performed by the assembler (137) is the same as that of the first embodiment of the present invention.

オブジェクトプログラム(127)は他のオブジェクトプログラム(128)と共にリンカ(138)に入力され、リンクが行われて実行プログラム(129)が生成出力される。この時、アセンブラ言語プログラム(654)がシンボル変数である_dml_var_eのアドレスを決定するために使用される。この処理が本発明の実施の形態1とは異なっている。   The object program (127) is input to the linker (138) together with the other object program (128), linked, and an execution program (129) is generated and output. At this time, the assembler language program (654) is used to determine the address of the symbol variable _dml_var_e. This process is different from the first embodiment of the present invention.

以降の処理は実施の形態1と同様であるから説明を省略する。   Since the subsequent processing is the same as that of the first embodiment, description thereof is omitted.

図6は、本発明に係るプログラム処理プログラムの、この実施の形態2であるプリコンパイラ(631)が処理する対象プログラムであるC言語ソースプログラム−1(621)の内容の一例と、このC言語ソースプログラム−1(621)がプリコンパイラ(631)に入力され、プリコンパイラ(631)によって処理され、プリコンパイラ(631)によって出力されるC言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)とC言語ソースプログラム(652)と、C言語ソースプログラム−1(621)がシンボル情報生成部(642)に入力され、シンボル情報生成部(642)によって処理され、その処理をした結果として出力されるシンボル情報ファイル(644)との、それぞれの内容の一例を示す図である。   FIG. 6 shows an example of the contents of a C language source program-1 (621) that is a target program to be processed by the precompiler (631) of the second embodiment of the program processing program according to the present invention, and the C language. Source program-1 (621) is input to the precompiler (631), processed by the precompiler (631), and output by the precompiler (631). C language source program-2 (622) and C language source program- 3 (623), the C language source program (652), and the C language source program-1 (621) are input to the symbol information generation unit (642) and processed by the symbol information generation unit (642). An example of the contents of the symbol information file (644) output as a result It is to figure.

更に図6は、本発明に係るプログラム処理プログラムのこの実施の形態2であるコンパイラ(633)が処理する対象プログラムであるC言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)とC言語ソースプログラム(652)との内容の一例でもあり、このC言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)とC言語ソースプログラム(652)とがコンパイラ(633)に入力され、コンパイラ(633)によって処理され、コンパイラ(633)によって出力されるアセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)とアセンブラ言語プログラム(654)との、それぞれの内容の一例をも示す図である。   Further, FIG. 6 shows C language source program-2 (622) and C language source program-3 (623) which are target programs processed by the compiler (633) which is the second embodiment of the program processing program according to the present invention. And C language source program (652), and this C language source program-2 (622), C language source program-3 (623), and C language source program (652) are compilers (633). The contents of assembler language program-1 (624), assembler language program-2 (625), and assembler language program (654) that are input to, processed by the compiler (633), and output by the compiler (633) It is a figure which also shows an example.

図6に示す例では、本発明に係るプログラム処理プログラムのこの実施の形態2の処理対象となる最初のプログラムは、C言語で記述されたC言語ソースプログラム−1(621)である。   In the example shown in FIG. 6, the first program to be processed in the second embodiment of the program processing program according to the present invention is C language source program-1 (621) described in C language.

図6に示すように、このC言語ソースプログラム−1(621)が、実施の形態1のC言語ソースプログラム(121)と異なるのは、他のC言語ソースプログラムにおいて外部変数として宣言されている変数に対する参照の宣言である「extern int var_e」と、この参照される外部変数「var_e」に値「40」を代入する文である「var_e=40」とを含むことである。   As shown in FIG. 6, this C language source program-1 (621) is different from the C language source program (121) of the first embodiment in that it is declared as an external variable in another C language source program. It includes “extern int var_e” that is a declaration of a reference to a variable, and “var_e = 40” that is a statement that assigns the value “40” to the referenced external variable “var_e”.

但し、ここで他のC言語ソースプログラムというのは、C言語ソースプログラム−1(621)以外のプログラムを指すばかりでなく、例えばC言語ソースプログラムをグループ分けし、この、C言語ソースプログラム−1(621)が属するグループ以外のグループに属するC言語ソースプログラムを指すものであっても構わない。このようにグループ分けされた1つのグループに属するC言語ソースプログラム群をモジュールということもある。   However, the other C language source program here refers not only to a program other than the C language source program-1 (621), but also, for example, grouped C language source programs, and this C language source program-1 It may be a C language source program belonging to a group other than the group to which (621) belongs. A group of C language source programs belonging to one group divided in this way may be referred to as a module.

図6に示すように、本発明に係るプログラム処理プログラムの実施の形態2であるプリコンパイラ(631)は、このC言語ソースプログラム−1(621)を入力として読み込み(図4のS401)、処理を行い、C言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)とC言語ソースプログラム(652)とを生成して出力する。   As shown in FIG. 6, the precompiler (631), which is the second embodiment of the program processing program according to the present invention, reads this C language source program-1 (621) as an input (S401 in FIG. 4) and performs processing. The C language source program-2 (622), the C language source program-3 (623), and the C language source program (652) are generated and output.

C言語ソースプログラム−2(622)は、C言語ソースプログラム−1(621)において、外部変数として宣言されていた「var_b」を、グローバル構造体のメンバーとして宣言し直すと同時に、他のC言語ソースプログラムにおいて外部変数として宣言されている変数「var_e」に対してアクセスする記述が含まれている時、その外部変数へのポインター変数_dml_var_eを新たに作成し、そのポインター変数を外部変数宣言すると共に、このグローバル構造体「_globals」のメンバーとして付加したものである。   The C language source program-2 (622) re-declares “var_b”, which has been declared as an external variable in the C language source program-1 (621), as a member of the global structure, and at the same time, When a description for accessing a variable “var_e” declared as an external variable in the source program is included, a pointer variable _dml_var_e to the external variable is newly created, and the pointer variable is declared as an external variable. , Added as a member of this global structure “_globals”.

同時にプリコンパイラ(631)は、このポインター変数_dml_var_eのための領域を確保するためのC言語プログラム(652)を生成し、出力する。   At the same time, the precompiler (631) generates and outputs a C language program (652) for securing an area for the pointer variable_dml_var_e.

そしてこの他のC言語ソースプログラムにおいて外部変数として宣言されている変数「var_e」に対してアクセスする記述を、グローバル構造体のメンバーであるその外部変数へのポインターを使った間接アクセスの記述「*(_globals_prt−>_dml_var_e)=40」に変更したものである。   Then, a description for accessing a variable “var_e” declared as an external variable in another C language source program is used as a description for indirect access using a pointer to the external variable that is a member of the global structure “*”. (_Globals_prt-> _ dml_var_e) = 40 ".

次に、C言語ソースプログラム−2(622)では、その処理を記述している関数(func1)の最初に、前記宣言したグローバル構造体(_globals)の先頭アドレスをレジスター「DP」に保持することを記述している。尚、このグローバル構造体の先頭アドレスを「DP」レジスターに保持することも一例であり、他のレジスターやメモリーであっても構わない。   Next, in the C language source program-2 (622), the start address of the declared global structure (_globals) is held in the register “DP” at the beginning of the function (func1) describing the process. Is described. It should be noted that holding the start address of this global structure in the “DP” register is also an example, and other registers and memories may be used.

更に、C言語ソースプログラム−2(622)では、C言語ソースプログラム−1(621)において外部変数であるvar_eにアクセスして値「40」を代入する記述である「var_e=40;」を、このグローバル構造体のメンバーであるポインター変数_dml_var_eを使用し、間接アクセスによって値「40」を代入する処理である「*(globals_ptr−>_dml_var_e)=40;」との記述に置き換えている。   Further, in the C language source program-2 (622), “var_e = 40;” which is a description for accessing the external variable var_e and substituting the value “40” in the C language source program-1 (621), The pointer variable _dml_var_e, which is a member of this global structure, is used and replaced with the description “* (globals_ptr −> _ dml_var_e) = 40;” which is a process of substituting the value “40” by indirect access.

C言語ソースプログラム−3(623)も、C言語ソースプログラム−2(622)とほとんど同じである。   The C language source program-3 (623) is almost the same as the C language source program-2 (622).

異なるのは、前記宣言したグローバル構造体(_globals)のメンバー宣言の最初に、「int _dummy;」との記述が追加されていることだけである(図4のS404)。   The only difference is that a description “int_dummy;” is added to the beginning of the member declaration of the declared global structure (_globals) (S404 in FIG. 4).

C言語ソースプログラム−3(623)では、C言語ソースプログラム−2(621)においてグローバル構造体(_globals)のメンバーとして宣言されている「int var_b;」と「int *_dml_var_e;」との記述は、前記追加されたグローバル構造体(_globals)のメンバー宣言である「int _dummy」の後に、続けて記述される。   In the C language source program-3 (623), the description of “int var_b;” and “int * _dml_var_e;” declared as members of the global structure (_globals) in the C language source program-2 (621) is , “Int_dummy”, which is a member declaration of the added global structure (_globals), is described subsequently.

C言語ソースプログラム−3(623)は、この部分においてのみC言語ソースプログラム−2(622)と異なっており、他の部分は全く同じである。   The C language source program-3 (623) is different from the C language source program-2 (622) only in this portion, and the other portions are exactly the same.

図6に示すように、このようにして生成されたC言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)とは、コンパイラ(633)によってコンパイルされ、それぞれアセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)とが変換生成される。   As shown in FIG. 6, the C language source program-2 (622) and the C language source program-3 (623) generated in this way are compiled by a compiler (633), and each of them is an assembler language program-1. (624) and assembler language program-2 (625) are converted and generated.

C言語ソースプログラム(652)もコンパイラによってコンパイルされ、アセンブラ言語プログラム(654)が変換生成される。   The C language source program (652) is also compiled by the compiler, and the assembler language program (654) is converted and generated.

2つのアセンブラ言語プログラム、アセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)とは共に、元のC言語ソースプログラム−1(621)で外部変数として宣言されている変数である「var_e」に対して、グローバル構造体のメンバーであるこの「_dml_var_e」を使用し、間接アクセスによって値「40」を代入する処理を記述している。   Two assembler language programs, assembler language program-1 (624) and assembler language program-2 (625), are variables declared as external variables in the original C language source program-1 (621). A process of substituting the value “40” by indirect access using “_dml_var_e” which is a member of the global structure is described for “var_e”.

その具体的な内容は次の通りである。   The specific contents are as follows.

アセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)との両方において、第1の命令である「mov 40,D0」は、値「40」をレジスターD0に格納することを表している。   In both assembler language program-1 (624) and assembler language program-2 (625), the first instruction “mov 40, D0” indicates that the value “40” is stored in the register D0. Yes.

第2の命令である「mov (4,DP),A0」と「mov (8,DP),A0」とは、レジスターDPの内容にそれぞれオフセットアドレスとして0又は4を加えたメモリーアドレス領域の内容を、レジスターA0に転送することを示している。   The second instructions "mov (4, DP), A0" and "mov (8, DP), A0" are the contents of the memory address area obtained by adding 0 or 4 as the offset address to the contents of the register DP, respectively. Is transferred to the register A0.

レジスターDPの内容にそれぞれオフセットアドレスとして0又は4を加えたメモリーアドレス領域とは、前記C言語ソースプログラム−2(622)とC言語ソースプログラム−3(623)とから解る通り、ポインター変数_dml_var_eの領域である。   The memory address area obtained by adding 0 or 4 as the offset address to the contents of the register DP, as understood from the C language source program-2 (622) and the C language source program-3 (623), is the pointer variable _dml_var_e. It is an area.

アセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)との両方における、第3の命令である「mov D0,(A0)」は、レジスターD0の内容を、レジスターA0を使った間接アクセスによってメモリー領域に格納することを示している。   The third instruction “mov D0, (A0)” in both assembler language program-1 (624) and assembler language program-2 (625) is the indirect using register A0. It indicates that data is stored in the memory area by access.

一方、このC言語ソースプログラム−1(621)はシンボル情報生成部(642)にも入力され、シンボル情報生成部(642)によって処理され、シンボル情報ファイル(644)が作成され出力される。このシンボル情報ファイル(644)の内容は、図6に示すように、C言語ソースプログラム−1(621)によって宣言されている外部変数の名称と、その外部変数のために使用される領域の相対アドレス(先頭からのオフセットアドレス)との対応を示すと共に、C言語ソースプログラム−1(621)が他のC言語ソースプログラムにおいて外部変数として宣言されている変数に対してアクセスする記述を含んでいる時には、そのアクセスに使用するポインター変数と、そのポインター変数のために使用される領域の相対アドレス(先頭からのオフセットアドレス)との対応をも示す表である。   On the other hand, the C language source program-1 (621) is also input to the symbol information generation unit (642), processed by the symbol information generation unit (642), and a symbol information file (644) is generated and output. As shown in FIG. 6, the contents of the symbol information file (644) include the name of the external variable declared by the C language source program-1 (621) and the relative area used for the external variable. In addition to showing the correspondence with the address (offset address from the beginning), the C language source program-1 (621) includes a description for accessing a variable declared as an external variable in another C language source program. The table sometimes shows the correspondence between the pointer variable used for the access and the relative address (offset address from the head) of the area used for the pointer variable.

図7に示すように、コンパイラ(633)が生成出力した2つのアセンブラ言語プログラムであるアセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)と、シンボル情報生成部(642)が生成出力したシンボル情報ファイル(644)とは、共にポストコンパイラ(635)に入力され、ポストコンパイラ(635)によって行われる処理の対象とされる。   As shown in FIG. 7, the assembler language program-1 (624), the assembler language program-2 (625), and the symbol information generation unit (642), which are two assembler language programs generated and output by the compiler (633), are generated. Both the output symbol information file (644) is input to the post compiler (635) and subjected to processing performed by the post compiler (635).

そしてポストコンパイラ(635)によって処理された結果、アセンブラ言語プログラム−3(626)が生成され、出力される。   As a result of processing by the post compiler (635), an assembler language program-3 (626) is generated and output.

この状態と、ポストコンパイラ(635)に入力されるプログラムと、ポストコンパイラ(635)から出力されるプログラムの例を、図7に示す。   FIG. 7 shows an example of this state, a program input to the post compiler (635), and a program output from the post compiler (635).

図7に示す通り、又上記の説明から解る通り、ポストコンパイラ(635)に入力されるのは、コンパイラ(633)が生成出力した2つのアセンブラ言語プログラムであるアセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)と、シンボル情報生成部(642)が生成出力したシンボル情報ファイル(644)とである。   As shown in FIG. 7 and as can be understood from the above description, the post-compiler (635) is inputted with two assembler language programs generated and output by the compiler (633), that is, an assembler language program-1 (624). The assembler language program-2 (625) and the symbol information file (644) generated and output by the symbol information generation unit (642).

従って、これら2つのアセンブラ言語プログラムとシンボル情報ファイル(644)とは、図6に示すものとその内容が同一である。   Accordingly, the contents of these two assembler language programs and the symbol information file (644) are the same as those shown in FIG.

ポストコンパイラ(635)はまず、これら2つのアセンブラ言語プログラムを入力し、その差分、即ち異なる部分を検出する(図4のS407)。   The post compiler (635) first inputs these two assembler language programs and detects the difference, that is, a different portion (S407 in FIG. 4).

図7に示す例では、アセンブラ言語プログラム−1(624)とアセンブラ言語プログラム−2(625)との、第2の命令である、「mov (4,DP),A0」と「mov (8,DP),A0」との、レジスターDPに対するオフセットアドレスだけが異なっている。   In the example shown in FIG. 7, the second instructions “mov (4, DP), A0” and “mov (8, 8) of assembler language program-1 (624) and assembler language program-2 (625) are used. DP), A0 ", only the offset address for the register DP is different.

次に、この差分を検出したポストコンパイラ(635)は、この異なる部分、即ちアセンブラ言語プログラム−1(624)の第2の命令である、「mov (4,DP),A0」のレジスターDPに対するオフセットアドレス「4」を、シンボル情報ファイル(644)で検索し、この「4」に対応する外部変数の名称「_dml_var_e」を検出する。   Next, the post-compiler (635) that has detected this difference performs processing on this different part, that is, the register DP of “mov (4, DP), A0”, which is the second instruction of the assembler language program-1 (624). The offset address “4” is searched in the symbol information file (644), and the name “_dml_var_e” of the external variable corresponding to this “4” is detected.

そしてこの異なる部分であるアセンブラ言語プログラム−1(624)の第2の命令の「mov (4,DP),A0」のレジスターDPに対するオフセットアドレス「4」を、この外部変数の名称である「_dml_var_e」に置き換えた命令、即ち「mov (_dml_var_e,DP),A0」を生成出力する(図4のS408)。   The offset address “4” with respect to the register DP of “mov (4, DP), A0” of the second instruction of the assembler language program-1 (624), which is this different part, is used as the name of this external variable “_dml_var_e”. ", That is," mov (_dml_var_e, DP), A0 "is generated and output (S408 in FIG. 4).

尚、2つのアセンブラ言語プログラムの同一部分は、そのまま出力する。   The same part of the two assembler language programs is output as it is.

このようにして、ポストコンパイラ635は、アセンブラ言語プログラム−3(626)を生成し、出力する。   In this way, the post compiler 635 generates and outputs an assembler language program-3 (626).

ポストコンパイラ(635)によって作成され出力されたアセンブラ言語プログラム−3(626)は、アセンブラ(137)に入力され、アセンブラ(137)によって翻訳され、翻訳された結果オブジェクトプログラム(127)が生成され、これが出力される。   The assembler language program-3 (626) created and output by the post compiler (635) is input to the assembler (137), translated by the assembler (137), and a translated result object program (127) is generated. This is output.

このアセンブラ(137)が行う処理は、本発明の実施の形態1と同じである。   The processing performed by the assembler (137) is the same as that of the first embodiment of the present invention.

オブジェクトプログラム(127)は他のオブジェクトプログラム(128)と共にリンカ(138)に入力され、リンクが行われて実行プログラム(129)が生成出力される。この時、アセンブラ言語プログラム(654)がシンボル変数である_dml_var_eのアドレスを決定するために使用される。この処理が本発明の実施の形態1とは異なっている。   The object program (127) is input to the linker (138) together with the other object program (128), linked, and an execution program (129) is generated and output. At this time, the assembler language program (654) is used to determine the address of the symbol variable _dml_var_e. This process is different from the first embodiment of the present invention.

以降の処理は実施の形態1と同様であるから説明を省略する。   Since the subsequent processing is the same as that of the first embodiment, description thereof is omitted.

本発明は、情報処理機器だけに限ることなく、例えば家庭用電気機器や事務用電気機器等においても、コンパイラの変更を行うことなく、現在使われているコンパイラをそのまま使いながら、尚且つ効率的な動的プログラムモジュールを生成することに利用可能である。   The present invention is not limited only to information processing equipment, and for example, even in home electrical equipment and office electrical equipment, without changing the compiler, while still using the currently used compiler as it is, and efficiently It can be used to generate dynamic program modules.

本発明に係るプログラム処理プログラムの実施の形態1であるプログラムとこれらが処理する対象プログラムとの構成を示す図The figure which shows the structure of the program which is Embodiment 1 of the program processing program which concerns on this invention, and the object program which these process 本発明に係るプログラム処理プログラムの実施の形態1であるプリコンパイラが出力するプログラムの例を示す図The figure which shows the example of the program which the precompiler which is Embodiment 1 of the program processing program which concerns on this invention outputs 本発明に係るプログラム処理プログラムの実施の形態1であるポストコンパイラが出力するプログラムの例を示す図The figure which shows the example of the program which the post compiler which is Embodiment 1 of the program processing program which concerns on this invention outputs 本発明に係るプログラム処理プログラムの実施の形態1であるプログラムが行う主な処理を時系列に従って示す図The figure which shows the main processes which the program which is Embodiment 1 of the program processing program which concerns on this invention performs according to a time series 本発明に係るプログラム処理プログラムの実施の形態1であるプログラムが実行されるコンピュータ環境の主な構成を示す図The figure which shows the main structures of the computer environment in which the program which is Embodiment 1 of the program processing program which concerns on this invention is performed 本発明に係るプログラム処理プログラムの実施の形態2であるプリコンパイラが出力するプログラムの例を示す図The figure which shows the example of the program which the precompiler which is Embodiment 2 of the program processing program which concerns on this invention outputs 本発明に係るプログラム処理プログラムの実施の形態2であるポストコンパイラが出力するプログラムの例を示す図The figure which shows the example of the program which the post-compiler which is Embodiment 2 of the program processing program which concerns on this invention outputs

符号の説明Explanation of symbols

121,621 C言語ソースプログラム−1
122,622 C言語ソースプログラム−2
123,623 C言語ソースプログラム−3
124,624 アセンブラ言語プログラム−1
125,625 アセンブラ言語プログラム−2
126,626 アセンブラ言語プログラム−3
127 オブジェクトプログラム
128 他のオブジェクトプログラム
129 実行プログラム
131,631 プリコンパイラ
133,633 コンパイラ
135,635 ポストコンパイラ
137 アセンブラ
138 リンカ
142,642 シンボル情報生成部
144,644 シンボル情報ファイル
501 CPU
502 主記憶装置
503 補助記憶装置
504 入力装置
505 表示装置
506 通信装置
507 バス
121,621 C source program-1
122,622 C language source program-2
123,623 C source program-3
124,624 Assembler language program-1
125,625 Assembler language program-2
126,626 Assembler language program-3
127 Object program 128 Other object program 129 Execution program 131,631 Precompiler 133,633 Compiler 135,635 Post compiler 137 Assembler 138 Linker 142,642 Symbol information generation unit 144,644 Symbol information file 501 CPU
502 Main storage device 503 Auxiliary storage device 504 Input device 505 Display device 506 Communication device 507 Bus

Claims (10)

変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するステップを有するコンピュータプログラムであって、
前記シンボルで宣言された変数に相対アドレスを設定する第1のステップと、
前記シンボルで宣言された変数に対してアクセスするステップを前記第1のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第2のステップと、
前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第3のステップと、
前記追加された変数を含めて前記シンボルで宣言された変数に相対アドレスを設定する第4のステップと、
前記シンボルで宣言された変数に対してアクセスするステップを前記第4のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第5のステップと、
前記第2のステップと前記第5のステップとで変換されたアクセスするステップの相対アドレスが異なる前記アクセスするステップを検出する第6のステップと、
前記第6のステップで検出した相対アドレスが異なるアクセスするステップを前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップに変換する第7のステップと、
を有する、
プログラム処理プログラム。
A computer program comprising the steps of processing a computer program comprising: declaring a variable with a symbol; and accessing the variable declared with the symbol,
A first step of setting a relative address for a variable declared with the symbol;
A second step of converting the variable declared in the symbol to the step of accessing the variable declared in the symbol by the relative address set in the first step;
A third step of adding another variable declared in the symbol before the variable declared in the symbol;
A fourth step of setting a relative address for variables declared in the symbol including the added variable;
A fifth step of converting the step of accessing the variable declared in the symbol to the step of accessing the variable declared in the symbol by the relative address set in the fourth step;
A sixth step of detecting the accessing step in which the relative address of the accessing step converted in the second step and the fifth step is different;
A seventh step of converting the step of accessing different relative addresses detected in the sixth step into a step of accessing by a symbol declaring the variable to be accessed;
Having
Program processing program.
変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するステップを有するコンピュータプログラムであって、
前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第1のステップと、
前記追加された変数を含めずに前記シンボルで宣言された変数に対してアクセスするステップが前記宣言された変数の相対アドレスでアクセスするステップに変換された時の第1の相対値と前記追加された変数を含めて前記シンボルで宣言された変数に対してアクセスするステップが前記宣言された変数の相対アドレスでアクセスするステップに変換された時の第2の相対値との比較を行う第2のステップと、
前記比較された第1の相対値と第2の相対値とが異なる前記シンボルで宣言された変数にアクセスするステップを前記シンボルで宣言された変数に対してシンボルでアクセスするステップに変換する第3のステップと、
を有する、
プログラム処理プログラム。
A computer program comprising the steps of processing a computer program comprising: declaring a variable with a symbol; and accessing the variable declared with the symbol,
A first step of adding another variable declared in a symbol before a variable declared in the symbol;
The step of accessing the variable declared by the symbol without including the added variable is converted to the step of accessing by the relative address of the declared variable, and the first relative value is added. A step of accessing a variable declared by the symbol including a variable is compared with a second relative value when the step of accessing a variable addressed by the relative address of the declared variable is compared with a second relative value Steps,
A step of accessing a variable declared by the symbol having a different first relative value and a second relative value compared to a step of accessing the variable declared by the symbol by a symbol; And the steps
Having
Program processing program.
前記相対アドレスによって前記シンボルで宣言された変数にアクセスするステップは、相対アドレスと間接アドレス指定とによって前記シンボルで宣言された変数にアクセスするステップである、
請求項1に記載のプログラム処理プログラム。
Accessing a variable declared in the symbol by the relative address is accessing a variable declared in the symbol by a relative address and indirect addressing;
The program processing program according to claim 1.
前記シンボルで宣言された変数に対してシンボルでアクセスするステップは、相対アドレスと間接アドレス指定とによって前記シンボルで宣言された変数に対してアクセスするステップである、
請求項2に記載のプログラム処理プログラム。
The step of accessing the variable declared by the symbol by the symbol is a step of accessing the variable declared by the symbol by relative address and indirect addressing.
The program processing program according to claim 2.
前記間接アドレス指定のためのアドレス変数領域を設定するステップを有する、
請求項3又は請求項4に記載のプログラム処理プログラム。
Setting an address variable area for the indirect addressing,
The program processing program according to claim 3 or 4.
前記変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対して処理を行うステップとを含むプログラムは、
C言語、またはC++言語、またはJAVA(登録商標)言語、またはFORTRAN言語、またはCOBOL言語、またはBASIC言語、またはAPL言語、またはPL/1言語、またはLISP言語、またはProlog言語、またはこれら以外のコンパイラ言語、またはこれら以外のインタープリタ言語、またはアセンブラ言語、のいずれか1つまたは複数で記述されたプログラムである請求項1から請求項5の何れか1項に記載のプログラム処理プログラム。
A program including the step of declaring the variable with a symbol and the step of processing the variable declared with the symbol,
C language, or C ++ language, JAVA (registered trademark) language, FORTRAN language, COBOL language, BASIC language, BASIC language, APL language, PL / 1 language, LISP language, Prolog language, or other compiler The program processing program according to any one of claims 1 to 5, wherein the program is a program described in any one or a plurality of languages, an interpreted language other than these, or an assembler language.
前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップは、
コンパイラ言語、またはインタープリタ言語、またはアセンブラ言語、または機械語、または中間言語、のいずれか1つまたは複数で記述されたステップである請求項1から請求項6の何れか1項に記載のプログラム処理プログラム。
The step of accessing by a symbol declaring the variable to be accessed is as follows:
The program processing according to any one of claims 1 to 6, which is a step described in one or more of a compiler language, an interpreter language, an assembler language, a machine language, and an intermediate language. program.
コンピュータ読み取り可能な記録媒体であって、
請求項1から請求項7の何れか1項に記載のプログラム処理プログラムを記録した記録媒体。
A computer-readable recording medium,
The recording medium which recorded the program processing program of any one of Claims 1-7.
変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するプログラム処理装置であって、
前記シンボルで宣言された変数に相対アドレスを設定する第1の手段と、
前記シンボルで宣言された変数に対してアクセスするステップを前記第1のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第2の手段と、
前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第3の手段と、
前記追加された変数を含めて前記シンボルで宣言された変数に相対アドレスを設定する第4の手段と、
前記シンボルで宣言された変数に対してアクセスするステップを前記第4のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第5の手段と、
前記第2のステップと前記第5のステップとで変換されたアクセスするステップの相対アドレスが異なる前記アクセスするステップを検出する第6の手段と、
前記第6のステップで検出した相対アドレスが異なるアクセスするステップを前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップに変換する第7の手段と、
を有する、
プログラム処理装置。
A program processing apparatus for processing a computer program comprising the steps of declaring a variable with a symbol and accessing the variable declared with the symbol,
First means for setting a relative address for a variable declared with the symbol;
A second means for converting the step of accessing the variable declared in the symbol to the step of accessing the variable declared in the symbol by the relative address set in the first step;
A third means for adding another variable declared in the symbol before the variable declared in the symbol;
A fourth means for setting a relative address for variables declared by the symbol including the added variable;
A fifth means for converting the step of accessing the variable declared in the symbol to the step of accessing the variable declared in the symbol by the relative address set in the fourth step;
A sixth means for detecting the accessing step in which the relative address of the accessing step converted in the second step and the fifth step is different;
A seventh means for converting an access step having a different relative address detected in the sixth step into an access step by a symbol declaring a variable to be accessed;
Having
Program processing device.
変数をシンボルで宣言するステップと前記シンボルで宣言された変数に対してアクセスするステップとを含むコンピュータプログラムを処理するプログラム処理方法であって、
前記シンボルで宣言された変数に相対アドレスを設定する第1の工程と、
前記シンボルで宣言された変数に対してアクセスするステップを前記第1のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第2の工程と、
前記シンボルで宣言された変数の前にシンボルで宣言された別の変数を追加する第3の工程と、
前記追加された変数を含めて前記シンボルで宣言された変数に相対アドレスを設定する第4の工程と、
前記シンボルで宣言された変数に対してアクセスするステップを前記第4のステップで設定された相対アドレスによって前記シンボルで宣言された変数にアクセスするステップに変換する第5の工程と、
前記第2のステップと前記第5のステップとで変換されたアクセスするステップの相対アドレスが異なる前記アクセスするステップを検出する第6の工程と、
前記第6のステップで検出した相対アドレスが異なるアクセスするステップを前記アクセスする対象である変数を宣言しているシンボルによってアクセスするステップに変換する第7の工程と、
を有する、
プログラム処理方法。
A program processing method for processing a computer program comprising the steps of declaring a variable with a symbol and accessing the variable declared with the symbol,
A first step of setting a relative address for a variable declared with the symbol;
A second step of converting the step of accessing the variable declared in the symbol to the step of accessing the variable declared in the symbol by the relative address set in the first step;
A third step of adding another variable declared in the symbol before the variable declared in the symbol;
A fourth step of setting a relative address for variables declared by the symbol including the added variable;
A fifth step of converting the step of accessing the variable declared in the symbol to the step of accessing the variable declared in the symbol by the relative address set in the fourth step;
A sixth step of detecting the accessing step in which the relative address of the accessing step converted in the second step and the fifth step is different;
A seventh step of converting the step of accessing different relative addresses detected in the sixth step to the step of accessing by a symbol declaring the variable to be accessed;
Having
Program processing method.
JP2004001651A 2004-01-07 2004-01-07 Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method Withdrawn JP2005196436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004001651A JP2005196436A (en) 2004-01-07 2004-01-07 Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004001651A JP2005196436A (en) 2004-01-07 2004-01-07 Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method

Publications (1)

Publication Number Publication Date
JP2005196436A true JP2005196436A (en) 2005-07-21

Family

ID=34817107

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004001651A Withdrawn JP2005196436A (en) 2004-01-07 2004-01-07 Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method

Country Status (1)

Country Link
JP (1) JP2005196436A (en)

Similar Documents

Publication Publication Date Title
US7793272B2 (en) Method and apparatus for combined execution of native code and target code during program code conversion
US8341614B2 (en) Memory management for closures
US9495136B2 (en) Using aliasing information for dynamic binary optimization
US20120159444A1 (en) Fusing debug information from different compiler stages
US9235433B2 (en) Speculative object representation
US20120198427A1 (en) Ensuring Register Availability for Dynamic Binary Optimization
US8997066B2 (en) Emulating pointers
US8677322B2 (en) Debugging in a multiple address space environment
JP2006092544A (en) Dynamic link of module in pre-operating system environment
US20190108006A1 (en) Code coverage generation in gpu by using host-device coordination
US20040003377A1 (en) Converting byte code instructions to a new instruction set
US20120159463A1 (en) Method and system for creating, applying, and removing a software fix
US8539458B2 (en) Transforming addressing alignment during code generation
EP3065051A1 (en) Flow control for language-embedded programming in general-purpose computing on graphics processing units
EP1889158B1 (en) Method and apparatus for combined execution of native code and target code during program code conversion
JP2005196436A (en) Program-processing program, recording medium to which program-processing program is recorded, program-processing device, and program-processing method
JP5813600B2 (en) Application development device and application development tool
JP3682050B2 (en) Embedded software development equipment
Plumbridge et al. Translating Java for resource constrained embedded systems
JP2002108625A (en) Language processor and recording medium in which language processing program is stored
JP3915208B2 (en) Compilation device
Krause et al. C for a tiny system
KR20050039235A (en) Method for generating assembly code through complier using a fixed base register
JP5771926B2 (en) Compiling apparatus and method
JPH0196741A (en) Common section system in debugger

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061207

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070112

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090603