diff options
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r-- | gcc/go/go-gcc.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index a332831..f9ba9d5 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -818,13 +818,14 @@ Gcc_backend::Gcc_backend() math_function_type_long, true, false); // We use __builtin_return_address in the thunk we build for - // functions which call recover. + // functions which call recover, and for runtime.getcallerpc. + t = build_function_type_list(ptr_type_node, unsigned_type_node, NULL_TREE); this->define_builtin(BUILT_IN_RETURN_ADDRESS, "__builtin_return_address", - NULL, - build_function_type_list(ptr_type_node, - unsigned_type_node, - NULL_TREE), - false, false); + NULL, t, false, false); + + // The runtime calls __builtin_frame_address for runtime.getcallersp. + this->define_builtin(BUILT_IN_FRAME_ADDRESS, "__builtin_frame_address", + NULL, t, false, false); // The compiler uses __builtin_trap for some exception handling // cases. |