From 1f9c9d853067635305f72e247c5b49e3fa5da8af Mon Sep 17 00:00:00 2001 From: fanzha02 Date: Tue, 3 Aug 2021 12:11:29 +0800 Subject: doc: use "high address/low address" instead of "top/bottom" The current document uses the "top" and "bottom" when talking about the address within a frame, which may easily lead to misunderstandings. This patch directly uses "high address" and "low address" to make the expression clearer. Change-Id: I7469330bbdc158672d7f0314fe6680ebdd9ab79a Reviewed-on: https://go-review.googlesource.com/c/go/+/339369 Trust: fannie zhang Reviewed-by: Austin Clements Reviewed-by: Cherry Mui --- doc/asm.html | 8 ++++---- src/cmd/internal/obj/textflag.go | 4 ++-- src/runtime/textflag.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/asm.html b/doc/asm.html index d578800086..51f85eb948 100644 --- a/doc/asm.html +++ b/doc/asm.html @@ -166,7 +166,7 @@ jumps and branches.
  • -SP: Stack pointer: top of stack. +SP: Stack pointer: the highest address within the local stack frame.
  • @@ -216,7 +216,7 @@ If a Go prototype does not name its result, the expected assembly name is The SP pseudo-register is a virtual stack pointer used to refer to frame-local variables and the arguments being prepared for function calls. -It points to the top of the local stack frame, so references should use negative offsets +It points to the highest address within the local stack frame, so references should use negative offsets in the range [−framesize, 0): x-8(SP), y-4(SP), and so on.

    @@ -409,7 +409,7 @@ The linker will choose one of the duplicates to use. (For TEXT items.) Don't insert the preamble to check if the stack must be split. The frame for the routine, plus anything it calls, must fit in the -spare space at the top of the stack segment. +spare space remaining in the current stack segment. Used to protect routines such as the stack splitting code itself.
  • @@ -460,7 +460,7 @@ Only valid on functions that declare a frame size of 0. TOPFRAME = 2048
    (For TEXT items.) -Function is the top of the call stack. Traceback should stop at this function. +Function is the outermost frame of the call stack. Traceback should stop at this function.
  • diff --git a/src/cmd/internal/obj/textflag.go b/src/cmd/internal/obj/textflag.go index 881e192203..5ae75027c2 100644 --- a/src/cmd/internal/obj/textflag.go +++ b/src/cmd/internal/obj/textflag.go @@ -49,8 +49,8 @@ const ( // Function can call reflect.Type.Method or reflect.Type.MethodByName. REFLECTMETHOD = 1024 - // Function is the top of the call stack. Call stack unwinders should stop - // at this function. + // Function is the outermost frame of the call stack. Call stack unwinders + // should stop at this function. TOPFRAME = 2048 // Function is an ABI wrapper. diff --git a/src/runtime/textflag.h b/src/runtime/textflag.h index e727208cd0..214075e360 100644 --- a/src/runtime/textflag.h +++ b/src/runtime/textflag.h @@ -32,8 +32,8 @@ #define NOFRAME 512 // Function can call reflect.Type.Method or reflect.Type.MethodByName. #define REFLECTMETHOD 1024 -// Function is the top of the call stack. Call stack unwinders should stop -// at this function. +// Function is the outermost frame of the call stack. Call stack unwinders +// should stop at this function. #define TOPFRAME 2048 // Function is an ABI wrapper. #define ABIWRAPPER 4096 -- cgit v1.2.3-54-g00ecf