| Commit | Line | Data |
|---|---|---|
| 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 | |
| 16 | WEAK_ALIAS(fpgetsticky, _fpgetsticky) | |
| 17 | ENTRY(_fpgetsticky) | |
| 18 | #else | |
| 19 | ENTRY(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 |