Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1863)

Issue 20930043: code review 20930043: doc/asm.html: new document, a brief guide to the assembler (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by r
Modified:
10 years, 5 months ago
Reviewers:
rsc
CC:
golang-dev, iant, bradfitz, josharian, minux1, aram, rsc
Visibility:
Public.

Description

doc/asm.html: new document, a brief guide to the assembler Fixes issue 6060

Patch Set 1 #

Total comments: 4

Patch Set 2 : diff -r db021a4c7b4a https://code.google.com/p/go #

Total comments: 1

Patch Set 3 : diff -r db021a4c7b4a https://code.google.com/p/go #

Patch Set 4 : diff -r db021a4c7b4a https://code.google.com/p/go #

Total comments: 9

Patch Set 5 : diff -r db021a4c7b4a https://code.google.com/p/go #

Patch Set 6 : diff -r db021a4c7b4a https://code.google.com/p/go #

Patch Set 7 : diff -r db021a4c7b4a https://code.google.com/p/go #

Total comments: 36

Patch Set 8 : diff -r db021a4c7b4a https://code.google.com/p/go #

Patch Set 9 : diff -r e081962da65c https://code.google.com/p/go #

Total comments: 14

Patch Set 10 : diff -r 37afbf6361e2 https://code.google.com/p/go #

Patch Set 11 : diff -r 37afbf6361e2 https://code.google.com/p/go #

Total comments: 7

Patch Set 12 : diff -r 4daa80747394 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+402 lines, -0 lines) Patch
A doc/asm.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +402 lines, -0 lines 0 comments Download

Messages

Total messages: 23
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 5 months ago (2013-11-01 18:50:54 UTC) #1
iant
We should have [568]a/doc.go point to this. https://codereview.appspot.com/20930043/diff/1/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/1/doc/asm.html#newcode9 doc/asm.html:9: This document ...
10 years, 5 months ago (2013-11-01 19:17:26 UTC) #2
r
Hello golang-dev@googlegroups.com, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 5 months ago (2013-11-01 19:49:00 UTC) #3
r
Once it's closer to done, I'll add the links to the assembler docs. https://codereview.appspot.com/20930043/diff/1/doc/asm.html File ...
10 years, 5 months ago (2013-11-01 19:49:15 UTC) #4
bradfitz
https://codereview.appspot.com/20930043/diff/20001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/20001/doc/asm.html#newcode94 doc/asm.html:94: for use by the garbage collector; they are generated ...
10 years, 5 months ago (2013-11-01 19:58:10 UTC) #5
r
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 5 months ago (2013-11-01 20:01:38 UTC) #6
r
Updated to add descriptions of m and g.
10 years, 5 months ago (2013-11-01 20:53:08 UTC) #7
josharian
Might be worth mentioning that you can also see sample assembly usage in the stdlib ...
10 years, 5 months ago (2013-11-01 21:14:44 UTC) #8
r
https://codereview.appspot.com/20930043/diff/60001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/60001/doc/asm.html#newcode11 doc/asm.html:11: They are based on the Plan 9 assemblers, which ...
10 years, 5 months ago (2013-11-01 21:37:02 UTC) #9
r
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org, josharian@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 5 months ago (2013-11-01 21:39:27 UTC) #10
minux1
i wish this document had been existed earlier, as it would save my a lot ...
10 years, 5 months ago (2013-11-02 06:14:18 UTC) #11
aram
Thank you. https://codereview.appspot.com/20930043/diff/120001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/120001/doc/asm.html#newcode39 doc/asm.html:39: <a href="/pkg/runtime/"><code>runtime</code></a> and Agreed. https://codereview.appspot.com/20930043/diff/120001/doc/asm.html#newcode156 doc/asm.html:156: TEXT ...
10 years, 5 months ago (2013-11-02 12:15:57 UTC) #12
aram
https://codereview.appspot.com/20930043/diff/120001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/120001/doc/asm.html#newcode156 doc/asm.html:156: TEXT runtime·profileloop(SB),NOSPLIT,$8 On 2013/11/02 12:15:57, aram wrote: > $8-16? ...
10 years, 5 months ago (2013-11-02 12:19:26 UTC) #13
minux1
https://codereview.appspot.com/20930043/diff/120001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/120001/doc/asm.html#newcode152 doc/asm.html:152: and the frame size as a literal constant (that ...
10 years, 5 months ago (2013-11-03 08:45:48 UTC) #14
r
https://codereview.appspot.com/20930043/diff/120001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/120001/doc/asm.html#newcode39 doc/asm.html:39: <a href="/pkg/runtime/"><code>runtime</code></a> and On 2013/11/02 12:15:57, aram wrote: > ...
10 years, 5 months ago (2013-11-04 22:33:56 UTC) #15
r
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org, josharian@gmail.com, minux.ma@gmail.com, aram@mgk.ro (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 5 months ago (2013-11-04 22:34:38 UTC) #16
minux1
https://codereview.appspot.com/20930043/diff/120001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/120001/doc/asm.html#newcode105 doc/asm.html:105: Some symbols, such as <code>PC</code>, <code>R0</code> and <code>SP</code>, are ...
10 years, 5 months ago (2013-11-07 03:59:04 UTC) #17
minux1
In the next round, I suggest we add these topics: 1. consider document Go ABI ...
10 years, 5 months ago (2013-11-07 04:19:45 UTC) #18
rsc
LGTM https://codereview.appspot.com/20930043/diff/160001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/160001/doc/asm.html#newcode51 doc/asm.html:51: $ go tool 6g -S x.go # or: ...
10 years, 5 months ago (2013-11-07 16:27:56 UTC) #19
r
https://codereview.appspot.com/20930043/diff/160001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/160001/doc/asm.html#newcode51 doc/asm.html:51: $ go tool 6g -S x.go On 2013/11/07 16:27:56, ...
10 years, 5 months ago (2013-11-12 23:07:30 UTC) #20
r
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org, josharian@gmail.com, minux.ma@gmail.com, aram@mgk.ro, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 5 months ago (2013-11-12 23:17:38 UTC) #21
rsc
LGTM https://codereview.appspot.com/20930043/diff/200001/doc/asm.html File doc/asm.html (right): https://codereview.appspot.com/20930043/diff/200001/doc/asm.html#newcode132 doc/asm.html:132: Within Go source, such symbols appear with a ...
10 years, 5 months ago (2013-11-13 02:04:24 UTC) #22
r
10 years, 5 months ago (2013-11-13 04:04:27 UTC) #23
*** Submitted as https://code.google.com/p/go/source/detail?r=5a585f237d28 ***

doc/asm.html: new document, a brief guide to the assembler

Fixes issue 6060

R=golang-dev, iant, bradfitz, josharian, minux.ma, aram, rsc
CC=golang-dev
https://codereview.appspot.com/20930043

https://codereview.appspot.com/20930043/diff/200001/doc/asm.html
File doc/asm.html (right):

https://codereview.appspot.com/20930043/diff/200001/doc/asm.html#newcode167
doc/asm.html:167: In the general case, the frame size is followed by an argument
size, written as a subtraction.
On 2013/11/13 02:04:25, rsc wrote:
> s/written as a subtraction/separated by a minus sign/
> 
> (It's just syntax, not a subtraction in the sense of the parser. $24-8 is the
> 24-byte frame with 8-bytes of arguments, but $(24-8) is a 16-byte frame with
no
> specification of the argument size. Ken certainly could have picked a less
> confusing punctuation symbol.)

Done.

https://codereview.appspot.com/20930043/diff/200001/doc/asm.html#newcode171
doc/asm.html:171: the frame size must be written this way.
On 2013/11/13 02:04:25, rsc wrote:
> the argument size must be specified.

Done.

https://codereview.appspot.com/20930043/diff/200001/doc/asm.html#newcode335
doc/asm.html:335: The way the runtime derives pointers to the <code>m</code> and
<code>g</code> structures
On 2013/11/13 02:04:25, rsc wrote:
> The assembly code to access the <code>m</code> and <code>g</code> pointers is
> the same as on the 386, except use <code>MOVQ</code>:
> 
> [It's almost always the same. Linux is the exception here, not the rule.]

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b