diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-02-02 00:16:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-02-02 00:16:43 +0000 |
commit | 38f08ec0bd9bd39c578c2e9283a9aa00dc6bda15 (patch) | |
tree | 13c1ddb95c4048060b536abd200b8e24d0b2d066 /libgo/runtime/runtime.h | |
parent | 2e30f1ee86b087497fb5178a23a09ea6e22b1af4 (diff) | |
download | gcc-38f08ec0bd9bd39c578c2e9283a9aa00dc6bda15.zip gcc-38f08ec0bd9bd39c578c2e9283a9aa00dc6bda15.tar.gz gcc-38f08ec0bd9bd39c578c2e9283a9aa00dc6bda15.tar.bz2 |
runtime: scan register backing store on ia64
On ia64, a separate stack is used for saving/restoring register frames,
occupying the other end of the stack mapping. This must also be scanned
for pointers into the heap.
Reviewed-on: https://go-review.googlesource.com/85276
From-SVN: r257323
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r-- | libgo/runtime/runtime.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h index 28d550d..0fafe82 100644 --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -437,6 +437,23 @@ void runtime_check(void) // the stacks are allocated by the splitstack library. extern uintptr runtime_stacks_sys; +/* + * ia64's register file is spilled to a separate stack, the register backing + * store, on window overflow, and must also be scanned. This occupies the other + * end of the normal stack allocation, growing upwards. + * We also need to ensure all register windows are flushed to the backing + * store, as unlike SPARC, __builtin_unwind_init doesn't do this on ia64. + */ +#ifdef __ia64__ +# define secondary_stack_pointer() __builtin_ia64_bsp() +# define initial_secondary_stack_pointer(stack_alloc) (stack_alloc) +# define flush_registers_to_secondary_stack() __builtin_ia64_flushrs() +#else +# define secondary_stack_pointer() nil +# define initial_secondary_stack_pointer(stack_alloc) nil +# define flush_registers_to_secondary_stack() +#endif + struct backtrace_state; extern struct backtrace_state *__go_get_backtrace_state(void); extern _Bool __go_file_line(uintptr, int, String*, String*, intgo *); |