aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/mips
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/mips
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/mips')
-rw-r--r--src/cmd/internal/obj/mips/a.out.go28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/cmd/internal/obj/mips/a.out.go b/src/cmd/internal/obj/mips/a.out.go
index bc6b69df8d..eab65dda51 100644
--- a/src/cmd/internal/obj/mips/a.out.go
+++ b/src/cmd/internal/obj/mips/a.out.go
@@ -185,22 +185,18 @@ const (
REG_SPECIAL = REG_M0
- REGZERO = REG_R0 /* set to zero */
- REGSP = REG_R29
- REGSB = REG_R28
- REGLINK = REG_R31
- REGRET = REG_R1
- REGARG = -1 /* -1 disables passing the first argument in register */
- REGRT1 = REG_R1 /* reserved for runtime, duffzero and duffcopy */
- REGRT2 = REG_R2 /* reserved for runtime, duffcopy */
- REGCTXT = REG_R22 /* context for closures */
- REGG = REG_R30 /* G */
- REGTMP = REG_R23 /* used by the linker */
- FREGRET = REG_F0
- FREGZERO = REG_F24 /* both float and double */
- FREGHALF = REG_F26 /* double */
- FREGONE = REG_F28 /* double */
- FREGTWO = REG_F30 /* double */
+ REGZERO = REG_R0 /* set to zero */
+ REGSP = REG_R29
+ REGSB = REG_R28
+ REGLINK = REG_R31
+ REGRET = REG_R1
+ REGARG = -1 /* -1 disables passing the first argument in register */
+ REGRT1 = REG_R1 /* reserved for runtime, duffzero and duffcopy */
+ REGRT2 = REG_R2 /* reserved for runtime, duffcopy */
+ REGCTXT = REG_R22 /* context for closures */
+ REGG = REG_R30 /* G */
+ REGTMP = REG_R23 /* used by the linker */
+ FREGRET = REG_F0
)
const (