Commit 61da0e92 authored by Michael Hudson-Doyle's avatar Michael Hudson-Doyle

cmd/compile, cmd/compile/internal/x86: do not let regopt use CX in position independent code

We might be able to do better than this, but it's a start.

Change-Id: I80ebce9094e084a4746039106ccf1ad9c4b8bb7c
Reviewed-on: https://go-review.googlesource.com/16384Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 6056cc5d
......@@ -62,7 +62,11 @@ func regnames(n *int) []string {
}
func excludedregs() uint64 {
return RtoB(x86.REG_SP)
if gc.Ctxt.Flag_shared != 0 {
return RtoB(x86.REG_SP) | RtoB(x86.REG_CX)
} else {
return RtoB(x86.REG_SP)
}
}
func doregbits(r int) uint64 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment