Passes toolstash -cmp.
Change-Id: Id504e71ed1f23900e24a9aed25143c94f4d7d50c
Reviewed-on: https://go-review.googlesource.com/21899
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
func oplook(ctxt *obj.Link, p *obj.Prog) *Optab {
a1 := int(p.Optab)
if a1 != 0 {
- return &optab[a1-1:][0]
+ return &optab[a1-1]
}
a1 = int(p.From.Class)
if a1 == 0 {
a1 := int(p.Optab)
if a1 != 0 {
- return &optab[a1-1:][0]
+ return &optab[a1-1]
}
a1 = int(p.From.Class)
if a1 == 0 {
func oplook(ctxt *obj.Link, p *obj.Prog) *Optab {
a1 := int(p.Optab)
if a1 != 0 {
- return &optab[a1-1:][0]
+ return &optab[a1-1]
}
a1 = int(p.From.Class)
if a1 == 0 {
}
n := ctxt.AsmBuf.Len()
- var r *obj.Reloc
for i := len(ctxt.Cursym.R) - 1; i >= 0; i-- {
- r = &ctxt.Cursym.R[i:][0]
+ r := &ctxt.Cursym.R[i]
if int64(r.Off) < p.Pc {
break
}
// ../gc/reflect.c stuffs in these.
func decode_reloc(s *LSym, off int32) *Reloc {
- for i := 0; i < len(s.R); i++ {
+ for i := range s.R {
if s.R[i].Off == off {
- return &s.R[i:][0]
+ return &s.R[i]
}
}
return nil
if sym.sym == nil {
continue
}
- sect = &elfobj.sect[sym.shndx:][0]
+ sect = &elfobj.sect[sym.shndx]
if sect.sym == nil {
if strings.HasPrefix(sym.name, ".Linfo_string") { // clang does this
continue