From: Austin Clements Date: Wed, 27 Apr 2016 18:30:01 +0000 (-0400) Subject: runtime: make {add,subtract}{b,1} nosplit X-Git-Tag: go1.7beta1~452 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=30172f1811a3e08487c6191d1923f8608a338496;p=gostls13.git runtime: make {add,subtract}{b,1} nosplit These are used at the bottom level of various GC operations that must not be preempted. To be on the safe side, mark them all nosplit. Change-Id: I8f7360e79c9852bd044df71413b8581ad764380c Reviewed-on: https://go-review.googlesource.com/22504 Run-TryBot: Austin Clements Reviewed-by: Rick Hudson --- diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index f025ce1c68..e8eb6a7e22 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -86,6 +86,7 @@ const ( // addb returns the byte pointer p+n. //go:nowritebarrier +//go:nosplit func addb(p *byte, n uintptr) *byte { // Note: wrote out full expression instead of calling add(p, n) // to reduce the number of temporaries generated by the @@ -95,6 +96,7 @@ func addb(p *byte, n uintptr) *byte { // subtractb returns the byte pointer p-n. //go:nowritebarrier +//go:nosplit func subtractb(p *byte, n uintptr) *byte { // Note: wrote out full expression instead of calling add(p, -n) // to reduce the number of temporaries generated by the @@ -104,6 +106,7 @@ func subtractb(p *byte, n uintptr) *byte { // add1 returns the byte pointer p+1. //go:nowritebarrier +//go:nosplit func add1(p *byte) *byte { // Note: wrote out full expression instead of calling addb(p, 1) // to reduce the number of temporaries generated by the