]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: more fixes for 386 shared libraries
authorKeith Randall <khr@golang.org>
Tue, 9 Aug 2016 20:58:06 +0000 (13:58 -0700)
committerKeith Randall <khr@golang.org>
Wed, 10 Aug 2016 17:09:38 +0000 (17:09 +0000)
commit77ef597f38e11e03522d1ccac34cfd39a1ca8d8e
tree6b0bf662f015a58861460c0c3dc2d2df36667c96
parentff37d0e681a8b35c0ebff34bc1e73105f8845928
[dev.ssa] cmd/compile: more fixes for 386 shared libraries

Use the destination register for materializing the pc
for GOT references also. See https://go-review.googlesource.com/c/25442/
The SSA backend assumes CX does not get clobbered for these instructions.

Mark duffzero as clobbering CX. The linker needs to clobber CX
to materialize the address to call. (This affects the non-shared-library
duffzero also, but hopefully forbidding one register across duffzero
won't be a big deal.)

Hopefully this is all the cases where the linker is clobbering CX
under the hood and SSA assumes it isn't.

Change-Id: I080c938170193df57cd5ce1f2a956b68a34cc886
Reviewed-on: https://go-review.googlesource.com/26611
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
src/cmd/compile/internal/ssa/gen/386.rules
src/cmd/compile/internal/ssa/gen/386Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/internal/obj/x86/obj6.go