summaryrefslogtreecommitdiff
path: root/lib/math/ftrap-impl+posixy-x64.s
blob: 08dd7cf41a93e2ec97877b78936d2fa144fd4653 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.globl _math$fptrap
.globl math$fptrap
_math$fptrap:
math$fptrap:
	subq	$4,%rsp
	wait
	stmxcsr	(%rsp)
	movl	(%rsp),%eax
	andl	$~0x1f80,%eax
	testb	%dil,%dil
	jnz	.apply
	orl	$0x1f80,%eax
.apply:
	movl	%eax,(%rsp)
	ldmxcsr	(%rsp)
	addq	$4,%rsp
	ret