1 1.4.12.1 nathanw /* $NetBSD: fpgetround.S,v 1.4.12.1 2002/01/28 20:49:49 nathanw Exp $ */ 2 1.4 perry 3 1.1 jtc /* 4 1.1 jtc * Written by J.T. Conklin, Apr 4, 1995 5 1.1 jtc * Public domain. 6 1.1 jtc */ 7 1.1 jtc 8 1.1 jtc #include <machine/asm.h> 9 1.1 jtc 10 1.4.12.1 nathanw #ifdef WEAK_ALIAS 11 1.4.12.1 nathanw WEAK_ALIAS(fpgetround, _fpgetround) 12 1.4.12.1 nathanw ENTRY(_fpgetround) 13 1.4.12.1 nathanw #else 14 1.1 jtc ENTRY(fpgetround) 15 1.4.12.1 nathanw #endif 16 1.1 jtc subl $4,%esp 17 1.1 jtc fnstcw (%esp) 18 1.2 mycroft movl (%esp),%eax 19 1.3 mycroft rorl $10,%eax 20 1.1 jtc andl $3,%eax 21 1.1 jtc addl $4,%esp 22 1.1 jtc ret 23