xref: /openbsd-src/lib/libc/arch/i386/gen/fabs.S (revision aeb694e3afa554db8dd44ee8140d036724efada5)
1*aeb694e3Smartynas/* $OpenBSD: fabs.S,v 1.9 2011/07/08 22:28:33 martynas Exp $ */
2*aeb694e3Smartynas/*-
3*aeb694e3Smartynas * Copyright (c) 1990 The Regents of the University of California.
4*aeb694e3Smartynas * All rights reserved.
5*aeb694e3Smartynas *
6*aeb694e3Smartynas * This code is derived from software contributed to Berkeley by
7*aeb694e3Smartynas * William Jolitz.
8*aeb694e3Smartynas *
9*aeb694e3Smartynas * Redistribution and use in source and binary forms, with or without
10*aeb694e3Smartynas * modification, are permitted provided that the following conditions
11*aeb694e3Smartynas * are met:
12*aeb694e3Smartynas * 1. Redistributions of source code must retain the above copyright
13*aeb694e3Smartynas *    notice, this list of conditions and the following disclaimer.
14*aeb694e3Smartynas * 2. Redistributions in binary form must reproduce the above copyright
15*aeb694e3Smartynas *    notice, this list of conditions and the following disclaimer in the
16*aeb694e3Smartynas *    documentation and/or other materials provided with the distribution.
17*aeb694e3Smartynas * 3. Neither the name of the University nor the names of its contributors
18*aeb694e3Smartynas *    may be used to endorse or promote products derived from this software
19*aeb694e3Smartynas *    without specific prior written permission.
20*aeb694e3Smartynas *
21*aeb694e3Smartynas * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22*aeb694e3Smartynas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*aeb694e3Smartynas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*aeb694e3Smartynas * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25*aeb694e3Smartynas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*aeb694e3Smartynas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*aeb694e3Smartynas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*aeb694e3Smartynas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*aeb694e3Smartynas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*aeb694e3Smartynas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*aeb694e3Smartynas * SUCH DAMAGE.
32*aeb694e3Smartynas */
33*aeb694e3Smartynas
34*aeb694e3Smartynas#include <machine/asm.h>
35*aeb694e3Smartynas
36*aeb694e3SmartynasENTRY(fabs)
37*aeb694e3Smartynas	fldl	4(%esp)
38*aeb694e3Smartynas	fabs
39*aeb694e3Smartynas	ret
40