xref: /dflybsd-src/lib/libc/x86_64/string/bzero.S (revision 5b3646a93f49d0672a38799a970e6df9453fe295)
15d48b312SMatthew Dillon/*-
25d48b312SMatthew Dillon * Copyright (c) 1993 The Regents of the University of California.
35d48b312SMatthew Dillon * Copyright (c) 2003 Peter Wemm.
4*5b3646a9SMatthew Dillon * Copyright (c) 2008-2020 The DragonFly Project.
55d48b312SMatthew Dillon * All rights reserved.
6b2b3ffcdSSimon Schubert *
75d48b312SMatthew Dillon * Redistribution and use in source and binary forms, with or without
85d48b312SMatthew Dillon * modification, are permitted provided that the following conditions
95d48b312SMatthew Dillon * are met:
105d48b312SMatthew Dillon * 1. Redistributions of source code must retain the above copyright
115d48b312SMatthew Dillon *    notice, this list of conditions and the following disclaimer.
125d48b312SMatthew Dillon * 2. Redistributions in binary form must reproduce the above copyright
135d48b312SMatthew Dillon *    notice, this list of conditions and the following disclaimer in the
145d48b312SMatthew Dillon *    documentation and/or other materials provided with the distribution.
155d48b312SMatthew Dillon * 3. Neither the name of the University nor the names of its contributors
165d48b312SMatthew Dillon *    may be used to endorse or promote products derived from this software
175d48b312SMatthew Dillon *    without specific prior written permission.
185d48b312SMatthew Dillon *
195d48b312SMatthew Dillon * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
205d48b312SMatthew Dillon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
215d48b312SMatthew Dillon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
225d48b312SMatthew Dillon * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
235d48b312SMatthew Dillon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
245d48b312SMatthew Dillon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
255d48b312SMatthew Dillon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
265d48b312SMatthew Dillon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
275d48b312SMatthew Dillon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
285d48b312SMatthew Dillon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
295d48b312SMatthew Dillon * SUCH DAMAGE.
30b2b3ffcdSSimon Schubert */
31b2b3ffcdSSimon Schubert#include <machine/asm.h>
32*5b3646a9SMatthew Dillon#include <machine/asm_mjgmacros.h>
33b2b3ffcdSSimon Schubert
34*5b3646a9SMatthew Dillon/*
35*5b3646a9SMatthew Dillon * bzero(ptr:%rdi, bytes:%rsi)
36*5b3646a9SMatthew Dillon */
37b2b3ffcdSSimon SchubertENTRY(bzero)
38*5b3646a9SMatthew Dillon	subq	%r10,%r10
39*5b3646a9SMatthew Dillon	movq	%rsi,%rdx
40*5b3646a9SMatthew Dillon	MEMSET	erms=0 end=ret
41b2b3ffcdSSimon SchubertEND(bzero)
428b927cb7SJohn Marino
438b927cb7SJohn Marino	.section .note.GNU-stack,"",%progbits
44