1
0
mirror of https://github.com/golang/go synced 2024-09-24 09:20:15 -06: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
var regNamesAMD64 = []string{
".AX",
".CX",
".DX",
".BX",
".SP",
".BP",
".SI",
".DI",
".R8",
".R9",
".R10",
".R11",
".R12",
".R13",
".R14",
".R15",
".X0",
".X1",
".X2",
".X3",
".X4",
".X5",
".X6",
".X7",
".X8",
".X9",
".X10",
".X11",
".X12",
".X13",
".X14",
".X15",
"AX",
"CX",
"DX",
"BX",
"SP",
"BP",
"SI",
"DI",
"R8",
"R9",
"R10",
"R11",
"R12",
"R13",
"R14",
"R15",
"X0",
"X1",
"X2",
"X3",
"X4",
"X5",
"X6",
"X7",
"X8",
"X9",
"X10",
"X11",
"X12",
"X13",
"X14",
"X15",
// pseudo-registers
".SB",
".FLAGS",
"SB",
"FLAGS",
}
func init() {
@ -53,10 +53,7 @@ func init() {
}
num := map[string]int{}
for i, name := range regNamesAMD64 {
if name[0] != '.' {
panic("register name " + name + " does not start with '.'")
}
num[name[1:]] = i
num[name] = i
}
buildReg := func(s string) regMask {
m := regMask(0)

File diff suppressed because it is too large Load Diff