compiler, runtime: call gcWriteBarrier instead of writebarrierptr
commit96942f21f09b869fac5cb85ab362f473ba625f9e
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Sep 2018 22:25:58 +0000 (13 22:25 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Sep 2018 22:25:58 +0000 (13 22:25 +0000)
tree38fe52c7aeba372693d83041bf5037d8fbb2c311
parent25dd006e218e0249275f2e7149681dff2d47cebe
compiler, runtime: call gcWriteBarrier instead of writebarrierptr

    In 1.11 writebarrierptr is going away, so change the compiler to call
    gcWriteBarrier instead.  We weren't using gcWriteBarrier before;
    adjust the implementation to use the putFast method.

    This revealed a problem in the kickoff function.  When using cgo,
    kickoff can be called on the g0 of an m allocated by newExtraM.  In
    that case the m will generally have a p, but systemstack may be called
    by wbBufFlush as part of flushing the write barrier buffer.  At that
    point the buffer is full, so we can not do a write barrier.  So adjust
    the existing code in kickoff so that in the case where we are g0,
    don't do any write barrier at all.

    Reviewed-on: https://go-review.googlesource.com/131395

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264295 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/runtime.def
gcc/go/gofrontend/wb.cc
libgo/go/runtime/mgc_gccgo.go
libgo/go/runtime/proc.go