From e22c2d3ee6c436ca69aa07d52943bf2808a22aac Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 26 Jun 2011 15:52:37 -0400 Subject: [PATCH] use .type directives for math asm (needed for dynamic linking to work) --- src/math/i386/e_exp.s | 2 ++ src/math/i386/e_log.s | 1 + src/math/i386/e_log10.s | 1 + src/math/i386/e_log10f.s | 1 + src/math/i386/e_logf.s | 1 + src/math/i386/e_remainder.s | 2 ++ src/math/i386/e_sqrt.s | 1 + src/math/i386/e_sqrtf.s | 1 + src/math/i386/s_fabs.s | 1 + src/math/i386/s_fabsf.s | 1 + src/math/i386/s_rint.s | 1 + src/math/i386/s_rintf.s | 1 + src/math/i386/s_scalbln.s | 3 +++ src/math/i386/s_scalblnf.s | 3 +++ src/math/i386/s_trunc.s | 6 ++++++ 15 files changed, 26 insertions(+) diff --git a/src/math/i386/e_exp.s b/src/math/i386/e_exp.s index d6c54a30..c50abc5e 100644 --- a/src/math/i386/e_exp.s +++ b/src/math/i386/e_exp.s @@ -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) diff --git a/src/math/i386/e_log.s b/src/math/i386/e_log.s index 34b8d38d..fcccf030 100644 --- a/src/math/i386/e_log.s +++ b/src/math/i386/e_log.s @@ -1,4 +1,5 @@ .global log +.type log,@function log: fldln2 fldl 4(%esp) diff --git a/src/math/i386/e_log10.s b/src/math/i386/e_log10.s index 7f48941b..28eb5b2f 100644 --- a/src/math/i386/e_log10.s +++ b/src/math/i386/e_log10.s @@ -1,4 +1,5 @@ .global log10 +.type log10,@function log10: fldlg2 fldl 4(%esp) diff --git a/src/math/i386/e_log10f.s b/src/math/i386/e_log10f.s index 311486ea..c0c0c67e 100644 --- a/src/math/i386/e_log10f.s +++ b/src/math/i386/e_log10f.s @@ -1,4 +1,5 @@ .global log10f +.type log10f,@function log10f: fldlg2 flds 4(%esp) diff --git a/src/math/i386/e_logf.s b/src/math/i386/e_logf.s index b8beec0f..da7ff3ae 100644 --- a/src/math/i386/e_logf.s +++ b/src/math/i386/e_logf.s @@ -1,4 +1,5 @@ .global logf +.type logf,@function logf: fldln2 flds 4(%esp) diff --git a/src/math/i386/e_remainder.s b/src/math/i386/e_remainder.s index b7ff3ef8..36d55f98 100644 --- a/src/math/i386/e_remainder.s +++ b/src/math/i386/e_remainder.s @@ -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) diff --git a/src/math/i386/e_sqrt.s b/src/math/i386/e_sqrt.s index 11314dca..c6e55303 100644 --- a/src/math/i386/e_sqrt.s +++ b/src/math/i386/e_sqrt.s @@ -1,4 +1,5 @@ .global sqrt +.type sqrt,@function sqrt: fldl 4(%esp) fsqrt ret diff --git a/src/math/i386/e_sqrtf.s b/src/math/i386/e_sqrtf.s index 015e24cd..b79bd949 100644 --- a/src/math/i386/e_sqrtf.s +++ b/src/math/i386/e_sqrtf.s @@ -1,4 +1,5 @@ .global sqrtf +.type sqrtf,@function sqrtf: flds 4(%esp) fsqrt ret diff --git a/src/math/i386/s_fabs.s b/src/math/i386/s_fabs.s index 10c70f37..d66ea9a1 100644 --- a/src/math/i386/s_fabs.s +++ b/src/math/i386/s_fabs.s @@ -1,4 +1,5 @@ .global fabs +.type fabs,@function fabs: fldl 4(%esp) fabs diff --git a/src/math/i386/s_fabsf.s b/src/math/i386/s_fabsf.s index 45442699..a981c422 100644 --- a/src/math/i386/s_fabsf.s +++ b/src/math/i386/s_fabsf.s @@ -1,4 +1,5 @@ .global fabsf +.type fabsf,@function fabsf: flds 4(%esp) fabs diff --git a/src/math/i386/s_rint.s b/src/math/i386/s_rint.s index 5ba4ab4a..bb99a11c 100644 --- a/src/math/i386/s_rint.s +++ b/src/math/i386/s_rint.s @@ -1,4 +1,5 @@ .global rint +.type rint,@function rint: fldl 4(%esp) frndint diff --git a/src/math/i386/s_rintf.s b/src/math/i386/s_rintf.s index d7aacd8f..bce4c5a6 100644 --- a/src/math/i386/s_rintf.s +++ b/src/math/i386/s_rintf.s @@ -1,4 +1,5 @@ .global rintf +.type rintf,@function rintf: flds 4(%esp) frndint diff --git a/src/math/i386/s_scalbln.s b/src/math/i386/s_scalbln.s index bd022b46..2641e694 100644 --- a/src/math/i386/s_scalbln.s +++ b/src/math/i386/s_scalbln.s @@ -1,6 +1,9 @@ .global ldexp .global scalbn .global scalbln +.type ldexp,@function +.type scalbn,@function +.type scalbln,@function ldexp: scalbn: scalbln: diff --git a/src/math/i386/s_scalblnf.s b/src/math/i386/s_scalblnf.s index 379ec919..775765a3 100644 --- a/src/math/i386/s_scalblnf.s +++ b/src/math/i386/s_scalblnf.s @@ -1,6 +1,9 @@ .global ldexpf .global scalbnf .global scalblnf +.type ldexpf,@function +.type scalbnf,@function +.type scalblnf,@function ldexpf: scalbnf: scalblnf: diff --git a/src/math/i386/s_trunc.s b/src/math/i386/s_trunc.s index 0773891a..bdd6ab4c 100644 --- a/src/math/i386/s_trunc.s +++ b/src/math/i386/s_trunc.s @@ -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 -- 2.25.1