xref: /relibc/openlibm/amd64/s_scalbnl.S (revision 2a1e56858a696c09eef310ceea1ede6ccd0b229c)
1/*
2 * Based on code written by J.T. Conklin <jtc@netbsd.org>.
3 * Public domain.
4 */
5
6#include <amd64/bsd_asm.h>
7//__FBSDID("$FreeBSD: src/lib/msun/amd64/s_scalbnl.S,v 1.3 2011/01/07 16:13:12 kib Exp $")
8/* //RCSID("$NetBSD: s_scalbnf.S,v 1.4 1999/01/02 05:15:40 kristerw Exp $") */
9
10ENTRY(scalbnl)
11#ifndef _WIN64
12	movl	%edi,-4(%rsp)
13	fildl	-4(%rsp)
14	fldt	8(%rsp)
15#else
16    mov     %r8,%rax
17	movl	%eax,-4(%rsp)
18	fildl	-4(%rsp)
19	fldt	(%rdx)
20#endif
21	fscale
22	fstp	%st(1)
23#ifdef _WIN64
24    mov     %rcx,%rax
25    movq    $0x0,0x8(%rcx)
26    fstpt   (%rcx)
27#endif
28	ret
29#ifndef _WIN64
30END(scalbnl)
31.globl CNAME(ldexpl)
32#else
33.globl CNAME(ldexpl); .section .drectve; .ascii " -export:ldexpl"
34#endif
35.set   CNAME(ldexpl),CNAME(scalbnl)
36
37/* Enable stack protection */
38#if defined(__ELF__)
39.section .note.GNU-stack,"",%progbits
40#endif
41