@@ -29,7 +29,7 @@
// result types.
// The standard C memcmp function, used for struct comparisons.
-DEF_GO_RUNTIME(MEMCMP, "memcmp", P3(POINTER, POINTER, UINTPTR), R1(INT))
+DEF_GO_RUNTIME(MEMCMP, "__go_memcmp", P3(POINTER, POINTER, UINTPTR), R1(INT))
// Range over a string, returning the next index.
DEF_GO_RUNTIME(STRINGITER, "runtime.stringiter", P2(STRING, INT), R1(INT))
@@ -462,6 +462,7 @@
runtime/go-map-len.c \
runtime/go-map-range.c \
runtime/go-matherr.c \
+ runtime/go-memcmp.c \
runtime/go-nanotime.c \
runtime/go-now.c \
runtime/go-new-map.c \
@@ -0,0 +1,13 @@
+/* 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);
+}