Commit c06679f7 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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 <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 214be5b3
...@@ -3029,7 +3029,7 @@ putrelv: ...@@ -3029,7 +3029,7 @@ putrelv:
r := obj.Addrel(ctxt.Cursym) r := obj.Addrel(ctxt.Cursym)
*r = rel *r = rel
r.Off = int32(ctxt.Curp.Pc + int64(asmbuf.Len())) r.Off = int32(p.Pc + int64(asmbuf.Len()))
} }
asmbuf.PutInt32(v) asmbuf.PutInt32(v)
...@@ -3322,8 +3322,6 @@ func (asmbuf *AsmBuf) asmvex(ctxt *obj.Link, rm, v, r *obj.Addr, vex, opcode uin ...@@ -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) { func (asmbuf *AsmBuf) doasm(ctxt *obj.Link, p *obj.Prog) {
ctxt.Curp = p // TODO
o := opindex[p.As&obj.AMask] o := opindex[p.As&obj.AMask]
if o == nil { if o == nil {
......
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