diff options
author | Ian Lance Taylor <iant@google.com> | 2016-11-22 17:58:04 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-11-22 17:58:04 +0000 |
commit | 9d1e3afb5484c71eaaea23fc3a4b86fe35418d43 (patch) | |
tree | 2110ef75ee2708c685482ea2ace4dfbf1461d4aa /gcc/go/go-gcc.cc | |
parent | 6c7509bc070b29293ca9874518b89227ce05361c (diff) | |
download | gcc-9d1e3afb5484c71eaaea23fc3a4b86fe35418d43.zip gcc-9d1e3afb5484c71eaaea23fc3a4b86fe35418d43.tar.gz gcc-9d1e3afb5484c71eaaea23fc3a4b86fe35418d43.tar.bz2 |
runtime: rewrite panic/defer code from C to Go
The actual stack unwind code is still in C, but the rest of the code,
notably all the memory allocation, is now in Go. The names are changed
to the names used in the Go 1.7 runtime, but the code is necessarily
somewhat different.
The __go_makefunc_can_recover function is dropped, as the uses of it
were removed in https://golang.org/cl/198770044.
Reviewed-on: https://go-review.googlesource.com/33414
From-SVN: r242715
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r-- | gcc/go/go-gcc.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 44daaa0..619499e 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -828,6 +828,15 @@ Gcc_backend::Gcc_backend() this->define_builtin(BUILT_IN_FRAME_ADDRESS, "__builtin_frame_address", NULL, t, false, false); + // The runtime calls __builtin_extract_return_addr when recording + // the address to which a function returns. + this->define_builtin(BUILT_IN_EXTRACT_RETURN_ADDR, + "__builtin_extract_return_addr", NULL, + build_function_type_list(ptr_type_node, + ptr_type_node, + NULL_TREE), + false, false); + // The compiler uses __builtin_trap for some exception handling // cases. this->define_builtin(BUILT_IN_TRAP, "__builtin_trap", NULL, |