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

Issue 10057044: code review 10057044: cmd/gc: move genembedtramp into portable code (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by rsc
Modified:
12 years, 1 month ago
Reviewers:
dave
CC:
ken2, golang-dev
Visibility:
Public.

Description

cmd/gc: move genembedtramp into portable code Requires adding new linker instruction RET f(SB) meaning return but then immediately call f. This is what you'd use to implement a tail call after fiddling with the arguments, but the compiler only uses it in genwrapper. This CL eliminates the copy-and-paste genembedtramp functions from 5g/8g/6g and makes the code run on ARM for the first time. It removes a small special case for function generation, which should help Carl a bit, but at the same time it does not bother to implement general tail call optimization, which we do not want anyway. Fixes issue 5627.

Patch Set 1 #

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

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -341 lines) Patch
M src/cmd/5g/ggen.c View 1 1 chunk +11 lines, -3 lines 0 comments Download
M src/cmd/5g/gobj.c View 1 1 chunk +0 lines, -82 lines 0 comments Download
M src/cmd/5l/noop.c View 1 2 3 3 chunks +20 lines, -4 lines 0 comments Download
M src/cmd/6g/ggen.c View 1 1 chunk +10 lines, -3 lines 0 comments Download
M src/cmd/6g/gobj.c View 1 1 chunk +0 lines, -109 lines 0 comments Download
M src/cmd/6l/pass.c View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/8g/ggen.c View 1 1 chunk +10 lines, -3 lines 0 comments Download
M src/cmd/8g/gobj.c View 1 1 chunk +0 lines, -106 lines 0 comments Download
M src/cmd/8l/pass.c View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/cmd/gc/fmt.c View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/gc/gen.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/go.h View 1 2 chunks +1 line, -1 line 0 comments Download
M src/cmd/gc/inl.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/order.c View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/cmd/gc/racewalk.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/reflect.c View 1 2 chunks +2 lines, -14 lines 0 comments Download
M src/cmd/gc/subr.c View 1 3 chunks +30 lines, -13 lines 0 comments Download
M src/cmd/gc/typecheck.c View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/cmd/gc/walk.c View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 1 month ago (2013-06-11 13:41:46 UTC) #1
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=4fb5b9ee0f0c *** cmd/gc: move genembedtramp into portable code Requires adding new linker ...
12 years, 1 month ago (2013-06-11 13:41:53 UTC) #2
dave_cheney.net
12 years, 1 month ago (2013-06-11 13:58:38 UTC) #3
Sorry rsc, this has upset the -race builders.

On Tue, Jun 11, 2013 at 11:41 PM,  <rsc@golang.org> wrote:
> *** Submitted as
> https://code.google.com/p/go/source/detail?r=4fb5b9ee0f0c ***
>
>
> cmd/gc: move genembedtramp into portable code
>
> Requires adding new linker instruction
>         RET     f(SB)
> meaning return but then immediately call f.
> This is what you'd use to implement a tail call after
> fiddling with the arguments, but the compiler only
> uses it in genwrapper.
>
> This CL eliminates the copy-and-paste genembedtramp
> functions from 5g/8g/6g and makes the code run on ARM
> for the first time. It removes a small special case for function
> generation, which should help Carl a bit, but at the same time
> it does not bother to implement general tail call optimization,
> which we do not want anyway.
>
> Fixes issue 5627.
>
> R=ken2
> CC=golang-dev
> https://codereview.appspot.com/10057044
>
>
> https://codereview.appspot.com/10057044/
>
>
> --
>
> ---You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Sign in to reply to this message.

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