Commit 1b6d55ac authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

cmd/internal/obj/mips, cmd/internal/obj: reduce MIPS register space

Change-Id: I43458ce0e78ffc3d0943d28dc8df8e1c9e4cf679
Reviewed-on: https://go-review.googlesource.com/18821Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent a4599efc
...@@ -114,7 +114,7 @@ const ( ...@@ -114,7 +114,7 @@ const (
REG_LO REG_LO
// co-processor 0 control registers // co-processor 0 control registers
REG_M0 = obj.RBaseMIPS64 + 1024 + iota REG_M0
REG_M1 REG_M1
REG_M2 REG_M2
REG_M3 REG_M3
...@@ -148,7 +148,7 @@ const ( ...@@ -148,7 +148,7 @@ const (
REG_M31 REG_M31
// FPU control registers // FPU control registers
REG_FCR0 = obj.RBaseMIPS64 + 2048 + iota REG_FCR0
REG_FCR1 REG_FCR1
REG_FCR2 REG_FCR2
REG_FCR3 REG_FCR3
...@@ -181,6 +181,8 @@ const ( ...@@ -181,6 +181,8 @@ const (
REG_FCR30 REG_FCR30
REG_FCR31 REG_FCR31
REG_LAST = REG_FCR31 // the last defined register
REG_SPECIAL = REG_M0 REG_SPECIAL = REG_M0
REGZERO = REG_R0 /* set to zero */ REGZERO = REG_R0 /* set to zero */
......
...@@ -35,7 +35,7 @@ import ( ...@@ -35,7 +35,7 @@ import (
) )
func init() { func init() {
obj.RegisterRegister(obj.RBaseMIPS64, REG_FCR0+1024, Rconv) obj.RegisterRegister(obj.RBaseMIPS64, REG_LAST&^1023+1024, Rconv)
obj.RegisterOpcode(obj.ABaseMIPS64, Anames) obj.RegisterOpcode(obj.ABaseMIPS64, Anames)
} }
......
...@@ -529,7 +529,7 @@ const ( ...@@ -529,7 +529,7 @@ const (
RBaseARM = 3 * 1024 RBaseARM = 3 * 1024
RBasePPC64 = 4 * 1024 // range [4k, 8k) RBasePPC64 = 4 * 1024 // range [4k, 8k)
RBaseARM64 = 8 * 1024 // range [8k, 13k) RBaseARM64 = 8 * 1024 // range [8k, 13k)
RBaseMIPS64 = 13 * 1024 // range [13k, 16k) RBaseMIPS64 = 13 * 1024 // range [13k, 14k)
) )
// RegisterRegister binds a pretty-printer (Rconv) for register // RegisterRegister binds a pretty-printer (Rconv) for register
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment