summaryrefslogtreecommitdiff
path: root/src/math/i386/scalbnl.s
blob: 54414c2e9837a6be2b956a2b80e89f6667c082ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.global ldexpl
.type ldexpl,@function
ldexpl:
	nop

.global scalblnl
.type scalblnl,@function
scalblnl:
	nop

.global scalbnl
.type scalbnl,@function
scalbnl:
	mov 16(%esp),%eax
	add $0x3ffe,%eax
	cmp $0x7ffd,%eax
	jae 1f
	inc %eax
	fldt 4(%esp)
	mov %eax,12(%esp)
	mov $0x80000000,%eax
	mov %eax,8(%esp)
	xor %eax,%eax
	mov %eax,4(%esp)
	fldt 4(%esp)
	fmulp
	ret
1:	fildl 16(%esp)
	fldt 4(%esp)
	fscale
	fstp %st(1)
	ret