COMPILING METHOD, CODE GENERATION METHOD, STACK REGISTER USING METHOD, COMPILER, PROGRAM FOR REALIZING THEM, AND STORAGE MEDIUM
摘要
PROBLEM TO BE SOLVED: To suppress the occurrence of a stack overflow or a stack underflow to prevent the execution performance of a program from being degraded by them in program code generation for a processor which has an architecture using a register stack. SOLUTION: A compiler 10 is provided with a register allocator 11 which allocates registers to instructions in a program as the compilation object and a code generator 12 which generates object codes on the basis of the result of register allocation by the register allocator 11. The register allocator 11 allocates logical registers to instruction in the program as the compilation object and allocates the logical registers allocated to instructions in the program to physical registers so that physical registers existing at the time of calling procedures in the program as the compilation object may be allocated in order from the bottom of the register stack.