mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Add some TODOs to the saveregs and restoreregs macros.
When unwinding the stack using the internal unwinder we may need to restore floating point registers clobbered by C calls. Since I'm not sure yet I'm going to be conservative and save/restore them for now. Most probably we want to, at the very least, avoid restoring them when cleanly exiting the interpreter.
This commit is contained in:
parent
908528d801
commit
d475b5b93e
@ -104,6 +104,7 @@
|
|||||||
| stmg r6, r15, SAVE_GPRS_P
|
| stmg r6, r15, SAVE_GPRS_P
|
||||||
| lay sp, -CFRAME_SPACE(sp) // Allocate stack frame.
|
| lay sp, -CFRAME_SPACE(sp) // Allocate stack frame.
|
||||||
| // TODO: save backchain?
|
| // TODO: save backchain?
|
||||||
|
| // TODO: is it necessary to save all float registers?
|
||||||
| std f8, SAVE_FPR8 // f8-f15 are callee-saved.
|
| std f8, SAVE_FPR8 // f8-f15 are callee-saved.
|
||||||
| std f9, SAVE_FPR9
|
| std f9, SAVE_FPR9
|
||||||
| std f10, SAVE_FPR10
|
| std f10, SAVE_FPR10
|
||||||
@ -115,6 +116,7 @@
|
|||||||
|.endmacro
|
|.endmacro
|
||||||
|
|
|
|
||||||
|.macro restoreregs
|
|.macro restoreregs
|
||||||
|
| // TODO: restore float registers only when unwinding?
|
||||||
| ld f8, SAVE_FPR8 // f8-f15 are callee-saved.
|
| ld f8, SAVE_FPR8 // f8-f15 are callee-saved.
|
||||||
| ld f9, SAVE_FPR9
|
| ld f9, SAVE_FPR9
|
||||||
| ld f10, SAVE_FPR10
|
| ld f10, SAVE_FPR10
|
||||||
|
Loading…
Reference in New Issue
Block a user