annotate libgo/runtime/go-memequal.c @ 143:76e1cf5455ef

add cbc_gc test
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 19:24:05 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* go-memequal.c -- compare memory buffers for equality
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 Copyright 2016 The Go Authors. All rights reserved.
kono
parents:
diff changeset
4 Use of this source code is governed by a BSD-style
kono
parents:
diff changeset
5 license that can be found in the LICENSE file. */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 #include "runtime.h"
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 _Bool memequal (void *, void *, uintptr)
kono
parents:
diff changeset
10 __asm__ (GOSYM_PREFIX "runtime.memequal");
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 _Bool
kono
parents:
diff changeset
13 memequal (void *p1, void *p2, uintptr len)
kono
parents:
diff changeset
14 {
kono
parents:
diff changeset
15 return __builtin_memcmp (p1, p2, len) == 0;
kono
parents:
diff changeset
16 }