summaryrefslogtreecommitdiff
path: root/lib/libc/arch/m68k/gen/fpsetmask.S
blob: ccd7a5d72b03e0cd25419644e091dfcc3699121c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* $OpenBSD: fpsetmask.S,v 1.3 2005/08/07 16:40:14 espie Exp $ */
/*
 * Written by Charles M. Hannum, Apr 9, 1995
 * Public Domain.
 */

#include <machine/asm.h>

ENTRY(fpsetmask)
	movel d2,sp@-
	fmovel fpcr,d1
	movel sp@(8),d2
	bfextu d1{#18:#5},d0
	bfins d2,d1{#18:#5}
	movel sp@+,d2
	fmovel d1,fpcr
	rts