1*0a6a1f1dSLionel Sambuc/* $NetBSD: fpgetsticky.S,v 1.4 2014/05/22 15:01:56 uebayasi Exp $ */ 22fe8fb19SBen Gras 32fe8fb19SBen Gras/* 42fe8fb19SBen Gras * Written by Frank van der Linden at Wasabi Systems for NetBSD. 52fe8fb19SBen Gras * Public domain. 62fe8fb19SBen Gras * 72fe8fb19SBen Gras */ 82fe8fb19SBen Gras 92fe8fb19SBen Gras#include <machine/asm.h> 102fe8fb19SBen Gras 112fe8fb19SBen Gras/* 122fe8fb19SBen Gras * XXX read both the x87 and SSE status words here, and OR 132fe8fb19SBen Gras * them to get a complete picture of exceptions. 142fe8fb19SBen Gras */ 152fe8fb19SBen Gras 162fe8fb19SBen Gras#ifdef WEAK_ALIAS 172fe8fb19SBen GrasWEAK_ALIAS(fpgetsticky, _fpgetsticky) 182fe8fb19SBen GrasENTRY(_fpgetsticky) 192fe8fb19SBen Gras#else 202fe8fb19SBen GrasENTRY(fpgetsticky) 212fe8fb19SBen Gras#endif 222fe8fb19SBen Gras fnstsw -4(%rsp) 232fe8fb19SBen Gras stmxcsr -8(%rsp) 242fe8fb19SBen Gras movl -4(%rsp),%eax 252fe8fb19SBen Gras orl -8(%rsp),%eax 262fe8fb19SBen Gras andl $63,%eax 272fe8fb19SBen Gras ret 28*0a6a1f1dSLionel Sambuc#ifdef WEAK_ALIAS 29*0a6a1f1dSLionel SambucEND(_fpgetsticky) 30*0a6a1f1dSLionel Sambuc#else 31*0a6a1f1dSLionel SambucEND(fpgetsticky) 32*0a6a1f1dSLionel Sambuc#endif 33