• David Chase's avatar
    [dev.ssa] cmd/compile: use 32-bit load to read writebarrier · 8107b001
    David Chase authored
    Avoid targeting a partial register with load;
    ensure source of load (writebarrier) is aligned.
    
    Better yet would be "CMPB $1,writebarrier" but that requires
    wrestling with flagalloc (mem operand complicates moving
    instruction around).
    
    Didn't see a change in time for
       benchcmd -n 10 Build go build net/http
    
    Verified that we clean the code up properly:
       0x20a8 <main.main+104>:	mov    0xc30a2(%rip),%eax
                                # 0xc5150 <runtime.writeBarrier>
       0x20ae <main.main+110>:	test   %al,%al
    
    Change-Id: Id5fb8c260eaec27bd727cb0ae1476c60343b0986
    Reviewed-on: https://go-review.googlesource.com/19998Reviewed-by: default avatarKeith Randall <khr@golang.org>
    8107b001
ssa.go 153 KB