From d475b5b93e30562abce91a7a3405356eb3ee6f74 Mon Sep 17 00:00:00 2001 From: Michael Munday Date: Wed, 18 Jan 2017 15:43:24 -0500 Subject: [PATCH] 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. --- src/vm_s390x.dasc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vm_s390x.dasc b/src/vm_s390x.dasc index d1cf9524..637a174b 100644 --- a/src/vm_s390x.dasc +++ b/src/vm_s390x.dasc @@ -104,6 +104,7 @@ | stmg r6, r15, SAVE_GPRS_P | lay sp, -CFRAME_SPACE(sp) // Allocate stack frame. | // TODO: save backchain? +| // TODO: is it necessary to save all float registers? | std f8, SAVE_FPR8 // f8-f15 are callee-saved. | std f9, SAVE_FPR9 | std f10, SAVE_FPR10 @@ -115,6 +116,7 @@ |.endmacro | |.macro restoreregs +| // TODO: restore float registers only when unwinding? | ld f8, SAVE_FPR8 // f8-f15 are callee-saved. | ld f9, SAVE_FPR9 | ld f10, SAVE_FPR10