167117Sdfr/*-
267117Sdfr * Copyright (c) 2000 Doug Rabson
367117Sdfr * All rights reserved.
467117Sdfr *
567117Sdfr * Redistribution and use in source and binary forms, with or without
667117Sdfr * modification, are permitted provided that the following conditions
767117Sdfr * are met:
867117Sdfr * 1. Redistributions of source code must retain the above copyright
967117Sdfr *    notice, this list of conditions and the following disclaimer.
1067117Sdfr * 2. Redistributions in binary form must reproduce the above copyright
1167117Sdfr *    notice, this list of conditions and the following disclaimer in the
1267117Sdfr *    documentation and/or other materials provided with the distribution.
1367117Sdfr *
1467117Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1567117Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1667117Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1767117Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1867117Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1967117Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2067117Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2167117Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2267117Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2367117Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2467117Sdfr * SUCH DAMAGE.
2567117Sdfr */
2667117Sdfr
2767117Sdfr#include <machine/asm.h>
28111777Sobrien__FBSDID("$FreeBSD: releng/10.2/lib/libc/ia64/sys/cerror.S 111777 2003-03-03 01:09:46Z obrien $");
2967117Sdfr
3067117Sdfr
3167117SdfrENTRY(.cerror, 0)
3267117Sdfr	alloc	loc0=ar.pfs,0,3,1,0
3367117Sdfr	;;
3467117Sdfr	mov	loc1=rp
3567117Sdfr	mov	loc2=ret0
3667117Sdfr	mov	out0=ret0
3767117Sdfr	;;
3867117Sdfr	br.call.sptk.few rp=__error
3967117Sdfr	st4	[ret0]=loc2
4067117Sdfr	;;
4167117Sdfr	mov	ret0=-1
4267117Sdfr	mov	ar.pfs=loc0
4367117Sdfr	mov	rp=loc1
4467117Sdfr	;;
4567117Sdfr	br.ret.sptk.few rp
4667117SdfrEND(.cerror)
47