From f6d67708ca8d0efbeeb5742ef177db2e1a096278 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 16 May 2019 23:23:58 +0000 Subject: compiler: add intrinsics for runtime/internal/sys functions runtime/internal/sys.Ctz32/64 and Bswap32/64 are currently implemented with compiler builtin functions. But if they are called from another package, the compiler does not know and therefore cannot turn them into compiler intrinsics. This CL makes the compiler recognize these functions and turn them into intrinsics directly, as the gc compiler does. This CL sets up a way for adding intrinsics in the compiler. More intrinsics will be added in later CLs. Also move the handling of runtime.getcallerpc/sp to the new way of generating intrinsics. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176917 From-SVN: r271303 --- gcc/go/gofrontend/expressions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/go/gofrontend/expressions.h') diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index b1811ea..21a214d 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -2427,7 +2427,7 @@ class Call_expression : public Expression check_argument_type(int, const Type*, const Type*, Location, bool); Expression* - lower_to_builtin(Named_object**, const char*, int*); + intrinsify(Gogo*, Statement_inserter*); Expression* interface_method_function(Interface_field_reference_expression*, -- cgit v1.1