]> Cypherpunks repositories - gostls13.git/commit
runtime,runtime/cgo: save callee-saved FP register on arm
authorElias Naur <elias.naur@gmail.com>
Mon, 16 May 2016 13:51:07 +0000 (15:51 +0200)
committerElias Naur <elias.naur@gmail.com>
Wed, 25 May 2016 06:54:28 +0000 (06:54 +0000)
commit72eb46c5a086051e3677579a0810922724eb6a6d
tree511b1c4afd76a504a3e69bfbb927ed6f89357ace
parentfa3f484800415662cc741bbb8968ebb72896e20a
runtime,runtime/cgo: save callee-saved FP register on arm

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: Minux Ma <minux@golang.org>
src/runtime/cgo/asm_arm.s
src/runtime/rt0_darwin_arm.s
src/runtime/rt0_linux_arm.s