24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
|
Based on some Q&A:
|
||
|
|
||
|
|
||
|
Global Register Allocation: This is about placing in registers values
|
||
|
that are used a lot in performance-critical code: local variables and
|
||
|
method arguments if possible will be placed in the callee-saved
|
||
|
registers that are returned by th arch-specific code in the function:
|
||
|
mono_arch_get_global_int_regs().
|
||
|
|
||
|
|
||
|
Stack Unwinding: is the process that happens during exception
|
||
|
handling: when an exception is thrown in a called method and caught in
|
||
|
a caller method, me need to put the processor registers in the state
|
||
|
they were in the caller, at the point where the catch handler can run.
|
||
|
|
||
|
This happens in the mono_handle_exception_internal() and
|
||
|
mono_arch_find_jit_info(): see the other architectures implementations
|
||
|
for ideas: they basically need to know how big was the stack allocated
|
||
|
in each call frame and they need to restore the callee-save registers
|
||
|
that were saved in the stack in the prolog in the called functions (
|
||
|
during stack unwindong the epilog of a method is not executed and the
|
||
|
register restoration needs to be done manually in the above
|
||
|
functions).
|