summaryrefslogtreecommitdiff
path: root/lib/math/ftrap-impl+plan9-x64.s
blob: 3374f4ca8b81b862cf557e96717017ecdd2adee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
TEXT	math$fptrap(SB),$0
	SUBQ	$4,SP
	WAIT
	STMXCSR	(SP)
	MOVL	(SP),AX
	ANDL	$~0x1f80,AX
	TESTB	DI,DI
	JNZ	.apply
	ORL	$0x1f80,AX
.apply:
	MOVL	AX,(SP)
	LDMXCSR	(SP)
	ADDQ	$4,SP
	RET