Commit 78f6622b authored by Dave Cheney's avatar Dave Cheney Committed by Brad Fitzpatrick

cmd/internal/obj/*: rename Rconv to rconv

Each architecture's Rconv function is only used inside its
respective package, so it does not need to be exported.

Change-Id: Ifbd629964d7a9edd66501d7cdf4750621d66d646
Reviewed-on: https://go-review.googlesource.com/39110
Run-TryBot: Dave Cheney <dave@cheney.net>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d96f9cbb
...@@ -36,11 +36,11 @@ import ( ...@@ -36,11 +36,11 @@ import (
) )
func init() { func init() {
obj.RegisterRegister(obj.RBaseARM, MAXREG, Rconv) obj.RegisterRegister(obj.RBaseARM, MAXREG, rconv)
obj.RegisterOpcode(obj.ABaseARM, Anames) obj.RegisterOpcode(obj.ABaseARM, Anames)
} }
func Rconv(r int) string { func rconv(r int) string {
if r == 0 { if r == 0 {
return "NONE" return "NONE"
} }
......
...@@ -55,11 +55,11 @@ var strcond = [16]string{ ...@@ -55,11 +55,11 @@ var strcond = [16]string{
} }
func init() { func init() {
obj.RegisterRegister(obj.RBaseARM64, REG_SPECIAL+1024, Rconv) obj.RegisterRegister(obj.RBaseARM64, REG_SPECIAL+1024, rconv)
obj.RegisterOpcode(obj.ABaseARM64, Anames) obj.RegisterOpcode(obj.ABaseARM64, Anames)
} }
func Rconv(r int) string { func rconv(r int) string {
if r == REGG { if r == REGG {
return "g" return "g"
} }
......
...@@ -35,11 +35,11 @@ import ( ...@@ -35,11 +35,11 @@ import (
) )
func init() { func init() {
obj.RegisterRegister(obj.RBaseMIPS, REG_LAST+1, Rconv) obj.RegisterRegister(obj.RBaseMIPS, REG_LAST+1, rconv)
obj.RegisterOpcode(obj.ABaseMIPS, Anames) obj.RegisterOpcode(obj.ABaseMIPS, Anames)
} }
func Rconv(r int) string { func rconv(r int) string {
if r == 0 { if r == 0 {
return "NONE" return "NONE"
} }
......
...@@ -35,11 +35,11 @@ import ( ...@@ -35,11 +35,11 @@ import (
) )
func init() { func init() {
obj.RegisterRegister(obj.RBasePPC64, REG_DCR0+1024, Rconv) obj.RegisterRegister(obj.RBasePPC64, REG_DCR0+1024, rconv)
obj.RegisterOpcode(obj.ABasePPC64, Anames) obj.RegisterOpcode(obj.ABasePPC64, Anames)
} }
func Rconv(r int) string { func rconv(r int) string {
if r == 0 { if r == 0 {
return "NONE" return "NONE"
} }
......
...@@ -35,11 +35,11 @@ import ( ...@@ -35,11 +35,11 @@ import (
) )
func init() { func init() {
obj.RegisterRegister(obj.RBaseS390X, REG_R0+1024, Rconv) obj.RegisterRegister(obj.RBaseS390X, REG_R0+1024, rconv)
obj.RegisterOpcode(obj.ABaseS390X, Anames) obj.RegisterOpcode(obj.ABaseS390X, Anames)
} }
func Rconv(r int) string { func rconv(r int) string {
if r == 0 { if r == 0 {
return "NONE" return "NONE"
} }
......
...@@ -3207,7 +3207,7 @@ func isax(a *obj.Addr) bool { ...@@ -3207,7 +3207,7 @@ func isax(a *obj.Addr) bool {
func subreg(p *obj.Prog, from int, to int) { func subreg(p *obj.Prog, from int, to int) {
if false { /* debug['Q'] */ if false { /* debug['Q'] */
fmt.Printf("\n%v\ts/%v/%v/\n", p, Rconv(from), Rconv(to)) fmt.Printf("\n%v\ts/%v/%v/\n", p, rconv(from), rconv(to))
} }
if int(p.From.Reg) == from { if int(p.From.Reg) == from {
...@@ -4084,7 +4084,7 @@ func (asmbuf *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) { ...@@ -4084,7 +4084,7 @@ func (asmbuf *AsmBuf) doasm(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) {
r.Off = int32(p.Pc + int64(asmbuf.Len())) r.Off = int32(p.Pc + int64(asmbuf.Len()))
r.Type = obj.R_CALL r.Type = obj.R_CALL
r.Siz = 4 r.Siz = 4
r.Sym = obj.Linklookup(ctxt, "__x86.get_pc_thunk."+strings.ToLower(Rconv(int(dst))), 0) r.Sym = obj.Linklookup(ctxt, "__x86.get_pc_thunk."+strings.ToLower(rconv(int(dst))), 0)
asmbuf.PutInt32(0) asmbuf.PutInt32(0)
asmbuf.Put2(0x8B, byte(2<<6|reg[dst]|(reg[dst]<<3))) asmbuf.Put2(0x8B, byte(2<<6|reg[dst]|(reg[dst]<<3)))
......
...@@ -168,11 +168,11 @@ var Register = []string{ ...@@ -168,11 +168,11 @@ var Register = []string{
} }
func init() { func init() {
obj.RegisterRegister(REG_AL, REG_AL+len(Register), Rconv) obj.RegisterRegister(REG_AL, REG_AL+len(Register), rconv)
obj.RegisterOpcode(obj.ABaseAMD64, Anames) obj.RegisterOpcode(obj.ABaseAMD64, Anames)
} }
func Rconv(r int) string { func rconv(r int) string {
if REG_AL <= r && r-REG_AL < len(Register) { if REG_AL <= r && r-REG_AL < len(Register) {
return Register[r-REG_AL] return Register[r-REG_AL]
} }
......
...@@ -542,7 +542,7 @@ func rewriteToPcrel(ctxt *obj.Link, p *obj.Prog) { ...@@ -542,7 +542,7 @@ func rewriteToPcrel(ctxt *obj.Link, p *obj.Prog) {
r := obj.Appendp(ctxt, q) r := obj.Appendp(ctxt, q)
r.RegTo2 = 1 r.RegTo2 = 1
q.As = obj.ACALL q.As = obj.ACALL
q.To.Sym = obj.Linklookup(ctxt, "__x86.get_pc_thunk."+strings.ToLower(Rconv(int(dst))), 0) q.To.Sym = obj.Linklookup(ctxt, "__x86.get_pc_thunk."+strings.ToLower(rconv(int(dst))), 0)
q.To.Type = obj.TYPE_MEM q.To.Type = obj.TYPE_MEM
q.To.Name = obj.NAME_EXTERN q.To.Name = obj.NAME_EXTERN
q.To.Sym.Set(obj.AttrLocal, true) q.To.Sym.Set(obj.AttrLocal, true)
......
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