aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc/ssa.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/gc/ssa.go')
-rw-r--r--src/cmd/compile/internal/gc/ssa.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go
index bf483f8416..a0c1cf15b9 100644
--- a/src/cmd/compile/internal/gc/ssa.go
+++ b/src/cmd/compile/internal/gc/ssa.go
@@ -3470,8 +3470,13 @@ func (s *state) insertWBstore(t *Type, left, right *ssa.Value, line int32, skip
if s.WBLineno == 0 {
s.WBLineno = left.Line
}
- s.storeTypeScalars(t, left, right, skip)
- s.storeTypePtrsWB(t, left, right)
+ if t == Types[TUINTPTR] {
+ // Stores to reflect.{Slice,String}Header.Data.
+ s.vars[&memVar] = s.newValue3I(ssa.OpStoreWB, ssa.TypeMem, s.config.PtrSize, left, right, s.mem())
+ } else {
+ s.storeTypeScalars(t, left, right, skip)
+ s.storeTypePtrsWB(t, left, right)
+ }
// WB ops will be expanded to branches at writebarrier phase.
// To make it easy, we put WB ops at the end of a block, so