]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: fix fp constant loads for 386+PIC
authorKeith Randall <khr@golang.org>
Thu, 11 Aug 2016 16:49:48 +0000 (09:49 -0700)
committerKeith Randall <khr@golang.org>
Thu, 11 Aug 2016 19:52:45 +0000 (19:52 +0000)
commit8f955d3664813c831b35cb02c6e7b48dd0341ece
tree840fcf19f4ddbf149d70b5644680c226d37b4e98
parented1ad8f56cc51cc55a8c12514e1c2b3098c1218b
[dev.ssa] cmd/compile: fix fp constant loads for 386+PIC

In position-independent 386 code, loading floating-point constants from
the constant pool requires two steps: materializing the address of
the constant pool entry (requires calling a thunk) and then loading
from that address.

Before this CL, the materializing happened implicitly in CX, which
clobbered that register.

Change-Id: Id094e0fb2d3be211089f299e8f7c89c315de0a87
Reviewed-on: https://go-review.googlesource.com/26811
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
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/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/x86/387.go
src/cmd/compile/internal/x86/ssa.go