2016-10-13 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git] / libgo / runtime / go-copy.c
blob05e16acbf1c48686ec76b7338473d537e5731723
1 /* go-append.c -- the go builtin copy function.
3 Copyright 2010 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 #include <stddef.h>
8 #include <stdint.h>
10 /* We should be OK if we don't split the stack here, since we are just
11 calling memmove which shouldn't need much stack. If we don't do
12 this we will always split the stack, because of memmove. */
14 extern void
15 __go_copy (void *, void *, uintptr_t)
16 __attribute__ ((no_split_stack));
18 void
19 __go_copy (void *a, void *b, uintptr_t len)
21 __builtin_memmove (a, b, len);