This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:crosscompiler:backend_arm:code_generator [2019/11/15 16:33] – [Stackframe] ursgraf | dev:crosscompiler:backend_arm:code_generator [2019/11/17 18:18] – [Method Call] ursgraf | ||
---|---|---|---|
Line 12: | Line 12: | ||
The field //local variables// is only used if the number of registers does not suffice and locals must be assigned a slot on the stack. Variables of type //long// or //double// occupy two slots. \\ | The field //local variables// is only used if the number of registers does not suffice and locals must be assigned a slot on the stack. Variables of type //long// or //double// occupy two slots. \\ | ||
When calling interface methods some temporary space on the stack might be necessary (see below). \\ | When calling interface methods some temporary space on the stack might be necessary (see below). \\ | ||
- | The field // | + | The field // |
The stack pointer always points to the top of the actual frame. At the top the stack pointer of the caller has to be stored. The back chain pointer is used for the debugger, for exceptions and for the garbage collection. | The stack pointer always points to the top of the actual frame. At the top the stack pointer of the caller has to be stored. The back chain pointer is used for the debugger, for exceptions and for the garbage collection. | ||
\\ | \\ | ||
===== Exception Stackframe ===== | ===== Exception Stackframe ===== | ||
- | In case of an exception | + | In case of an exception |
- | FPR's need no saving, as they are normally | + | 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 subclass) you have to use '' |
- | [{{ .:exceptionstackframe.png?250&direct | //Stack frame for exception method//}}] | + | [{{ :dev: |
- | Optimization: | + | Optimization: |
===== Method Call ===== | ===== Method Call ===== | ||
==== Parameter Passing ==== | ==== Parameter Passing ==== | ||
- | All parameters must be copied in the appropriate registers, see [[.: | + | All parameters must be copied in the appropriate registers, see [[.: |
==== Return Value ==== | ==== Return Value ==== |