• Cherry Zhang's avatar
    all: use new softfloat on GOARM=5 · b08a9b7e
    Cherry Zhang authored
    Use the new softfloat support in the compiler, originally added
    for softfloat on MIPS. This support is portable, so we can just
    use it for softfloat on ARM.
    
    In the old softfloat support on ARM, the compiler generates
    floating point instructions, then the assembler inserts calls
    to _sfloat before FP instructions. _sfloat decodes the following
    FP instructions and simulates them.
    
    In the new scheme, the compiler generates runtime calls to do FP
    operations at a higher level. It doesn't generate FP instructions,
    and therefore the assembler won't insert _sfloat calls, i.e. the
    old mechanism is automatically suppressed.
    
    The old method may be still be triggered with assembly code
    using FP instructions. In the standard library, the only
    occurance is math/sqrt_arm.s, which is rewritten to call to the
    Go implementation instead.
    
    Some significant speedups for code using floating points:
    
    name                     old time/op    new time/op     delta
    BinaryTree17-4              37.1s ± 2%      37.3s ± 1%     ~     (p=0.105 n=10+10)
    Fannkuch11-4                13.0s ± 0%      13.1s ± 0%   +0.46%  (p=0.000 n=10+10)
    FmtFprintfEmpty-4           700ns ± 4%      734ns ± 6%   +4.84%  (p=0.009 n=10+10)
    FmtFprintfString-4         1.22µs ± 3%     1.22µs ± 4%     ~     (p=0.897 n=10+10)
    FmtFprintfInt-4            1.27µs ± 2%     1.30µs ± 1%   +1.91%  (p=0.001 n=10+9)
    FmtFprintfIntInt-4         1.83µs ± 2%     1.81µs ± 3%     ~     (p=0.149 n=10+10)
    FmtFprintfPrefixedInt-4    1.80µs ± 3%     1.81µs ± 2%     ~     (p=0.421 n=10+8)
    FmtFprintfFloat-4          6.89µs ± 3%     3.59µs ± 2%  -47.93%  (p=0.000 n=10+10)
    FmtManyArgs-4              6.39µs ± 1%     6.09µs ± 1%   -4.61%  (p=0.000 n=10+9)
    GobDecode-4                 109ms ± 2%       81ms ± 2%  -25.99%  (p=0.000 n=9+10)
    GobEncode-4                 109ms ± 2%       76ms ± 2%  -29.88%  (p=0.000 n=10+9)
    Gzip-4                      3.61s ± 1%      3.59s ± 1%     ~     (p=0.247 n=10+10)
    Gunzip-4                    449ms ± 4%      450ms ± 1%     ~     (p=0.230 n=10+7)
    HTTPClientServer-4         1.55ms ± 3%     1.53ms ± 2%     ~     (p=0.400 n=9+10)
    JSONEncode-4                356ms ± 1%      183ms ± 1%  -48.73%  (p=0.000 n=10+10)
    JSONDecode-4                1.12s ± 2%      0.87s ± 1%  -21.88%  (p=0.000 n=10+10)
    Mandelbrot200-4             5.49s ± 1%      2.55s ± 1%  -53.45%  (p=0.000 n=9+10)
    GoParse-4                  49.6ms ± 2%     47.5ms ± 1%   -4.08%  (p=0.000 n=10+9)
    RegexpMatchEasy0_32-4      1.13µs ± 4%     1.20µs ± 4%   +6.42%  (p=0.000 n=10+10)
    RegexpMatchEasy0_1K-4      4.41µs ± 2%     4.44µs ± 2%     ~     (p=0.128 n=10+10)
    RegexpMatchEasy1_32-4      1.15µs ± 5%     1.20µs ± 5%   +4.85%  (p=0.002 n=10+10)
    RegexpMatchEasy1_1K-4      6.21µs ± 2%     6.37µs ± 4%   +2.62%  (p=0.001 n=9+10)
    RegexpMatchMedium_32-4     1.58µs ± 5%     1.65µs ± 3%   +4.85%  (p=0.000 n=10+10)
    RegexpMatchMedium_1K-4      341µs ± 3%      351µs ± 7%     ~     (p=0.573 n=8+10)
    RegexpMatchHard_32-4       21.4µs ± 3%     21.5µs ± 5%     ~     (p=0.931 n=9+9)
    RegexpMatchHard_1K-4        626µs ± 2%      626µs ± 1%     ~     (p=0.645 n=8+8)
    Revcomp-4                  46.4ms ± 2%     47.4ms ± 2%   +2.07%  (p=0.000 n=10+10)
    Template-4                  1.31s ± 3%      1.23s ± 4%   -6.13%  (p=0.000 n=10+10)
    TimeParse-4                4.49µs ± 1%     4.41µs ± 2%   -1.81%  (p=0.000 n=10+9)
    TimeFormat-4               9.31µs ± 1%     9.32µs ± 2%     ~     (p=0.561 n=9+9)
    
    Change-Id: Iaeeff6c9a09c1b2c064d06e09dd88101dc02bfa4
    Reviewed-on: https://go-review.googlesource.com/106735Reviewed-by: 's avatarAustin Clements <austin@google.com>
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    b08a9b7e
Name
Last commit
Last update
..
big Loading commit data...
bits Loading commit data...
cmplx Loading commit data...
rand Loading commit data...
abs.go Loading commit data...
acos_s390x.s Loading commit data...
acosh.go Loading commit data...
acosh_s390x.s Loading commit data...
all_test.go Loading commit data...
arith_s390x.go Loading commit data...
arith_s390x_test.go Loading commit data...
asin.go Loading commit data...
asin_386.s Loading commit data...
asin_amd64.s Loading commit data...
asin_amd64p32.s Loading commit data...
asin_arm.s Loading commit data...
asin_s390x.s Loading commit data...
asinh.go Loading commit data...
asinh_s390x.s Loading commit data...
asinh_stub.s Loading commit data...
atan.go Loading commit data...
atan2.go Loading commit data...
atan2_386.s Loading commit data...
atan2_amd64.s Loading commit data...
atan2_amd64p32.s Loading commit data...
atan2_arm.s Loading commit data...
atan2_s390x.s Loading commit data...
atan_386.s Loading commit data...
atan_amd64.s Loading commit data...
atan_amd64p32.s Loading commit data...
atan_arm.s Loading commit data...
atan_s390x.s Loading commit data...
atanh.go Loading commit data...
atanh_s390x.s Loading commit data...
bits.go Loading commit data...
cbrt.go Loading commit data...
cbrt_s390x.s Loading commit data...
cbrt_stub.s Loading commit data...
const.go Loading commit data...
copysign.go Loading commit data...
cosh_s390x.s Loading commit data...
dim.go Loading commit data...
dim_386.s Loading commit data...
dim_amd64.s Loading commit data...
dim_amd64p32.s Loading commit data...
dim_arm.s Loading commit data...
dim_arm64.s Loading commit data...
dim_s390x.s Loading commit data...
erf.go Loading commit data...
erf_s390x.s Loading commit data...
erf_stub.s Loading commit data...
erfc_s390x.s Loading commit data...
erfinv.go Loading commit data...
example_test.go Loading commit data...
exp.go Loading commit data...
exp2_386.s Loading commit data...
exp2_amd64.s Loading commit data...
exp2_amd64p32.s Loading commit data...
exp2_arm.s Loading commit data...
exp_386.s Loading commit data...
exp_amd64.s Loading commit data...
exp_amd64p32.s Loading commit data...
exp_arm.s Loading commit data...
exp_arm64.s Loading commit data...
exp_asm.go Loading commit data...
exp_s390x.s Loading commit data...
expm1.go Loading commit data...
expm1_386.s Loading commit data...
expm1_amd64.s Loading commit data...
expm1_amd64p32.s Loading commit data...
expm1_arm.s Loading commit data...
expm1_s390x.s Loading commit data...
export_s390x_test.go Loading commit data...
export_test.go Loading commit data...
floor.go Loading commit data...
floor_386.s Loading commit data...
floor_amd64.s Loading commit data...
floor_amd64p32.s Loading commit data...
floor_arm.s Loading commit data...
floor_arm64.s Loading commit data...
floor_ppc64x.s Loading commit data...
floor_s390x.s Loading commit data...
frexp.go Loading commit data...
frexp_386.s Loading commit data...
frexp_amd64.s Loading commit data...
frexp_amd64p32.s Loading commit data...
frexp_arm.s Loading commit data...
gamma.go Loading commit data...
hypot.go Loading commit data...
hypot_386.s Loading commit data...
hypot_amd64.s Loading commit data...
hypot_amd64p32.s Loading commit data...
hypot_arm.s Loading commit data...
j0.go Loading commit data...
j1.go Loading commit data...
jn.go Loading commit data...
ldexp.go Loading commit data...
ldexp_386.s Loading commit data...
ldexp_amd64.s Loading commit data...
ldexp_amd64p32.s Loading commit data...
ldexp_arm.s Loading commit data...
lgamma.go Loading commit data...
log.go Loading commit data...
log10.go Loading commit data...
log10_386.s Loading commit data...
log10_amd64.s Loading commit data...
log10_amd64p32.s Loading commit data...
log10_arm.s Loading commit data...
log10_s390x.s Loading commit data...
log1p.go Loading commit data...
log1p_386.s Loading commit data...
log1p_amd64.s Loading commit data...
log1p_amd64p32.s Loading commit data...
log1p_arm.s Loading commit data...
log1p_s390x.s Loading commit data...
log_386.s Loading commit data...
log_amd64.s Loading commit data...
log_amd64p32.s Loading commit data...
log_arm.s Loading commit data...
log_s390x.s Loading commit data...
logb.go Loading commit data...
mod.go Loading commit data...
mod_386.s Loading commit data...
mod_amd64.s Loading commit data...
mod_amd64p32.s Loading commit data...
mod_arm.s Loading commit data...
modf.go Loading commit data...
modf_386.s Loading commit data...
modf_amd64.s Loading commit data...
modf_amd64p32.s Loading commit data...
modf_arm.s Loading commit data...
modf_arm64.s Loading commit data...
modf_ppc64x.s Loading commit data...
nextafter.go Loading commit data...
pow.go Loading commit data...
pow10.go Loading commit data...
pow_s390x.s Loading commit data...
pow_stub.s Loading commit data...
remainder.go Loading commit data...
remainder_386.s Loading commit data...
remainder_amd64.s Loading commit data...
remainder_amd64p32.s Loading commit data...
remainder_arm.s Loading commit data...
signbit.go Loading commit data...
sin.go Loading commit data...
sin_386.s Loading commit data...
sin_amd64.s Loading commit data...
sin_amd64p32.s Loading commit data...
sin_arm.s Loading commit data...
sin_s390x.s Loading commit data...
sincos.go Loading commit data...
sincos_386.go Loading commit data...
sincos_386.s Loading commit data...
sinh.go Loading commit data...
sinh_s390x.s Loading commit data...
sinh_stub.s Loading commit data...
sqrt.go Loading commit data...
sqrt_386.s Loading commit data...
sqrt_amd64.s Loading commit data...
sqrt_amd64p32.s Loading commit data...
sqrt_arm.s Loading commit data...
sqrt_arm64.s Loading commit data...
sqrt_mipsx.s Loading commit data...
sqrt_ppc64x.s Loading commit data...
sqrt_s390x.s Loading commit data...
stubs_arm64.s Loading commit data...
stubs_mips64x.s Loading commit data...
stubs_mipsx.s Loading commit data...
stubs_ppc64x.s Loading commit data...
stubs_s390x.s Loading commit data...
tan.go Loading commit data...
tan_386.s Loading commit data...
tan_amd64.s Loading commit data...
tan_amd64p32.s Loading commit data...
tan_arm.s Loading commit data...
tan_s390x.s Loading commit data...
tanh.go Loading commit data...
tanh_s390x.s Loading commit data...
unsafe.go Loading commit data...