16c50960bSAndrew Turner/* 26c50960bSAndrew Turner * Copyright (C) 2015 Andrew Turner 36c50960bSAndrew Turner * All rights reserved. 46c50960bSAndrew Turner * 56c50960bSAndrew Turner * Redistribution and use in source and binary forms, with or without 66c50960bSAndrew Turner * modification, are permitted provided that the following conditions 76c50960bSAndrew Turner * are met: 86c50960bSAndrew Turner * 1. Redistributions of source code must retain the above copyright 96c50960bSAndrew Turner * notice, this list of conditions and the following disclaimer. 106c50960bSAndrew Turner * 2. Redistributions in binary form must reproduce the above copyright 116c50960bSAndrew Turner * notice, this list of conditions and the following disclaimer in the 126c50960bSAndrew Turner * documentation and/or other materials provided with the distribution. 136c50960bSAndrew Turner * 146c50960bSAndrew Turner * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 156c50960bSAndrew Turner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 166c50960bSAndrew Turner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 176c50960bSAndrew Turner * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 186c50960bSAndrew Turner * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 196c50960bSAndrew Turner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 206c50960bSAndrew Turner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 216c50960bSAndrew Turner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 226c50960bSAndrew Turner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 236c50960bSAndrew Turner * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 246c50960bSAndrew Turner * SUCH DAMAGE. 256c50960bSAndrew Turner * 266c50960bSAndrew Turner */ 276c50960bSAndrew Turner 286c50960bSAndrew Turner#include <machine/asm.h> 296c50960bSAndrew Turner/* 306c50960bSAndrew Turner * This implements 316c50960bSAndrew Turner * void __aeabi_memclr4(void *dest, size_t len) 326c50960bSAndrew Turner * by calling: 33*b2d2a590SMateusz Guzik * void *memset(dest, 0, len) 346c50960bSAndrew Turner */ 356c50960bSAndrew TurnerENTRY_NP(__aeabi_memclr4) 36756508c7SAndrew TurnerEENTRY_NP(__aeabi_memclr8) 37*b2d2a590SMateusz Guzik mov r2, r1 38*b2d2a590SMateusz Guzik mov r1, #0 39*b2d2a590SMateusz Guzik b memset 40756508c7SAndrew TurnerEEND(__aeabi_memclr8) 416c50960bSAndrew TurnerEND(__aeabi_memclr4) 426c50960bSAndrew Turner 43