use .type directives for math asm (needed for dynamic linking to work)

This commit is contained in:
Rich Felker 2011-06-26 15:52:37 -04:00
commit e22c2d3ee6
15 changed files with 26 additions and 0 deletions

View file

@ -1,4 +1,5 @@
.global expf
.type expf,@function
expf:
mov 4(%esp),%eax
flds 4(%esp)
@ -8,6 +9,7 @@ expf:
jmp 0f
.global exp
.type exp,@function
exp:
mov 8(%esp),%eax
fldl 4(%esp)

View file

@ -1,4 +1,5 @@
.global log
.type log,@function
log:
fldln2
fldl 4(%esp)

View file

@ -1,4 +1,5 @@
.global log10
.type log10,@function
log10:
fldlg2
fldl 4(%esp)

View file

@ -1,4 +1,5 @@
.global log10f
.type log10f,@function
log10f:
fldlg2
flds 4(%esp)

View file

@ -1,4 +1,5 @@
.global logf
.type logf,@function
logf:
fldln2
flds 4(%esp)

View file

@ -1,10 +1,12 @@
.global remainderf
.type remainderf,@function
remainderf:
flds 8(%esp)
flds 4(%esp)
jmp 1f
.global remainder
.type remainder,@function
remainder:
fldl 12(%esp)
fldl 4(%esp)

View file

@ -1,4 +1,5 @@
.global sqrt
.type sqrt,@function
sqrt: fldl 4(%esp)
fsqrt
ret

View file

@ -1,4 +1,5 @@
.global sqrtf
.type sqrtf,@function
sqrtf: flds 4(%esp)
fsqrt
ret

View file

@ -1,4 +1,5 @@
.global fabs
.type fabs,@function
fabs:
fldl 4(%esp)
fabs

View file

@ -1,4 +1,5 @@
.global fabsf
.type fabsf,@function
fabsf:
flds 4(%esp)
fabs

View file

@ -1,4 +1,5 @@
.global rint
.type rint,@function
rint:
fldl 4(%esp)
frndint

View file

@ -1,4 +1,5 @@
.global rintf
.type rintf,@function
rintf:
flds 4(%esp)
frndint

View file

@ -1,6 +1,9 @@
.global ldexp
.global scalbn
.global scalbln
.type ldexp,@function
.type scalbn,@function
.type scalbln,@function
ldexp:
scalbn:
scalbln:

View file

@ -1,6 +1,9 @@
.global ldexpf
.global scalbnf
.global scalblnf
.type ldexpf,@function
.type scalbnf,@function
.type scalblnf,@function
ldexpf:
scalbnf:
scalblnf:

View file

@ -1,26 +1,32 @@
.global ceilf
.type ceilf,@function
ceilf: flds 4(%esp)
jmp 1f
.global ceil
.type ceil,@function
ceil: fldl 4(%esp)
1: mov $0x08fb,%edx
jmp 0f
.global floorf
.type floorf,@function
floorf: flds 4(%esp)
jmp 1f
.global floor
.type floor,@function
floor: fldl 4(%esp)
1: mov $0x04f7,%edx
jmp 0f
.global truncf
.type truncf,@function
truncf: flds 4(%esp)
jmp 1f
.global trunc
.type trunc,@function
trunc: fldl 4(%esp)
1: mov $0x0cff,%edx