This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
dev:crosscompiler:backend_ppc:code_generator [2018/11/06 11:12] – [Accessing the Hardware] ursgraf | dev:crosscompiler:backend_ppc:code_generator [2019/07/09 14:38] – [Compiler Specific Subroutines] ursgraf | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Stackframe ===== | ===== Stackframe ===== | ||
We use a stack pointer (R1) but no frame pointer. | We use a stack pointer (R1) but no frame pointer. | ||
- | [{{ .:stackframe.png? | + | [{{ .:stackframeppc.png? |
Explanation: | Explanation: | ||
Line 48: | Line 48: | ||
* 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 ==== | ||
+ | // | ||
+ | R10 holds the necessary information for the delegate method. The first two bytes are the ID of the sought-after interface, tho last to bytes contain the method offset. Loading of R10 should happen after parameter copying as R10 might be used there. | ||
+ | |||
+ |