1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:20:22 -07:00

cmd/compile: remove dots from register names

They are kind of useless and are cluttering up
https://go-review.googlesource.com/c/21000/

Change-Id: Iafdec75ada11c7ebdc40540d251fdc514bb00d3d
Reviewed-on: https://go-review.googlesource.com/21001
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
Keith Randall 2016-03-22 09:43:28 -07:00
parent c12e1b0b2e
commit 7177cb9fa4
2 changed files with 693 additions and 696 deletions

View File

@ -8,42 +8,42 @@ import "strings"
// copied from ../../amd64/reg.go // copied from ../../amd64/reg.go
var regNamesAMD64 = []string{ var regNamesAMD64 = []string{
".AX", "AX",
".CX", "CX",
".DX", "DX",
".BX", "BX",
".SP", "SP",
".BP", "BP",
".SI", "SI",
".DI", "DI",
".R8", "R8",
".R9", "R9",
".R10", "R10",
".R11", "R11",
".R12", "R12",
".R13", "R13",
".R14", "R14",
".R15", "R15",
".X0", "X0",
".X1", "X1",
".X2", "X2",
".X3", "X3",
".X4", "X4",
".X5", "X5",
".X6", "X6",
".X7", "X7",
".X8", "X8",
".X9", "X9",
".X10", "X10",
".X11", "X11",
".X12", "X12",
".X13", "X13",
".X14", "X14",
".X15", "X15",
// pseudo-registers // pseudo-registers
".SB", "SB",
".FLAGS", "FLAGS",
} }
func init() { func init() {
@ -53,10 +53,7 @@ func init() {
} }
num := map[string]int{} num := map[string]int{}
for i, name := range regNamesAMD64 { for i, name := range regNamesAMD64 {
if name[0] != '.' { num[name] = i
panic("register name " + name + " does not start with '.'")
}
num[name[1:]] = i
} }
buildReg := func(s string) regMask { buildReg := func(s string) regMask {
m := regMask(0) m := regMask(0)

File diff suppressed because it is too large Load Diff