diff options
author | Cherry Zhang <cherryyz@google.com> | 2017-01-13 15:42:50 -0500 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2017-01-16 18:27:48 +0000 |
commit | 92ecd7893308ad222bfdd33b10be1cce769a3cdf (patch) | |
tree | ec462d9799864f99262de3aa57474de54ce92276 | |
parent | 787125abab968ed681106146b68afa2c06b1cd69 (diff) | |
download | go-92ecd7893308ad222bfdd33b10be1cce769a3cdf.tar.gz go-92ecd7893308ad222bfdd33b10be1cce769a3cdf.zip |
cmd/compile: add ZeroWB case in writebarrier
It looks like it should be there, although I couldn't find a test
case that fails without it. ZeroWB is probably never generated now:
zeroing an initialized heap object is done by making an autotmp on
stack, zeroing it, and copying (typedmemmove) to heap.
Passes "toolstash -cmp" on std.
Change-Id: I702a59759e33fb8cc2a34a3b3029e7540aca080a
Reviewed-on: https://go-review.googlesource.com/35250
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r-- | src/cmd/compile/internal/ssa/writebarrier.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/writebarrier.go b/src/cmd/compile/internal/ssa/writebarrier.go index 1eb4d7bb1a..054ba1f85c 100644 --- a/src/cmd/compile/internal/ssa/writebarrier.go +++ b/src/cmd/compile/internal/ssa/writebarrier.go @@ -35,7 +35,7 @@ func writebarrier(f *Func) { valueLoop: for i, v := range b.Values { switch v.Op { - case OpStoreWB, OpMoveWB, OpMoveWBVolatile: + case OpStoreWB, OpMoveWB, OpMoveWBVolatile, OpZeroWB: if IsStackAddr(v.Args[0]) { switch v.Op { case OpStoreWB: |