• Elias Naur's avatar
    runtime,runtime/cgo: save callee-saved FP register on arm · 72eb46c5
    Elias Naur authored
    Other GOARCHs already handle their callee-saved FP registers, but
    arm was missing. Without this change, code using Cgo and floating
    point code might fail in mysterious and hard to debug ways.
    
    There are no floating point registers when GOARM=5, so skip the
    registers when runtime.goarm < 6.
    
    darwin/arm doesn't support GOARM=5, so the check is left out of
    rt0_darwin_arm.s.
    
    Fixes #14876
    
    Change-Id: I6bcb90a76df3664d8ba1f33123a74b1eb2c9f8b2
    Reviewed-on: https://go-review.googlesource.com/23140
    Run-TryBot: Elias Naur <elias.naur@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMinux Ma <minux@golang.org>
    72eb46c5
rt0_darwin_arm.s 2.39 KB