1145171Sdas/*-
2145171Sdas * Copyright (c) 2005 David Schultz <das@FreeBSD.ORG>
3145171Sdas * All rights reserved.
4145171Sdas *
5145171Sdas * Redistribution and use in source and binary forms, with or without
6145171Sdas * modification, are permitted provided that the following conditions
7145171Sdas * are met:
8145171Sdas * 1. Redistributions of source code must retain the above copyright
9145171Sdas *    notice, this list of conditions and the following disclaimer.
10145171Sdas * 2. Redistributions in binary form must reproduce the above copyright
11145171Sdas *    notice, this list of conditions and the following disclaimer in the
12145171Sdas *    documentation and/or other materials provided with the distribution.
13145171Sdas *
14145171Sdas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15145171Sdas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16145171Sdas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17145171Sdas * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18145171Sdas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19145171Sdas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20145171Sdas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21145171Sdas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22145171Sdas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23145171Sdas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24145171Sdas * SUCH DAMAGE.
25145171Sdas */
26145171Sdas
27145171Sdas#include <machine/asm.h>
28145171Sdas__FBSDID("$FreeBSD$")
29145171Sdas
30145171SdasENTRY(scalbnf)
31145171Sdas	movss	%xmm0,-8(%rsp)
32145171Sdas	movl	%edi,-4(%rsp)
33145171Sdas	fildl	-4(%rsp)
34145171Sdas	flds	-8(%rsp)
35145171Sdas	fscale
36145171Sdas	fstp	%st(1)
37145171Sdas	fstps	-8(%rsp)
38145171Sdas	movss	-8(%rsp),%xmm0
39145171Sdas	ret
40192760SattilioEND(scalbnf)
41150067Sdas
42150067Sdas.globl CNAME(ldexpf)
43150067Sdas.set	CNAME(ldexpf),CNAME(scalbnf)
44217108Skib
45217108Skib	.section .note.GNU-stack,"",%progbits
46