1168515Sgshapiro/*	$NetBSD: cerror.S,v 1.5 2003/08/07 16:42:04 agc Exp $	*/
2168515Sgshapiro
3168515Sgshapiro/*-
4132943Sgshapiro * Copyright (c) 1990 The Regents of the University of California.
5244833Sgshapiro * All rights reserved.
6132943Sgshapiro *
7168515Sgshapiro * Redistribution and use in source and binary forms, with or without
890792Sgshapiro * modification, are permitted provided that the following conditions
9168515Sgshapiro * are met:
1090792Sgshapiro * 1. Redistributions of source code must retain the above copyright
11168515Sgshapiro *    notice, this list of conditions and the following disclaimer.
12168515Sgshapiro * 2. Redistributions in binary form must reproduce the above copyright
1390792Sgshapiro *    notice, this list of conditions and the following disclaimer in the
1490792Sgshapiro *    documentation and/or other materials provided with the distribution.
1590792Sgshapiro * 3. Neither the name of the University nor the names of its contributors
1690792Sgshapiro *    may be used to endorse or promote products derived from this software
17168515Sgshapiro *    without specific prior written permission.
18168515Sgshapiro *
19168515Sgshapiro * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2090792Sgshapiro * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2190792Sgshapiro * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22168515Sgshapiro * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23168515Sgshapiro * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24168515Sgshapiro * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25168515Sgshapiro * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26168515Sgshapiro * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27168515Sgshapiro * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28168515Sgshapiro * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29168515Sgshapiro * SUCH DAMAGE.
30168515Sgshapiro *
31168515Sgshapiro *	from: @(#)cerror.s	5.1 (Berkeley) 4/23/90
32110560Sgshapiro */
33168515Sgshapiro
34168515Sgshapiro#include <machine/asm.h>
35168515Sgshapiro__FBSDID("$FreeBSD: releng/10.3/lib/libc/arm/sys/cerror.S 271337 2014-09-09 22:24:01Z ian $");
3690792Sgshapiro#include "SYS.h"
3790792Sgshapiro
38168515Sgshapiro.globl  _C_LABEL(__error)
39168515Sgshapiro.type   _C_LABEL(__error),%function
40168515Sgshapiro
41168515SgshapiroASENTRY(CERROR)
42168515Sgshapiro	stmfd	sp!, {r4, lr}
43168515Sgshapiro	mov	r4, r0
44168515Sgshapiro	bl	PIC_SYM(_C_LABEL(__error), PLT)
45168515Sgshapiro	str	r4, [r0]
46168515Sgshapiro	mvn	r0, #0x00000000
4790792Sgshapiro	mvn	r1, #0x00000000
4890792Sgshapiro	ldmfd	sp!, {r4, pc}
49168515SgshapiroEND(CERROR)
50168515Sgshapiro