]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: add intrinsics for runtime/internal/sys functions
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 16 May 2019 23:23:58 +0000 (23:23 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 16 May 2019 23:23:58 +0000 (23:23 +0000)
commitf6d67708ca8d0efbeeb5742ef177db2e1a096278
tree67a942ae567ef9f5abff55de4595f64d8be2b14d
parent7110128236989c9f957b7345d5615e9df8a337f2
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/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/runtime.cc
gcc/go/gofrontend/runtime.def