runtime: implement string ops in Go Also implement go:nosplit annotation. Not really needed for now, but we'll definitely need it for other conversions. benchmark old ns/op new ns/op delta BenchmarkRuneIterate 534 474 -11.24% BenchmarkRuneIterate2 535 470 -12.15% LGTM=bradfitz R=golang-codereviews, dave, bradfitz, minux CC=golang-codereviews https://golang.org/cl/93380044
diff --git a/src/pkg/runtime/asm_amd64.s b/src/pkg/runtime/asm_amd64.s index b352a50..d15b372 100644 --- a/src/pkg/runtime/asm_amd64.s +++ b/src/pkg/runtime/asm_amd64.s
@@ -858,6 +858,12 @@ MOVQ -8(AX),AX // get calling pc RET +TEXT runtime·gogetcallerpc(SB),NOSPLIT,$0-8 + MOVQ x+0(FP),AX // addr of first arg + MOVQ -8(AX),AX // get calling pc + MOVQ AX,r+4(FP) + RET + TEXT runtime·setcallerpc(SB),NOSPLIT,$0-16 MOVQ x+0(FP),AX // addr of first arg MOVQ x+8(FP), BX