Cross Reference: fpsetmask.S
xref: /src/lib/libc/arch/i386/gen/fpsetmask.S
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /src/lib/libc/arch/i386/gen/
11.5Suebayasi/*	$NetBSD: fpsetmask.S,v 1.5 2014/05/23 02:34:19 uebayasi Exp $	*/
21.3Sperry
31.1Smycroft/*
41.1Smycroft * Written by Charles M. Hannum, Apr 9, 1995
51.1Smycroft * Public domain.
61.1Smycroft */
71.1Smycroft
81.1Smycroft#include <machine/asm.h>
91.1Smycroft
101.4Sthorpej#ifdef WEAK_ALIAS
111.4SthorpejWEAK_ALIAS(fpsetmask, _fpsetmask)
121.4SthorpejENTRY(_fpsetmask)
131.4Sthorpej#else
141.1SmycroftENTRY(fpsetmask)
151.4Sthorpej#endif
161.1Smycroft	subl $4,%esp
171.1Smycroft
181.1Smycroft	fnstcw (%esp)
191.1Smycroft	movl (%esp),%eax
201.1Smycroft	movl %eax,%edx
211.1Smycroft
221.1Smycroft	notl %eax
231.1Smycroft	andl $63,%eax
241.1Smycroft
251.2Smycroft	addl %eax,%edx
261.1Smycroft	movl 8(%esp),%ecx
271.1Smycroft	andl $63,%ecx
281.1Smycroft	subl %ecx,%edx
291.1Smycroft	movl %edx,(%esp)
301.1Smycroft	fldcw (%esp)
311.1Smycroft
321.1Smycroft	addl $4,%esp
331.1Smycroft	ret
341.5Suebayasi#ifdef WEAK_ALIAS
351.5SuebayasiEND(_fpsetmask)
361.5Suebayasi#else
371.5SuebayasiEND(fpsetmask)
381.5Suebayasi#endif
39

Indexes created Mon Nov 10 17:20:41 GMT 2025