github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/third_party/gofrontend/libgo/runtime/go-copy.c (about)

     1  /* go-append.c -- the go builtin copy function.
     2  
     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.  */
     6  
     7  #include <stddef.h>
     8  #include <stdint.h>
     9  
    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.  */
    13  
    14  extern void
    15  __go_copy (void *, void *, uintptr_t)
    16    __attribute__ ((no_split_stack));
    17  
    18  void
    19  __go_copy (void *a, void *b, uintptr_t len)
    20  {
    21    __builtin_memmove (a, b, len);
    22  }