1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // See memmove Go doc for important implementation constraints.
9 // void runtime·memmove(void*, void*, uintptr)
10 TEXT runtime·memmove(SB),NOSPLIT,$-0-24
16 // If the destination is ahead of the source, start at the end of the
17 // buffer and go backward.
20 // If less than eight bytes, do one byte at a time.
22 BNE T3, ZERO, f_outcheck
24 // Do one byte at a time until from is eight-aligned.
35 // Do eight bytes at a time as long as there is room.
47 // Finish off the remaining partial word.
61 // If less than eight bytes, do one byte at a time.
63 BNE T3, ZERO, b_outcheck
65 // Do one byte at a time until from+n is eight-aligned.
76 // Do eight bytes at a time as long as there is room.
88 // Finish off the remaining partial word.