b6cbf7203b
This patch imports the unmodified current version of NetBSD libc. The NetBSD includes are in /nbsd_include, while the libc code itself is split between lib/nbsd_libc and common/lib/libc.
33 lines
579 B
ArmAsm
33 lines
579 B
ArmAsm
/* $NetBSD: flt_rounds.S,v 1.6 1999/08/23 08:45:09 kleink Exp $ */
|
|
|
|
/*
|
|
* Written by J.T. Conklin, Apr 4, 1995
|
|
* Public domain.
|
|
*/
|
|
|
|
#include <machine/asm.h>
|
|
|
|
.text
|
|
_ALIGN_TEXT
|
|
_map:
|
|
.byte 1 /* round to nearest */
|
|
.byte 3 /* round to negative infinity */
|
|
.byte 2 /* round to positive infinity */
|
|
.byte 0 /* round to zero */
|
|
|
|
ENTRY(__flt_rounds)
|
|
subl $4,%esp
|
|
fnstcw (%esp)
|
|
movl (%esp),%eax
|
|
shrl $10,%eax
|
|
andl $3,%eax
|
|
#ifdef PIC
|
|
PIC_PROLOGUE
|
|
leal PIC_GOTOFF(_map),%ecx
|
|
PIC_EPILOGUE
|
|
movb (%ecx,%eax,1),%al
|
|
#else
|
|
movb _map(,%eax,1),%al
|
|
#endif
|
|
addl $4,%esp
|
|
ret
|