Save registers in gc_alloc() and pass them to gc_safepoint() so the
latter can scan them for references. Also save the registers in signal
handler and pass them to gc_safepoint(). We need to use pre-allocated
thread-local memory because we can't use the stack or malloc() in the
signal handler.
Cc:
Add save_registers() and save_signal_registers() to x86-64 as well.
Cc: Eduard - Gabriel Munteanu
Cc: Tomek Grabiec
Cc: Vegard Nossum
Signed-off-by: Pekka Enberg
---
arch/x86/include/arch/registers_64.h | 75 +++---
1 files changed, 69 insertions(+), 6 deletions(
This patch introduces a save_registers() function that can be used to
take a snapshot of general purpose registers. This is needed in the
gc_alloc() function to save registers in case we need to enter a
safepoint and need to scan them for references.
We also need a save_signal_registers() function