From d7a6a44deb3a56aa3f94b75f7ab4ffa1a0fa8cef Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Tue, 25 Aug 2020 10:38:50 +0300 Subject: [PATCH] doc/asm: add BP is callee-save paragraph Change-Id: Id38e639c66a42acf0b1c4488cdfd0b7b6cf71c78 Reviewed-on: https://go-review.googlesource.com/c/go/+/250397 Reviewed-by: Keith Randall --- doc/asm.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/asm.html b/doc/asm.html index dbbe8f2cd1..cc8598aeff 100644 --- a/doc/asm.html +++ b/doc/asm.html @@ -687,6 +687,13 @@ MOVQ g(CX), AX // Move g into AX. MOVQ g_m(AX), BX // Move g.m into BX. +

+Register BP is callee-save. +The assembler automatically inserts BP save/restore when frame size is larger than zero. +Using BP as a general purpose register is allowed, +however it can interfere with sampling-based profiling. +

+

ARM