Commit 7177cb9f authored by Keith Randall's avatar Keith Randall

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/21001Reviewed-by: default avatarMinux Ma <minux@golang.org>
parent c12e1b0b
...@@ -8,42 +8,42 @@ import "strings" ...@@ -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() { ...@@ -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)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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