1// Copyright 2017 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "asm.h"
6
7// %rax = mempcpy(%rdi, %rsi, %rdx)
8ENTRY(mempcpy)
9
10    mov %rdx, %rcx
11    rep movsb // while (rcx-- > 0) *rdi++ = *rsi++;
12
13    mov %rdi, %rax
14    ret
15
16END(mempcpy)
17