rename amd64 architecture to x86_64
[dragonfly.git] / lib / libc / x86_64 / gen / fpgetsticky.S
CommitLineData
05ecdcef
SS
1/*
2 * Written by Frank van der Linden at Wasabi Systems for NetBSD.
3 * Public domain.
4 *
5 * $NetBSD: fpgetsticky.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 read both the x87 and SSE status words here, and OR
12 * them to get a complete picture of exceptions.
13 */
14
15#ifdef WEAK_ALIAS
16WEAK_ALIAS(fpgetsticky, _fpgetsticky)
17ENTRY(_fpgetsticky)
18#else
19ENTRY(fpgetsticky)
20#endif
21 fnstsw -4(%rsp)
22 stmxcsr -8(%rsp)
23 movl -4(%rsp),%eax
24 orl -8(%rsp),%eax
25 andl $63,%eax
26 ret