aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cgo
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2016-08-30 14:46:25 -0400
committerCherry Zhang <cherryyz@google.com>2016-08-30 23:16:17 +0000
commitf9dafc742d7c0e892b6e4ff17cb9ec7165887e44 (patch)
treedb0e07eccf2addc770143a7e3c7e389cb5a52d2a /src/runtime/cgo
parentb2e0e9688a512970ea8d270238c8ff3bbf85cbe1 (diff)
downloadgo-f9dafc742d7c0e892b6e4ff17cb9ec7165887e44.tar.xz
cmd/compile, runtime, etc: get rid of constant FP registers
On ARM64, MIPS64, and PPC64, some floating point registers were reserved for constants 0, 1, 2, 0.5, etc. This CL removes them. On ARM64, they are never used. On MIPS64 and PPC64, the only use case is a multiplication-by-2 in the old backend of the compiler, which is replaced with an addition. Change-Id: I737cbf43283756e3408964fc88c567a938c57036 Reviewed-on: https://go-review.googlesource.com/28095 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/cgo')
-rw-r--r--src/runtime/cgo/asm_arm64.s1
-rw-r--r--src/runtime/cgo/asm_mips64x.s1
-rw-r--r--src/runtime/cgo/gcc_mips64x.S3
3 files changed, 0 insertions, 5 deletions
diff --git a/src/runtime/cgo/asm_arm64.s b/src/runtime/cgo/asm_arm64.s
index e55a70fe64..925e930248 100644
--- a/src/runtime/cgo/asm_arm64.s
+++ b/src/runtime/cgo/asm_arm64.s
@@ -43,7 +43,6 @@ TEXT crosscall2(SB),NOSPLIT,$-8
MOVD R0, R19
// Initialize Go ABI environment
- BL runtime·reginit(SB)
BL runtime·load_g(SB)
BL (R19)
diff --git a/src/runtime/cgo/asm_mips64x.s b/src/runtime/cgo/asm_mips64x.s
index 19e901443e..06439cf36a 100644
--- a/src/runtime/cgo/asm_mips64x.s
+++ b/src/runtime/cgo/asm_mips64x.s
@@ -46,7 +46,6 @@ TEXT crosscall2(SB),NOSPLIT,$-8
BGEZAL R0, 1(PC)
SRLV $32, R31, RSB
SLLV $32, RSB
- JAL runtime·reginit(SB)
JAL runtime·load_g(SB)
JAL (R4)
diff --git a/src/runtime/cgo/gcc_mips64x.S b/src/runtime/cgo/gcc_mips64x.S
index adeb7aee8c..e0a1043009 100644
--- a/src/runtime/cgo/gcc_mips64x.S
+++ b/src/runtime/cgo/gcc_mips64x.S
@@ -35,8 +35,6 @@ crosscall1:
sdc1 $f30, 136($29)
sdc1 $f31, 144($29)
- dla $23,_cgo_reginit
-
// prepare SB register = pc & 0xffffffff00000000
bal 1f
1:
@@ -44,7 +42,6 @@ crosscall1:
dsll $28, $28, 32
move $20, $4 // save R4
- jalr $23 // call _cgo_reginit, set up Go ABI constant registers
move $1, $6
jalr $5 // call setg_gcc (clobbers R4)
jalr $20 // call fn