[dev.ssa] cmd/compile/internal/gc: handle all inputs for shifts.

Disable CX as output for shift operations.

Change-Id: I85e6b22d09009b38847082dc375b6108c2dee80a
Reviewed-on: https://go-review.googlesource.com/13370
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Alexandru Moșoi 2015-08-07 12:19:03 +02:00 committed by Keith Randall
parent 35fb514596
commit c55870a541
3 changed files with 37 additions and 13 deletions

View file

@ -72,6 +72,7 @@ func init() {
// Common individual register masks
var (
cx = buildReg("CX")
gp = buildReg("AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15")
gpsp = gp | buildReg("SP")
gpspsb = gpsp | buildReg("SB")
@ -91,7 +92,7 @@ func init() {
gp11sb = regInfo{inputs: []regMask{gpspsb}, outputs: gponly}
gp21 = regInfo{inputs: []regMask{gpsp, gpsp}, outputs: gponly}
gp21sb = regInfo{inputs: []regMask{gpspsb, gpsp}, outputs: gponly}
gp21shift = regInfo{inputs: []regMask{gpsp, buildReg("CX")}, outputs: gponly}
gp21shift = regInfo{inputs: []regMask{gpsp, cx}, outputs: []regMask{gp &^ cx}}
gp2flags = regInfo{inputs: []regMask{gpsp, gpsp}, outputs: flagsonly}
gp1flags = regInfo{inputs: []regMask{gpsp}, outputs: flagsonly}