This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:crosscompiler:backend_arm:code_generator [2019/11/17 18:19] – [Fixup] ursgraf | dev:crosscompiler:backend_arm:code_generator [2022/12/20 11:34] (current) – [Accessing the Hardware] ursgraf | ||
---|---|---|---|
Line 16: | Line 16: | ||
\\ | \\ | ||
===== Exception Stackframe ===== | ===== Exception Stackframe ===== | ||
- | In case of an exception all volatile GPRs together with LR must be saved. | + | In case of an exception all volatile GPRs together with LR must be saved. |
- | EXTR's need no saving, as they are not allowed to be used in exceptions. If an exception method calls a method where EXTR are used (e.g. in an interrupt handler or in a decrementer | + | EXTR's need no saving, as they are not allowed to be used in exceptions. If an exception method calls a method where EXTR are used (e.g. in an interrupt handler or in a timer subclass) you have to use '' |
[{{ : | [{{ : | ||
+ | |||
+ | For efficiency, the exception stack frame does not contain space for locals. Hence, you are not allowed to use so many locals that this becomes necessary. This will be checked for when compiling exception methods. Storage for interface methods as well as the area for parameter passing are not necessary as well. | ||
+ | |||
Optimization: | Optimization: | ||
Line 36: | Line 39: | ||
* Addresses of class variables | * Addresses of class variables | ||
* Addresses of constants (floats, strings, type descriptors) | * Addresses of constants (floats, strings, type descriptors) | ||
- | Such addresses must be loaded with the aid of an auxiliary registers. After linking these addresses are known and must be corrected in the code. For this purpose a table called //fixups// is maintained. It contains all references to the objects, which were created by the class file reader and whose final addresses must be inserted into the code. In order to know at what position in the machine code array a certain correction has to be made, the next position is stored in the instruction //addi// as an immediate operand beginning with the last position (// | + | Such addresses must be loaded with the aid of an auxiliary registers. After linking these addresses are known and must be corrected in the code. For this purpose a table called //fixups// is maintained. It contains all references to the objects, which were created by the class file reader and whose final addresses must be inserted into the code. In order to know at what position in the machine code array a certain correction has to be made, the next position is stored in the instruction //movw// as an immediate operand beginning with the last position (// |
===== Accessing the Hardware ===== | ===== Accessing the Hardware ===== | ||
- | Java does not allow direct access and manipulation of absolute memory locations. Nevertheless this is essential for embedded programming. We therefore include this possibility by using a special class //ch.ntb.inf.deep.unsafe.arm.US.java// | + | Java does not allow direct access and manipulation of absolute memory locations. Nevertheless this is essential for embedded programming. We therefore include this possibility by using a special class //org.deepjava.unsafe.arm.US.java// |
===== Low Level Classes ===== | ===== Low Level Classes ===== |