minix/lib/nbsd_libm/arch/i387/lrint.S
Gianluca Guida 0dc9e0996a Import unmodified NetBSD's libm for compiling with new libc.
As the current libc includes a libm implementation, with the new libc
this is needed. Unneeded (for the moment) archs have been removed.
2011-03-18 15:52:16 +00:00

24 lines
350 B
ArmAsm

/* $NetBSD: lrint.S,v 1.2 2004/10/13 15:18:32 drochner Exp $ */
/*
* Written by Matthias Drochner <drochner@NetBSD.org>.
* Public domain.
*/
#include <machine/asm.h>
ENTRY(lrint)
#ifdef __i386__
pushl %ebp
movl %esp,%ebp
subl $4,%esp
fldl 8(%ebp)
fistpl (%esp)
movl (%esp),%eax
leave
ret
#else
cvtsd2siq %xmm0,%rax
ret
#endif