summaryrefslogtreecommitdiff
path: root/lib/libc/arch/m68k/gen/fpsetround.S
blob: d89631f99ce69072f7ee2ca71b1408a52a482980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Written by J.T. Conklin, Apr 6, 1995
 * Public Domain.
 */

#include <machine/asm.h>

ENTRY(fpsetround)
	movel d2,sp@-
	fmovel fpcr,d1
	movel sp@(8),d2
	bfextu d1{#26,#2},d0
	bfins d2,d1{#26:#2}
	movel sp@+,d2
	fmovel d1,fpcr
	rts