deep

a Cross Development Platform for Java

User Tools

Site Tools


dev:crosscompiler:backend_arm:code_generator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:crosscompiler:backend_arm:code_generator [2019/07/09 14:26] – [Compiler Specific Subroutines] ursgrafdev:crosscompiler:backend_arm:code_generator [2019/07/11 19:40] – [Compiler Specific Subroutines] ursgraf
Line 53: Line 53:
  
 ===== Compiler Specific Subroutines ===== ===== Compiler Specific Subroutines =====
-Subroutines are methods for which there is no Java code (and hence no Bytecode or SSA) but only machine code. This is useful for the delegation of interface methods (see [[.:..:interfaces|Interfaces]]) or for dividing longs. \\+Subroutines are methods for which there is no Java code (and hence no Bytecode or SSA) but only machine code. This is useful for the delegation of interface methods (see [[.:..:interfaces|Interfaces]]) or for exception handling. \\
 Such methods are listed in //Method.compSpecSubroutines// and the code generator issues code (if subroutines are used). These subroutines must be linked as well. Such methods are listed in //Method.compSpecSubroutines// and the code generator issues code (if subroutines are used). These subroutines must be linked as well.
-Currently, there are three types of compiler specific methods+Currently, there are two types of compiler specific methods
   * Delegation of interface methods: address of this method inserted into the type descriptor by the linker   * Delegation of interface methods: address of this method inserted into the type descriptor by the linker
   * Exception handling: call to this methods inserted by the code generator   * Exception handling: call to this methods inserted by the code generator
 +
 +==== Practical Implementation of Searching the Correct Interface Method ====
 +imDelegIiMm needs 3 auxiliary registers. At compile time we cannot reserve such auxiliary registers as these registers must always be the same. Therefore, we use a special chunk of memory on the stack. This storage is only necessary and allocated for methods invoking interface methods. At the start of the delegate method three volatile registers which might contain parameters are saved onto the stack and reloaded at the end of the delegate method.
dev/crosscompiler/backend_arm/code_generator.txt · Last modified: 2022/12/20 11:34 by ursgraf