aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/ppc64
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/cmd/internal/obj/ppc64
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/cmd/internal/obj/ppc64')
-rw-r--r--src/cmd/internal/obj/ppc64/a.out.go41
1 files changed, 18 insertions, 23 deletions
diff --git a/src/cmd/internal/obj/ppc64/a.out.go b/src/cmd/internal/obj/ppc64/a.out.go
index 6b5bfde8f1..e1e624d962 100644
--- a/src/cmd/internal/obj/ppc64/a.out.go
+++ b/src/cmd/internal/obj/ppc64/a.out.go
@@ -132,29 +132,24 @@ const (
REG_LR = REG_SPR0 + 8
REG_CTR = REG_SPR0 + 9
- REGZERO = REG_R0 /* set to zero */
- REGSP = REG_R1
- REGSB = REG_R2
- REGRET = REG_R3
- REGARG = -1 /* -1 disables passing the first argument in register */
- REGRT1 = REG_R3 /* reserved for runtime, duffzero and duffcopy */
- REGRT2 = REG_R4 /* reserved for runtime, duffcopy */
- REGMIN = REG_R7 /* register variables allocated from here to REGMAX */
- REGCTXT = REG_R11 /* context for closures */
- REGTLS = REG_R13 /* C ABI TLS base pointer */
- REGMAX = REG_R27
- REGEXT = REG_R30 /* external registers allocated from here down */
- REGG = REG_R30 /* G */
- REGTMP = REG_R31 /* used by the linker */
- FREGRET = REG_F0
- FREGMIN = REG_F17 /* first register variable */
- FREGMAX = REG_F26 /* last register variable for 9g only */
- FREGEXT = REG_F26 /* first external register */
- FREGCVI = REG_F27 /* floating conversion constant */
- FREGZERO = REG_F28 /* both float and double */
- FREGHALF = REG_F29 /* double */
- FREGONE = REG_F30 /* double */
- FREGTWO = REG_F31 /* double */
+ REGZERO = REG_R0 /* set to zero */
+ REGSP = REG_R1
+ REGSB = REG_R2
+ REGRET = REG_R3
+ REGARG = -1 /* -1 disables passing the first argument in register */
+ REGRT1 = REG_R3 /* reserved for runtime, duffzero and duffcopy */
+ REGRT2 = REG_R4 /* reserved for runtime, duffcopy */
+ REGMIN = REG_R7 /* register variables allocated from here to REGMAX */
+ REGCTXT = REG_R11 /* context for closures */
+ REGTLS = REG_R13 /* C ABI TLS base pointer */
+ REGMAX = REG_R27
+ REGEXT = REG_R30 /* external registers allocated from here down */
+ REGG = REG_R30 /* G */
+ REGTMP = REG_R31 /* used by the linker */
+ FREGRET = REG_F0
+ FREGMIN = REG_F17 /* first register variable */
+ FREGMAX = REG_F26 /* last register variable for 9g only */
+ FREGEXT = REG_F26 /* first external register */
)
/*