1
0
mirror of https://github.com/golang/go synced 2024-11-23 22:50:05 -07:00

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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Dave Cheney 2017-03-29 14:21:50 +11:00 committed by Brad Fitzpatrick
parent d96f9cbb87
commit 78f6622b81
8 changed files with 15 additions and 15 deletions

View File

@ -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"
} }

View File

@ -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"
} }

View File

@ -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"
} }

View File

@ -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"
} }

View File

@ -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"
} }

View File

@ -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) {
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)))

View File

@ -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]
} }

View File

@ -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)