1248395Sandrew/* 2248395Sandrew * Copyright (C) 2013 Andrew Turner 3248395Sandrew * All rights reserved. 4248395Sandrew * 5248395Sandrew * Redistribution and use in source and binary forms, with or without 6248395Sandrew * modification, are permitted provided that the following conditions 7248395Sandrew * are met: 8248395Sandrew * 1. Redistributions of source code must retain the above copyright 9248395Sandrew * notice, this list of conditions and the following disclaimer. 10248395Sandrew * 2. Redistributions in binary form must reproduce the above copyright 11248395Sandrew * notice, this list of conditions and the following disclaimer in the 12248395Sandrew * documentation and/or other materials provided with the distribution. 13248395Sandrew * 14248395Sandrew * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15248395Sandrew * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16248395Sandrew * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17248395Sandrew * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18248395Sandrew * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19248395Sandrew * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20248395Sandrew * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21248395Sandrew * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22248395Sandrew * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23248395Sandrew * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24248395Sandrew * SUCH DAMAGE. 25248395Sandrew * 26248395Sandrew */ 27248395Sandrew 28248395Sandrew#include <machine/asm.h> 29248395Sandrew__FBSDID("$FreeBSD$"); 30248395Sandrew 31248395Sandrew/* 32248395Sandrew * This implements 33248395Sandrew * void __aeabi_memset(void *dest, size_t len, int c) 34248395Sandrew * by calling: 35248395Sandrew * void *memset(dest, c, len) 36248395Sandrew * 37248395Sandrew * The arguments are in r0-r2, r3 can be used as a scratch register. 38248395Sandrew */ 39248395SandrewENTRY_NP(__aeabi_memset) 40248395Sandrew mov r3, r2 41248395Sandrew mov r2, r1 42248395Sandrew mov r1, r3 43248395Sandrew b memset 44248395SandrewEND(__aeabi_memset) 45