aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-06-24 16:54:22 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-06-24 16:54:22 +0000
commit2b92d5c69b4e4ffd89e6bfe928ea2cc2114357a8 (patch)
tree318ef6fa71679125858dacabc9a1992333294ccc /libgo
parent1e3d475ea16e89332e07651d61b60b408e0a0932 (diff)
downloadgcc-2b92d5c69b4e4ffd89e6bfe928ea2cc2114357a8.zip
gcc-2b92d5c69b4e4ffd89e6bfe928ea2cc2114357a8.tar.gz
gcc-2b92d5c69b4e4ffd89e6bfe928ea2cc2114357a8.tar.bz2
compiler: use builtin memcmp directly
Instead of going through a C function __go_memcmp, we can just use __builtin_memcmp directly. This allows more optimizations in the compiler backend. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183537 From-SVN: r272620
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am1
-rw-r--r--libgo/Makefile.in8
-rw-r--r--libgo/runtime/go-memcmp.c13
3 files changed, 2 insertions, 20 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 4bfed3f..88f885b 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -459,7 +459,6 @@ runtime_files = \
runtime/go-fieldtrack.c \
runtime/go-matherr.c \
runtime/go-memclr.c \
- runtime/go-memcmp.c \
runtime/go-memequal.c \
runtime/go-nanotime.c \
runtime/go-now.c \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 837e1e8..f53ca3f 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -244,8 +244,8 @@ am__objects_3 = runtime/aeshash.lo runtime/go-assert.lo \
runtime/go-cgo.lo runtime/go-construct-map.lo \
runtime/go-ffi.lo runtime/go-fieldtrack.lo \
runtime/go-matherr.lo runtime/go-memclr.lo \
- runtime/go-memcmp.lo runtime/go-memequal.lo \
- runtime/go-nanotime.lo runtime/go-now.lo runtime/go-nosys.lo \
+ runtime/go-memequal.lo runtime/go-nanotime.lo \
+ runtime/go-now.lo runtime/go-nosys.lo \
runtime/go-reflect-call.lo runtime/go-runtime-error.lo \
runtime/go-setenv.lo runtime/go-signal.lo \
runtime/go-unsafe-pointer.lo runtime/go-unsetenv.lo \
@@ -892,7 +892,6 @@ runtime_files = \
runtime/go-fieldtrack.c \
runtime/go-matherr.c \
runtime/go-memclr.c \
- runtime/go-memcmp.c \
runtime/go-memequal.c \
runtime/go-nanotime.c \
runtime/go-now.c \
@@ -1343,8 +1342,6 @@ runtime/go-matherr.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-memclr.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
-runtime/go-memcmp.lo: runtime/$(am__dirstamp) \
- runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-memequal.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-nanotime.lo: runtime/$(am__dirstamp) \
@@ -1436,7 +1433,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-fieldtrack.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-matherr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memclr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memcmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-memequal.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-nanotime.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-nosys.Plo@am__quote@
diff --git a/libgo/runtime/go-memcmp.c b/libgo/runtime/go-memcmp.c
deleted file mode 100644
index 78a356b..0000000
--- a/libgo/runtime/go-memcmp.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* go-memcmp.c -- the go memory comparison function.
-
- Copyright 2012 The Go Authors. All rights reserved.
- Use of this source code is governed by a BSD-style
- license that can be found in the LICENSE file. */
-
-#include "runtime.h"
-
-intgo
-__go_memcmp (const void *p1, const void *p2, uintptr len)
-{
- return __builtin_memcmp (p1, p2, len);
-}