11.2Sjakllsch/*	$NetBSD: memset.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $	*/
21.1Sjoerg
31.1Sjoerg/*-
41.1Sjoerg * Copyright (c) 2011 The NetBSD Foundation, Inc.
51.1Sjoerg * All rights reserved.
61.1Sjoerg *
71.1Sjoerg * This code is derived from software contributed to The NetBSD Foundation
81.1Sjoerg * by Joerg Sonnenberger.
91.1Sjoerg *
101.1Sjoerg * Redistribution and use in source and binary forms, with or without
111.1Sjoerg * modification, are permitted provided that the following conditions
121.1Sjoerg * are met:
131.1Sjoerg * 1. Redistributions of source code must retain the above copyright
141.1Sjoerg *    notice, this list of conditions and the following disclaimer.
151.1Sjoerg * 2. Redistributions in binary form must reproduce the above copyright
161.1Sjoerg *    notice, this list of conditions and the following disclaimer in the
171.1Sjoerg *    documentation and/or other materials provided with the distribution.
181.1Sjoerg *
191.1Sjoerg * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Sjoerg * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Sjoerg * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Sjoerg * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Sjoerg * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Sjoerg * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Sjoerg * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Sjoerg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Sjoerg * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Sjoerg * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Sjoerg * POSSIBILITY OF SUCH DAMAGE.
301.1Sjoerg */
311.1Sjoerg
321.1Sjoerg#include <machine/asm.h>
331.2Sjakllsch	RCSID("$NetBSD: memset.S,v 1.2 2014/03/22 19:38:46 jakllsch Exp $")
341.1Sjoerg
351.1SjoergENTRY(memset)
361.1Sjoerg	pushl	%edi
371.1Sjoerg	movl	8(%esp), %edi
381.1Sjoerg	movl	12(%esp), %eax
391.1Sjoerg	movl	16(%esp), %ecx
401.1Sjoerg	pushl	%edi
411.1Sjoerg	rep
421.1Sjoerg	stosb
431.1Sjoerg	popl	%eax
441.1Sjoerg	popl	%edi
451.1Sjoerg	ret
461.2SjakllschEND(memset)
47