Skip to content

Commit 1f9c9d8

Browse files
committed
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 <[email protected]> Reviewed-by: Austin Clements <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent f1dce31 commit 1f9c9d8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

doc/asm.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ <h3 id="symbols">Symbols</h3>
166166
</li>
167167

168168
<li>
169-
<code>SP</code>: Stack pointer: top of stack.
169+
<code>SP</code>: Stack pointer: the highest address within the local stack frame.
170170
</li>
171171

172172
</ul>
@@ -216,7 +216,7 @@ <h3 id="symbols">Symbols</h3>
216216
The <code>SP</code> pseudo-register is a virtual stack pointer
217217
used to refer to frame-local variables and the arguments being
218218
prepared for function calls.
219-
It points to the top of the local stack frame, so references should use negative offsets
219+
It points to the highest address within the local stack frame, so references should use negative offsets
220220
in the range [−framesize, 0):
221221
<code>x-8(SP)</code>, <code>y-4(SP)</code>, and so on.
222222
</p>
@@ -409,7 +409,7 @@ <h3 id="directives">Directives</h3>
409409
(For <code>TEXT</code> items.)
410410
Don't insert the preamble to check if the stack must be split.
411411
The frame for the routine, plus anything it calls, must fit in the
412-
spare space at the top of the stack segment.
412+
spare space remaining in the current stack segment.
413413
Used to protect routines such as the stack splitting code itself.
414414
</li>
415415
<li>
@@ -460,7 +460,7 @@ <h3 id="directives">Directives</h3>
460460
<code>TOPFRAME</code> = 2048
461461
<br>
462462
(For <code>TEXT</code> items.)
463-
Function is the top of the call stack. Traceback should stop at this function.
463+
Function is the outermost frame of the call stack. Traceback should stop at this function.
464464
</li>
465465
</ul>
466466

src/cmd/internal/obj/textflag.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ const (
4949
// Function can call reflect.Type.Method or reflect.Type.MethodByName.
5050
REFLECTMETHOD = 1024
5151

52-
// Function is the top of the call stack. Call stack unwinders should stop
53-
// at this function.
52+
// Function is the outermost frame of the call stack. Call stack unwinders
53+
// should stop at this function.
5454
TOPFRAME = 2048
5555

5656
// Function is an ABI wrapper.

src/runtime/textflag.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#define NOFRAME 512
3333
// Function can call reflect.Type.Method or reflect.Type.MethodByName.
3434
#define REFLECTMETHOD 1024
35-
// Function is the top of the call stack. Call stack unwinders should stop
36-
// at this function.
35+
// Function is the outermost frame of the call stack. Call stack unwinders
36+
// should stop at this function.
3737
#define TOPFRAME 2048
3838
// Function is an ABI wrapper.
3939
#define ABIWRAPPER 4096

0 commit comments

Comments
 (0)