From: Josh Bleecher Snyder Date: Sun, 26 Mar 2017 04:09:16 +0000 (-0700) Subject: cmd/internal/obj/x86: remove ctxt.Curp references X-Git-Tag: go1.9beta1~970 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c06679f7b5101781d6b8e36cf884568243b539ce;p=gostls13.git cmd/internal/obj/x86: remove ctxt.Curp references Empirically, p == ctxt.Curp here. A scan of (the thousands of lines of) asm6.go shows no clear opportunity for them to diverge. Passes toolstash-check -all. Updates #15756 Change-Id: I9f5ee9585a850fbe24be3b851d8fdc2c966c65ce Reviewed-on: https://go-review.googlesource.com/38665 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index 3fc998e295..f048957663 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -3029,7 +3029,7 @@ putrelv: r := obj.Addrel(ctxt.Cursym) *r = rel - r.Off = int32(ctxt.Curp.Pc + int64(asmbuf.Len())) + r.Off = int32(p.Pc + int64(asmbuf.Len())) } asmbuf.PutInt32(v) @@ -3322,8 +3322,6 @@ func (asmbuf *AsmBuf) asmvex(ctxt *obj.Link, rm, v, r *obj.Addr, vex, opcode uin } func (asmbuf *AsmBuf) doasm(ctxt *obj.Link, p *obj.Prog) { - ctxt.Curp = p // TODO - o := opindex[p.As&obj.AMask] if o == nil {