Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / libgo / runtime / go-copy.c
blob998aeb927d42d0d0b63def66539c1dfbdae296ca
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>
9 /* We should be OK if we don't split the stack here, since we are just
10 calling memmove which shouldn't need much stack. If we don't do
11 this we will always split the stack, because of memmove. */
13 extern void
14 __go_copy (void *, void *, size_t)
15 __attribute__ ((no_split_stack));
17 void
18 __go_copy (void *a, void *b, size_t len)
20 __builtin_memmove (a, b, len);