From: Josh Bleecher Snyder Date: Sun, 26 Mar 2017 19:47:20 +0000 (-0700) Subject: cmd/internal/obj/x86: change AsmBuf.Lock to bool X-Git-Tag: go1.9beta1~966 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4909ecc46266b5afa121ef5f29382172188dbc36;p=gostls13.git cmd/internal/obj/x86: change AsmBuf.Lock to bool Follow-up to CL 38668. Passes toolstash-check -all. Change-Id: I78a62509c610b5184b5e7ef2c4aa146fc8038840 Reviewed-on: https://go-review.googlesource.com/38670 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Dave Cheney --- diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index 8754b1bcb5..fff17e5b75 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -2577,7 +2577,7 @@ type AsmBuf struct { vexflag int rep int repn int - lock int + lock bool } // Put1 appends one byte to the end of the buffer. @@ -4477,7 +4477,7 @@ func (asmbuf *AsmBuf) asmins(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) { } if p.As == ALOCK { - asmbuf.lock++ + asmbuf.lock = true return } @@ -4539,9 +4539,9 @@ func (asmbuf *AsmBuf) asmins(ctxt *obj.Link, cursym *obj.LSym, p *obj.Prog) { asmbuf.repn = 0 } - if asmbuf.lock != 0 { + if asmbuf.lock { asmbuf.Put1(0xf0) - asmbuf.lock = 0 + asmbuf.lock = false } }