1281197Sandrew/*- 2281197Sandrew * Copyright (c) 2014 Andrew Turner 3281197Sandrew * All rights reserved. 4281197Sandrew * 5281197Sandrew * Redistribution and use in source and binary forms, with or without 6281197Sandrew * modification, are permitted provided that the following conditions 7281197Sandrew * are met: 8281197Sandrew * 1. Redistributions of source code must retain the above copyright 9281197Sandrew * notice, this list of conditions and the following disclaimer. 10281197Sandrew * 2. Redistributions in binary form must reproduce the above copyright 11281197Sandrew * notice, this list of conditions and the following disclaimer in the 12281197Sandrew * documentation and/or other materials provided with the distribution. 13281197Sandrew * 14281197Sandrew * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15281197Sandrew * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16281197Sandrew * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17281197Sandrew * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18281197Sandrew * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19281197Sandrew * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20281197Sandrew * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21281197Sandrew * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22281197Sandrew * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23281197Sandrew * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24281197Sandrew * SUCH DAMAGE. 25281197Sandrew * 26281197Sandrew */ 27281197Sandrew 28281197Sandrew#include <machine/asm.h> 29281197Sandrew__FBSDID("$FreeBSD: releng/11.0/lib/libc/aarch64/sys/cerror.S 297973 2016-04-14 16:32:27Z emaste $"); 30281197Sandrew 31281197SandrewENTRY(cerror) 32297973Semaste .hidden cerror 33281197Sandrew sub sp, sp, #16 34281197Sandrew stp x0, lr, [sp] 35281197Sandrew bl _C_LABEL(__error) 36281197Sandrew ldp x1, lr, [sp] 37281197Sandrew str x1, [x0] 38281197Sandrew movn x0, #0 39281197Sandrew movn x1, #0 40281197Sandrew add sp, sp, #16 41281197Sandrew ret 42281197SandrewEND(cerror) 43