]> Cypherpunks repositories - gostls13.git/commit
cmd/5l, cmd/6l, cmd/8l: accept CALL reg, reg
authorRuss Cox <rsc@golang.org>
Fri, 22 Feb 2013 19:23:21 +0000 (14:23 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 22 Feb 2013 19:23:21 +0000 (14:23 -0500)
commitd57fcbf05c431fa767467b2a04f477309b681f9d
treee37b3e9a161977e928b613d3ed63d374f170766c
parent9c7aa5fea983fe58d126542013861a022adefa70
cmd/5l, cmd/6l, cmd/8l: accept CALL reg, reg

The new src argument is ignored during linking
(that is, CALL r1, r2 is identical to CALL r2 for linking),
but it serves as a hint to the 5g/6g/8g optimizer
that the src register is live on entry to the called
function and must be preserved.

It is possible to avoid exposing this fact to the rest of
the toolchain, keeping it entirely within 5g/6g/8g,
but I think it will help to be able to look in object files
and assembly listings and linker -a / -W output to
see CALL instructions are "Go func value" calls and
which are "C function pointer" calls.

R=ken2
CC=golang-dev
https://golang.org/cl/7364045
src/cmd/5l/optab.c
src/cmd/6l/optab.c
src/cmd/8l/optab.c