rename amd64 architecture to x86_64
[dragonfly.git] / lib / libc / x86_64 / gen / fpgetround.S
CommitLineData
05ecdcef
SS
1/*
2 * Written by J.T. Conklin, Apr 4, 1995
3 * Public domain.
4 *
5 * $NetBSD: fpgetround.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $
05ecdcef
SS
6 */
7
8#include <machine/asm.h>
9
10/*
11 * XXX store only x87 state. If an application only uses the fp*
12 * interface, this should be in sync with the SSE mxcsr register.
13 */
14
15#ifdef WEAK_ALIAS
16WEAK_ALIAS(fpgetround, _fpgetround)
17ENTRY(_fpgetround)
18#else
19ENTRY(fpgetround)
20#endif
21 fnstcw -4(%rsp)
22 movl -4(%rsp),%eax
23 rorl $10,%eax
24 andl $3,%eax
25 ret