]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: move genembedtramp into portable code
authorRuss Cox <rsc@golang.org>
Tue, 11 Jun 2013 13:41:49 +0000 (09:41 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 11 Jun 2013 13:41:49 +0000 (09:41 -0400)
commit1f51d27922b2d7dda356da12cabb540e78858b4d
tree18d969189e07298864f0f1d0e2713d7eb809a6f5
parent9b2561ef16307ad5f918e81db2521a78807280f5
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 #5627.

R=ken2
CC=golang-dev
https://golang.org/cl/10057044
19 files changed:
src/cmd/5g/ggen.c
src/cmd/5g/gobj.c
src/cmd/5l/noop.c
src/cmd/6g/ggen.c
src/cmd/6g/gobj.c
src/cmd/6l/pass.c
src/cmd/8g/ggen.c
src/cmd/8g/gobj.c
src/cmd/8l/pass.c
src/cmd/gc/fmt.c
src/cmd/gc/gen.c
src/cmd/gc/go.h
src/cmd/gc/inl.c
src/cmd/gc/order.c
src/cmd/gc/racewalk.c
src/cmd/gc/reflect.c
src/cmd/gc/subr.c
src/cmd/gc/typecheck.c
src/cmd/gc/walk.c