]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: request r12 for indirect calls on ppc64le
authorLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 11 Sep 2017 14:39:24 +0000 (10:39 -0400)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 11 Sep 2017 18:02:33 +0000 (18:02 +0000)
commitb74b43de6830f3024862e1ab1d7c94fa0824a415
tree8210cdccb526bcb296766f83baff954a7ce932ad
parent818353022e03620b1c4966ec5ef8691e21f06ec7
cmd/compile: request r12 for indirect calls on ppc64le

On ppc64le, functions compiled with -shared expect r12 to
hold the function's address for indirect calls. Previously
this was enforced by generating a move instruction if the
address wasn't already in r12. This change avoids that extra
move by requesting r12 in the CALL ops that do indirect calls.

As a result of adding support for plugins on ppc64le, it was
discovered that there would be more cases where this extra
move was needed, so this seemed like a better solution.

Updates #20756

Change-Id: I6770885a46990f78c6d2902a715dcdaa822192a1
Reviewed-on: https://go-review.googlesource.com/62890
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ppc64/ssa.go
src/cmd/compile/internal/ssa/gen/PPC64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/regalloc.go