]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/x86: change AsmBuf.Lock to bool
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 26 Mar 2017 19:47:20 +0000 (12:47 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 26 Mar 2017 21:29:31 +0000 (21:29 +0000)
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 <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/internal/obj/x86/asm6.go

index 8754b1bcb567e082608c4fa5d32e99e7fc7a1212..fff17e5b75f47b6516263c5e72d44824339c71b7 100644 (file)
@@ -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
                }
        }