]> Cypherpunks repositories - gostls13.git/commit
6g: simplify trampoline by postponing load.
authorRuss Cox <rsc@golang.org>
Thu, 7 May 2009 00:06:06 +0000 (17:06 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 7 May 2009 00:06:06 +0000 (17:06 -0700)
commit5a67ea3883fcdf493c9d96adfe4b72ee5a892a7b
tree9ec55dd6149bade69d6a49a1c5e25912da4d503f
parente508c5576067a74762fcead1721d1004e0fdf298
6g: simplify trampoline by postponing load.

TEXT tramp
MOVQ 8(SP), AX
ADDQ $40, AX
MOVQ AX, 8(SP)
JMP oldfunc

is now

TEXT tramp
ADDQ $40, 8(SP)
JMP oldfunc

and if s/40/0/, then it simplifies to

TEXT tramp
JMP oldfunc

(the tramp is still needed to satisfy
symbol references from other object files)

R=ken
OCL=28377
CL=28381
src/cmd/6g/obj.c