Commit 0004f34c authored by Keith Randall's avatar Keith Randall

cmd/compile: regalloc enforces 2-address instructions

Instead of being a hint, resultInArg0 is now enforced by regalloc.
This allows us to delete all the code from amd64/ssa.go which
deals with converting from a semantically three-address instruction
into some copies plus a two-address instruction.

Change-Id: Id4f39a80be4b678718bfd42a229f9094ab6ecd7c
Reviewed-on: https://go-review.googlesource.com/21816Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 6b33b0e9
...@@ -192,74 +192,23 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -192,74 +192,23 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
p.To.Reg = r p.To.Reg = r
} }
// 2-address opcode arithmetic, symmetric // 2-address opcode arithmetic
case ssa.OpAMD64ADDSS, ssa.OpAMD64ADDSD, case ssa.OpAMD64SUBQ, ssa.OpAMD64SUBL, ssa.OpAMD64SUBW, ssa.OpAMD64SUBB,
ssa.OpAMD64MULQ, ssa.OpAMD64MULL, ssa.OpAMD64MULW, ssa.OpAMD64MULB,
ssa.OpAMD64ANDQ, ssa.OpAMD64ANDL, ssa.OpAMD64ANDW, ssa.OpAMD64ANDB, ssa.OpAMD64ANDQ, ssa.OpAMD64ANDL, ssa.OpAMD64ANDW, ssa.OpAMD64ANDB,
ssa.OpAMD64ORQ, ssa.OpAMD64ORL, ssa.OpAMD64ORW, ssa.OpAMD64ORB, ssa.OpAMD64ORQ, ssa.OpAMD64ORL, ssa.OpAMD64ORW, ssa.OpAMD64ORB,
ssa.OpAMD64XORQ, ssa.OpAMD64XORL, ssa.OpAMD64XORW, ssa.OpAMD64XORB, ssa.OpAMD64XORQ, ssa.OpAMD64XORL, ssa.OpAMD64XORW, ssa.OpAMD64XORB,
ssa.OpAMD64MULQ, ssa.OpAMD64MULL, ssa.OpAMD64MULW, ssa.OpAMD64MULB, ssa.OpAMD64SHLQ, ssa.OpAMD64SHLL, ssa.OpAMD64SHLW, ssa.OpAMD64SHLB,
ssa.OpAMD64MULSS, ssa.OpAMD64MULSD, ssa.OpAMD64PXOR: ssa.OpAMD64SHRQ, ssa.OpAMD64SHRL, ssa.OpAMD64SHRW, ssa.OpAMD64SHRB,
r := gc.SSARegNum(v) ssa.OpAMD64SARQ, ssa.OpAMD64SARL, ssa.OpAMD64SARW, ssa.OpAMD64SARB,
x := gc.SSARegNum(v.Args[0]) ssa.OpAMD64ADDSS, ssa.OpAMD64ADDSD, ssa.OpAMD64SUBSS, ssa.OpAMD64SUBSD,
y := gc.SSARegNum(v.Args[1]) ssa.OpAMD64MULSS, ssa.OpAMD64MULSD, ssa.OpAMD64DIVSS, ssa.OpAMD64DIVSD,
if x != r && y != r { ssa.OpAMD64PXOR:
opregreg(moveByType(v.Type), r, x)
x = r
}
p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_REG
p.To.Type = obj.TYPE_REG
p.To.Reg = r
if x == r {
p.From.Reg = y
} else {
p.From.Reg = x
}
// 2-address opcode arithmetic, not symmetric
case ssa.OpAMD64SUBQ, ssa.OpAMD64SUBL, ssa.OpAMD64SUBW, ssa.OpAMD64SUBB:
r := gc.SSARegNum(v)
x := gc.SSARegNum(v.Args[0])
y := gc.SSARegNum(v.Args[1])
var neg bool
if y == r {
// compute -(y-x) instead
x, y = y, x
neg = true
}
if x != r {
opregreg(moveByType(v.Type), r, x)
}
opregreg(v.Op.Asm(), r, y)
if neg {
if v.Op == ssa.OpAMD64SUBQ {
p := gc.Prog(x86.ANEGQ)
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} else { // Avoids partial registers write
p := gc.Prog(x86.ANEGL)
p.To.Type = obj.TYPE_REG
p.To.Reg = r
}
}
case ssa.OpAMD64SUBSS, ssa.OpAMD64SUBSD, ssa.OpAMD64DIVSS, ssa.OpAMD64DIVSD:
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
x := gc.SSARegNum(v.Args[0]) if r != gc.SSARegNum(v.Args[0]) {
y := gc.SSARegNum(v.Args[1]) v.Fatalf("input[0] and output not in same register %s", v.LongString())
if y == r && x != r {
// r/y := x op r/y, need to preserve x and rewrite to
// r/y := r/y op x15
x15 := int16(x86.REG_X15)
// register move y to x15
// register move x to y
// rename y with x15
opregreg(moveByType(v.Type), x15, y)
opregreg(moveByType(v.Type), r, x)
y = x15
} else if x != r {
opregreg(moveByType(v.Type), r, x)
} }
opregreg(v.Op.Asm(), r, y) opregreg(v.Op.Asm(), r, gc.SSARegNum(v.Args[1]))
case ssa.OpAMD64DIVQ, ssa.OpAMD64DIVL, ssa.OpAMD64DIVW, case ssa.OpAMD64DIVQ, ssa.OpAMD64DIVL, ssa.OpAMD64DIVW,
ssa.OpAMD64DIVQU, ssa.OpAMD64DIVLU, ssa.OpAMD64DIVWU, ssa.OpAMD64DIVQU, ssa.OpAMD64DIVLU, ssa.OpAMD64DIVWU,
...@@ -372,47 +321,20 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -372,47 +321,20 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
// Do a 64-bit add, the overflow goes into the carry. // Do a 64-bit add, the overflow goes into the carry.
// Shift right once and pull the carry back into the 63rd bit. // Shift right once and pull the carry back into the 63rd bit.
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
x := gc.SSARegNum(v.Args[0]) if r != gc.SSARegNum(v.Args[0]) {
y := gc.SSARegNum(v.Args[1]) v.Fatalf("input[0] and output not in same register %s", v.LongString())
if x != r && y != r {
opregreg(moveByType(v.Type), r, x)
x = r
} }
p := gc.Prog(x86.AADDQ) p := gc.Prog(x86.AADDQ)
p.From.Type = obj.TYPE_REG p.From.Type = obj.TYPE_REG
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
p.To.Reg = r p.To.Reg = r
if x == r { p.From.Reg = gc.SSARegNum(v.Args[1])
p.From.Reg = y
} else {
p.From.Reg = x
}
p = gc.Prog(x86.ARCRQ) p = gc.Prog(x86.ARCRQ)
p.From.Type = obj.TYPE_CONST p.From.Type = obj.TYPE_CONST
p.From.Offset = 1 p.From.Offset = 1
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
p.To.Reg = r p.To.Reg = r
case ssa.OpAMD64SHLQ, ssa.OpAMD64SHLL, ssa.OpAMD64SHLW, ssa.OpAMD64SHLB,
ssa.OpAMD64SHRQ, ssa.OpAMD64SHRL, ssa.OpAMD64SHRW, ssa.OpAMD64SHRB,
ssa.OpAMD64SARQ, ssa.OpAMD64SARL, ssa.OpAMD64SARW, ssa.OpAMD64SARB:
x := gc.SSARegNum(v.Args[0])
r := gc.SSARegNum(v)
if x != r {
if r == x86.REG_CX {
v.Fatalf("can't implement %s, target and shift both in CX", v.LongString())
}
p := gc.Prog(moveByType(v.Type))
p.From.Type = obj.TYPE_REG
p.From.Reg = x
p.To.Type = obj.TYPE_REG
p.To.Reg = r
}
p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_REG
p.From.Reg = gc.SSARegNum(v.Args[1]) // should be CX
p.To.Type = obj.TYPE_REG
p.To.Reg = r
case ssa.OpAMD64ADDQconst, ssa.OpAMD64ADDLconst, ssa.OpAMD64ADDWconst, ssa.OpAMD64ADDBconst: case ssa.OpAMD64ADDQconst, ssa.OpAMD64ADDLconst, ssa.OpAMD64ADDWconst, ssa.OpAMD64ADDBconst:
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
a := gc.SSARegNum(v.Args[0]) a := gc.SSARegNum(v.Args[0])
...@@ -433,7 +355,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -433,7 +355,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
p.To.Reg = r p.To.Reg = r
return return
} else if v.AuxInt == -1 { }
if v.AuxInt == -1 {
var asm obj.As var asm obj.As
if v.Op == ssa.OpAMD64ADDQconst { if v.Op == ssa.OpAMD64ADDQconst {
asm = x86.ADECQ asm = x86.ADECQ
...@@ -444,14 +367,13 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -444,14 +367,13 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
p.To.Reg = r p.To.Reg = r
return return
} else {
p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_CONST
p.From.Offset = v.AuxInt
p.To.Type = obj.TYPE_REG
p.To.Reg = r
return
} }
p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_CONST
p.From.Offset = v.AuxInt
p.To.Type = obj.TYPE_REG
p.To.Reg = r
return
} }
var asm obj.As var asm obj.As
if v.Op == ssa.OpAMD64ADDQconst { if v.Op == ssa.OpAMD64ADDQconst {
...@@ -469,17 +391,11 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -469,17 +391,11 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
case ssa.OpAMD64CMOVQEQconst, ssa.OpAMD64CMOVLEQconst, ssa.OpAMD64CMOVWEQconst, case ssa.OpAMD64CMOVQEQconst, ssa.OpAMD64CMOVLEQconst, ssa.OpAMD64CMOVWEQconst,
ssa.OpAMD64CMOVQNEconst, ssa.OpAMD64CMOVLNEconst, ssa.OpAMD64CMOVWNEconst: ssa.OpAMD64CMOVQNEconst, ssa.OpAMD64CMOVLNEconst, ssa.OpAMD64CMOVWNEconst:
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
x := gc.SSARegNum(v.Args[0]) if r != gc.SSARegNum(v.Args[0]) {
// Arg0 is in/out, move in to out if not already same v.Fatalf("input[0] and output not in same register %s", v.LongString())
if r != x {
p := gc.Prog(moveByType(v.Type))
p.From.Type = obj.TYPE_REG
p.From.Reg = x
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} }
// Constant into AX, after arg0 movement in case arg0 is in AX // Constant into AX
p := gc.Prog(moveByType(v.Type)) p := gc.Prog(moveByType(v.Type))
p.From.Type = obj.TYPE_CONST p.From.Type = obj.TYPE_CONST
p.From.Offset = v.AuxInt p.From.Offset = v.AuxInt
...@@ -494,13 +410,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -494,13 +410,8 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
case ssa.OpAMD64MULQconst, ssa.OpAMD64MULLconst, ssa.OpAMD64MULWconst, ssa.OpAMD64MULBconst: case ssa.OpAMD64MULQconst, ssa.OpAMD64MULLconst, ssa.OpAMD64MULWconst, ssa.OpAMD64MULBconst:
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
x := gc.SSARegNum(v.Args[0]) if r != gc.SSARegNum(v.Args[0]) {
if r != x { v.Fatalf("input[0] and output not in same register %s", v.LongString())
p := gc.Prog(moveByType(v.Type))
p.From.Type = obj.TYPE_REG
p.From.Reg = x
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} }
p := gc.Prog(v.Op.Asm()) p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_CONST p.From.Type = obj.TYPE_CONST
...@@ -508,87 +419,22 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -508,87 +419,22 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
p.To.Reg = r p.To.Reg = r
// TODO: Teach doasm to compile the three-address multiply imul $c, r1, r2 // TODO: Teach doasm to compile the three-address multiply imul $c, r1, r2
// instead of using the MOVQ above. // then we don't need to use resultInArg0 for these ops.
//p.From3 = new(obj.Addr) //p.From3 = new(obj.Addr)
//p.From3.Type = obj.TYPE_REG //p.From3.Type = obj.TYPE_REG
//p.From3.Reg = gc.SSARegNum(v.Args[0]) //p.From3.Reg = gc.SSARegNum(v.Args[0])
case ssa.OpAMD64SUBQconst, ssa.OpAMD64SUBLconst, ssa.OpAMD64SUBWconst, ssa.OpAMD64SUBBconst:
x := gc.SSARegNum(v.Args[0])
r := gc.SSARegNum(v)
// We have 3-op add (lea), so transforming a = b - const into
// a = b + (- const), saves us 1 instruction. We can't fit
// - (-1 << 31) into 4 bytes offset in lea.
// We handle 2-address just fine below.
if v.AuxInt == -1<<31 || x == r {
if x != r {
// This code compensates for the fact that the register allocator
// doesn't understand 2-address instructions yet. TODO: fix that.
p := gc.Prog(moveByType(v.Type))
p.From.Type = obj.TYPE_REG
p.From.Reg = x
p.To.Type = obj.TYPE_REG
p.To.Reg = r
}
p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_CONST
p.From.Offset = v.AuxInt
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} else if x == r && v.AuxInt == -1 {
var asm obj.As
// x = x - (-1) is the same as x++
// See OpAMD64ADDQconst comments about inc vs add $1,reg
if v.Op == ssa.OpAMD64SUBQconst {
asm = x86.AINCQ
} else {
asm = x86.AINCL
}
p := gc.Prog(asm)
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} else if x == r && v.AuxInt == 1 {
var asm obj.As
if v.Op == ssa.OpAMD64SUBQconst {
asm = x86.ADECQ
} else {
asm = x86.ADECL
}
p := gc.Prog(asm)
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} else {
var asm obj.As
if v.Op == ssa.OpAMD64SUBQconst {
asm = x86.ALEAQ
} else {
asm = x86.ALEAL
}
p := gc.Prog(asm)
p.From.Type = obj.TYPE_MEM
p.From.Reg = x
p.From.Offset = -v.AuxInt
p.To.Type = obj.TYPE_REG
p.To.Reg = r
}
case ssa.OpAMD64ANDQconst, ssa.OpAMD64ANDLconst, ssa.OpAMD64ANDWconst, ssa.OpAMD64ANDBconst, case ssa.OpAMD64SUBQconst, ssa.OpAMD64SUBLconst, ssa.OpAMD64SUBWconst, ssa.OpAMD64SUBBconst,
ssa.OpAMD64ANDQconst, ssa.OpAMD64ANDLconst, ssa.OpAMD64ANDWconst, ssa.OpAMD64ANDBconst,
ssa.OpAMD64ORQconst, ssa.OpAMD64ORLconst, ssa.OpAMD64ORWconst, ssa.OpAMD64ORBconst, ssa.OpAMD64ORQconst, ssa.OpAMD64ORLconst, ssa.OpAMD64ORWconst, ssa.OpAMD64ORBconst,
ssa.OpAMD64XORQconst, ssa.OpAMD64XORLconst, ssa.OpAMD64XORWconst, ssa.OpAMD64XORBconst, ssa.OpAMD64XORQconst, ssa.OpAMD64XORLconst, ssa.OpAMD64XORWconst, ssa.OpAMD64XORBconst,
ssa.OpAMD64SHLQconst, ssa.OpAMD64SHLLconst, ssa.OpAMD64SHLWconst, ssa.OpAMD64SHLQconst, ssa.OpAMD64SHLLconst, ssa.OpAMD64SHLWconst, ssa.OpAMD64SHLBconst,
ssa.OpAMD64SHLBconst, ssa.OpAMD64SHRQconst, ssa.OpAMD64SHRLconst, ssa.OpAMD64SHRWconst, ssa.OpAMD64SHRQconst, ssa.OpAMD64SHRLconst, ssa.OpAMD64SHRWconst, ssa.OpAMD64SHRBconst,
ssa.OpAMD64SHRBconst, ssa.OpAMD64SARQconst, ssa.OpAMD64SARLconst, ssa.OpAMD64SARWconst, ssa.OpAMD64SARQconst, ssa.OpAMD64SARLconst, ssa.OpAMD64SARWconst, ssa.OpAMD64SARBconst,
ssa.OpAMD64SARBconst, ssa.OpAMD64ROLQconst, ssa.OpAMD64ROLLconst, ssa.OpAMD64ROLWconst, ssa.OpAMD64ROLQconst, ssa.OpAMD64ROLLconst, ssa.OpAMD64ROLWconst, ssa.OpAMD64ROLBconst:
ssa.OpAMD64ROLBconst:
// This code compensates for the fact that the register allocator
// doesn't understand 2-address instructions yet. TODO: fix that.
x := gc.SSARegNum(v.Args[0])
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
if x != r { if r != gc.SSARegNum(v.Args[0]) {
p := gc.Prog(moveByType(v.Type)) v.Fatalf("input[0] and output not in same register %s", v.LongString())
p.From.Type = obj.TYPE_REG
p.From.Reg = x
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} }
p := gc.Prog(v.Op.Asm()) p := gc.Prog(v.Op.Asm())
p.From.Type = obj.TYPE_CONST p.From.Type = obj.TYPE_CONST
...@@ -821,9 +667,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -821,9 +667,6 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Offset = v.AuxInt p.To.Offset = v.AuxInt
case ssa.OpCopy, ssa.OpAMD64MOVQconvert: // TODO: use MOVQreg for reg->reg copies instead of OpCopy? case ssa.OpCopy, ssa.OpAMD64MOVQconvert: // TODO: use MOVQreg for reg->reg copies instead of OpCopy?
if v.Type.IsMemory() {
return
}
x := gc.SSARegNum(v.Args[0]) x := gc.SSARegNum(v.Args[0])
y := gc.SSARegNum(v) y := gc.SSARegNum(v)
if x != y { if x != y {
...@@ -969,14 +812,9 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { ...@@ -969,14 +812,9 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
case ssa.OpAMD64NEGQ, ssa.OpAMD64NEGL, ssa.OpAMD64NEGW, ssa.OpAMD64NEGB, case ssa.OpAMD64NEGQ, ssa.OpAMD64NEGL, ssa.OpAMD64NEGW, ssa.OpAMD64NEGB,
ssa.OpAMD64BSWAPQ, ssa.OpAMD64BSWAPL, ssa.OpAMD64BSWAPQ, ssa.OpAMD64BSWAPL,
ssa.OpAMD64NOTQ, ssa.OpAMD64NOTL, ssa.OpAMD64NOTW, ssa.OpAMD64NOTB: ssa.OpAMD64NOTQ, ssa.OpAMD64NOTL, ssa.OpAMD64NOTW, ssa.OpAMD64NOTB:
x := gc.SSARegNum(v.Args[0])
r := gc.SSARegNum(v) r := gc.SSARegNum(v)
if x != r { if r != gc.SSARegNum(v.Args[0]) {
p := gc.Prog(moveByType(v.Type)) v.Fatalf("input[0] and output not in same register %s", v.LongString())
p.From.Type = obj.TYPE_REG
p.From.Reg = x
p.To.Type = obj.TYPE_REG
p.To.Reg = r
} }
p := gc.Prog(v.Op.Asm()) p := gc.Prog(v.Op.Asm())
p.To.Type = obj.TYPE_REG p.To.Type = obj.TYPE_REG
......
...@@ -1273,6 +1273,12 @@ ...@@ -1273,6 +1273,12 @@
(XORWconst [c] x) && int16(c)==0 -> x (XORWconst [c] x) && int16(c)==0 -> x
(XORBconst [c] x) && int8(c)==0 -> x (XORBconst [c] x) && int8(c)==0 -> x
// Convert constant subtracts to constant adds
(SUBQconst [c] x) && c != -(1<<31) -> (ADDQconst [-c] x)
(SUBLconst [c] x) -> (ADDLconst [int64(int32(-c))] x)
(SUBWconst [c] x) -> (ADDWconst [int64(int16(-c))] x)
(SUBBconst [c] x) -> (ADDBconst [int64(int8(-c))] x)
// generic constant folding // generic constant folding
// TODO: more of this // TODO: more of this
(ADDQconst [c] (MOVQconst [d])) -> (MOVQconst [c+d]) (ADDQconst [c] (MOVQconst [d])) -> (MOVQconst [c+d])
......
...@@ -111,12 +111,14 @@ func init() { ...@@ -111,12 +111,14 @@ func init() {
// Common regInfo // Common regInfo
var ( var (
gp01 = regInfo{inputs: []regMask{}, outputs: gponly} gp01 = regInfo{inputs: []regMask{}, outputs: gponly}
gp11 = regInfo{inputs: []regMask{gpsp}, outputs: gponly, clobbers: flags} gp11 = regInfo{inputs: []regMask{gp}, outputs: gponly, clobbers: flags}
gp11sp = regInfo{inputs: []regMask{gpsp}, outputs: gponly, clobbers: flags}
gp11nf = regInfo{inputs: []regMask{gpsp}, outputs: gponly} // nf: no flags clobbered gp11nf = regInfo{inputs: []regMask{gpsp}, outputs: gponly} // nf: no flags clobbered
gp11sb = regInfo{inputs: []regMask{gpspsb}, outputs: gponly} gp11sb = regInfo{inputs: []regMask{gpspsb}, outputs: gponly}
gp21 = regInfo{inputs: []regMask{gpsp, gpsp}, outputs: gponly, clobbers: flags} gp21 = regInfo{inputs: []regMask{gp, gp}, outputs: gponly, clobbers: flags}
gp21sp = regInfo{inputs: []regMask{gpsp, gp}, outputs: gponly, clobbers: flags}
gp21sb = regInfo{inputs: []regMask{gpspsb, gpsp}, outputs: gponly} gp21sb = regInfo{inputs: []regMask{gpspsb, gpsp}, outputs: gponly}
gp21shift = regInfo{inputs: []regMask{gpsp, cx}, outputs: []regMask{gp &^ cx}, clobbers: flags} gp21shift = regInfo{inputs: []regMask{gp, cx}, outputs: []regMask{gp}, clobbers: flags}
gp11div = regInfo{inputs: []regMask{ax, gpsp &^ dx}, outputs: []regMask{ax}, gp11div = regInfo{inputs: []regMask{ax, gpsp &^ dx}, outputs: []regMask{ax},
clobbers: dx | flags} clobbers: dx | flags}
gp11hmul = regInfo{inputs: []regMask{ax, gpsp}, outputs: []regMask{dx}, gp11hmul = regInfo{inputs: []regMask{ax, gpsp}, outputs: []regMask{dx},
...@@ -128,8 +130,8 @@ func init() { ...@@ -128,8 +130,8 @@ func init() {
gp1flags = regInfo{inputs: []regMask{gpsp}, outputs: flagsonly} gp1flags = regInfo{inputs: []regMask{gpsp}, outputs: flagsonly}
flagsgp = regInfo{inputs: flagsonly, outputs: gponly} flagsgp = regInfo{inputs: flagsonly, outputs: gponly}
// for CMOVconst -- uses AX to hold constant temporary. AX input is moved before temp. // for CMOVconst -- uses AX to hold constant temporary.
gp1flagsgp = regInfo{inputs: []regMask{gp, flags}, clobbers: ax | flags, outputs: []regMask{gp &^ ax}} gp1flagsgp = regInfo{inputs: []regMask{gp &^ ax, flags}, clobbers: ax | flags, outputs: []regMask{gp &^ ax}}
readflags = regInfo{inputs: flagsonly, outputs: gponly} readflags = regInfo{inputs: flagsonly, outputs: gponly}
flagsgpax = regInfo{inputs: flagsonly, clobbers: ax | flags, outputs: []regMask{gp &^ ax}} flagsgpax = regInfo{inputs: flagsonly, clobbers: ax | flags, outputs: []regMask{gp &^ ax}}
...@@ -186,14 +188,14 @@ func init() { ...@@ -186,14 +188,14 @@ func init() {
{name: "MOVSDstoreidx8", argLength: 4, reg: fpstoreidx, asm: "MOVSD", aux: "SymOff"}, // fp64 indexed by 8i store {name: "MOVSDstoreidx8", argLength: 4, reg: fpstoreidx, asm: "MOVSD", aux: "SymOff"}, // fp64 indexed by 8i store
// binary ops // binary ops
{name: "ADDQ", argLength: 2, reg: gp21, asm: "ADDQ", commutative: true, resultInArg0: true}, // arg0 + arg1 {name: "ADDQ", argLength: 2, reg: gp21sp, asm: "ADDQ", commutative: true}, // arg0 + arg1
{name: "ADDL", argLength: 2, reg: gp21, asm: "ADDL", commutative: true, resultInArg0: true}, // arg0 + arg1 {name: "ADDL", argLength: 2, reg: gp21sp, asm: "ADDL", commutative: true}, // arg0 + arg1
{name: "ADDW", argLength: 2, reg: gp21, asm: "ADDL", commutative: true, resultInArg0: true}, // arg0 + arg1 {name: "ADDW", argLength: 2, reg: gp21sp, asm: "ADDL", commutative: true}, // arg0 + arg1
{name: "ADDB", argLength: 2, reg: gp21, asm: "ADDL", commutative: true, resultInArg0: true}, // arg0 + arg1 {name: "ADDB", argLength: 2, reg: gp21sp, asm: "ADDL", commutative: true}, // arg0 + arg1
{name: "ADDQconst", argLength: 1, reg: gp11, asm: "ADDQ", aux: "Int64", resultInArg0: true, typ: "UInt64"}, // arg0 + auxint {name: "ADDQconst", argLength: 1, reg: gp11sp, asm: "ADDQ", aux: "Int64", typ: "UInt64"}, // arg0 + auxint
{name: "ADDLconst", argLength: 1, reg: gp11, asm: "ADDL", aux: "Int32", resultInArg0: true}, // arg0 + auxint {name: "ADDLconst", argLength: 1, reg: gp11sp, asm: "ADDL", aux: "Int32"}, // arg0 + auxint
{name: "ADDWconst", argLength: 1, reg: gp11, asm: "ADDL", aux: "Int16", resultInArg0: true}, // arg0 + auxint {name: "ADDWconst", argLength: 1, reg: gp11sp, asm: "ADDL", aux: "Int16"}, // arg0 + auxint
{name: "ADDBconst", argLength: 1, reg: gp11, asm: "ADDL", aux: "Int8", resultInArg0: true}, // arg0 + auxint {name: "ADDBconst", argLength: 1, reg: gp11sp, asm: "ADDL", aux: "Int8"}, // arg0 + auxint
{name: "SUBQ", argLength: 2, reg: gp21, asm: "SUBQ", resultInArg0: true}, // arg0 - arg1 {name: "SUBQ", argLength: 2, reg: gp21, asm: "SUBQ", resultInArg0: true}, // arg0 - arg1
{name: "SUBL", argLength: 2, reg: gp21, asm: "SUBL", resultInArg0: true}, // arg0 - arg1 {name: "SUBL", argLength: 2, reg: gp21, asm: "SUBL", resultInArg0: true}, // arg0 - arg1
......
...@@ -39,7 +39,7 @@ type opData struct { ...@@ -39,7 +39,7 @@ type opData struct {
rematerializeable bool rematerializeable bool
argLength int32 // number of arguments, if -1, then this operation has a variable number of arguments argLength int32 // number of arguments, if -1, then this operation has a variable number of arguments
commutative bool // this operation is commutative (e.g. addition) commutative bool // this operation is commutative (e.g. addition)
resultInArg0 bool // prefer v and v.Args[0] to be allocated to the same register resultInArg0 bool // v and v.Args[0] must be allocated to the same register
} }
type blockData struct { type blockData struct {
...@@ -155,6 +155,12 @@ func genOp() { ...@@ -155,6 +155,12 @@ func genOp() {
} }
if v.resultInArg0 { if v.resultInArg0 {
fmt.Fprintln(w, "resultInArg0: true,") fmt.Fprintln(w, "resultInArg0: true,")
if v.reg.inputs[0] != v.reg.outputs[0] {
log.Fatalf("input[0] and output registers must be equal for %s", v.name)
}
if v.commutative && v.reg.inputs[1] != v.reg.outputs[0] {
log.Fatalf("input[1] and output registers must be equal for %s", v.name)
}
} }
if a.name == "generic" { if a.name == "generic" {
fmt.Fprintln(w, "generic:true,") fmt.Fprintln(w, "generic:true,")
......
...@@ -26,7 +26,7 @@ type opInfo struct { ...@@ -26,7 +26,7 @@ type opInfo struct {
generic bool // this is a generic (arch-independent) opcode generic bool // this is a generic (arch-independent) opcode
rematerializeable bool // this op is rematerializeable rematerializeable bool // this op is rematerializeable
commutative bool // this operation is commutative (e.g. addition) commutative bool // this operation is commutative (e.g. addition)
resultInArg0 bool // prefer v and v.Args[0] to be allocated to the same register resultInArg0 bool // v and v.Args[0] must be allocated to the same register
} }
type inputInfo struct { type inputInfo struct {
......
...@@ -971,15 +971,14 @@ var opcodeTable = [...]opInfo{ ...@@ -971,15 +971,14 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDQ", name: "ADDQ",
argLen: 2, argLen: 2,
commutative: true, commutative: true,
resultInArg0: true, asm: x86.AADDQ,
asm: x86.AADDQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -988,15 +987,14 @@ var opcodeTable = [...]opInfo{ ...@@ -988,15 +987,14 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDL", name: "ADDL",
argLen: 2, argLen: 2,
commutative: true, commutative: true,
resultInArg0: true, asm: x86.AADDL,
asm: x86.AADDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1005,15 +1003,14 @@ var opcodeTable = [...]opInfo{ ...@@ -1005,15 +1003,14 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDW", name: "ADDW",
argLen: 2, argLen: 2,
commutative: true, commutative: true,
resultInArg0: true, asm: x86.AADDL,
asm: x86.AADDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1022,15 +1019,14 @@ var opcodeTable = [...]opInfo{ ...@@ -1022,15 +1019,14 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDB", name: "ADDB",
argLen: 2, argLen: 2,
commutative: true, commutative: true,
resultInArg0: true, asm: x86.AADDL,
asm: x86.AADDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1039,11 +1035,10 @@ var opcodeTable = [...]opInfo{ ...@@ -1039,11 +1035,10 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDQconst", name: "ADDQconst",
auxType: auxInt64, auxType: auxInt64,
argLen: 1, argLen: 1,
resultInArg0: true, asm: x86.AADDQ,
asm: x86.AADDQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
...@@ -1055,11 +1050,10 @@ var opcodeTable = [...]opInfo{ ...@@ -1055,11 +1050,10 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDLconst", name: "ADDLconst",
auxType: auxInt32, auxType: auxInt32,
argLen: 1, argLen: 1,
resultInArg0: true, asm: x86.AADDL,
asm: x86.AADDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
...@@ -1071,11 +1065,10 @@ var opcodeTable = [...]opInfo{ ...@@ -1071,11 +1065,10 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDWconst", name: "ADDWconst",
auxType: auxInt16, auxType: auxInt16,
argLen: 1, argLen: 1,
resultInArg0: true, asm: x86.AADDL,
asm: x86.AADDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
...@@ -1087,11 +1080,10 @@ var opcodeTable = [...]opInfo{ ...@@ -1087,11 +1080,10 @@ var opcodeTable = [...]opInfo{
}, },
}, },
{ {
name: "ADDBconst", name: "ADDBconst",
auxType: auxInt8, auxType: auxInt8,
argLen: 1, argLen: 1,
resultInArg0: true, asm: x86.AADDL,
asm: x86.AADDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
...@@ -1109,8 +1101,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1109,8 +1101,8 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBQ, asm: x86.ASUBQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1125,8 +1117,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1125,8 +1117,8 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBL, asm: x86.ASUBL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1141,8 +1133,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1141,8 +1133,8 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBL, asm: x86.ASUBL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1157,8 +1149,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1157,8 +1149,8 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBL, asm: x86.ASUBL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1174,7 +1166,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1174,7 +1166,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBQ, asm: x86.ASUBQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1190,7 +1182,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1190,7 +1182,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBL, asm: x86.ASUBL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1206,7 +1198,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1206,7 +1198,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBL, asm: x86.ASUBL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1222,7 +1214,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1222,7 +1214,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASUBL, asm: x86.ASUBL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1238,8 +1230,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1238,8 +1230,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULQ, asm: x86.AIMULQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1255,8 +1247,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1255,8 +1247,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULL, asm: x86.AIMULL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1272,8 +1264,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1272,8 +1264,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULW, asm: x86.AIMULW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1289,8 +1281,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1289,8 +1281,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULW, asm: x86.AIMULW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1306,7 +1298,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1306,7 +1298,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULQ, asm: x86.AIMULQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1322,7 +1314,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1322,7 +1314,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULL, asm: x86.AIMULL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1338,7 +1330,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1338,7 +1330,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULW, asm: x86.AIMULW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1354,7 +1346,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1354,7 +1346,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AIMULW, asm: x86.AIMULW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1489,8 +1481,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1489,8 +1481,8 @@ var opcodeTable = [...]opInfo{
resultInArg0: true, resultInArg0: true,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1686,8 +1678,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1686,8 +1678,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDQ, asm: x86.AANDQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1703,8 +1695,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1703,8 +1695,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDL, asm: x86.AANDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1720,8 +1712,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1720,8 +1712,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDL, asm: x86.AANDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1737,8 +1729,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1737,8 +1729,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDL, asm: x86.AANDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1754,7 +1746,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1754,7 +1746,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDQ, asm: x86.AANDQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1770,7 +1762,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1770,7 +1762,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDL, asm: x86.AANDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1786,7 +1778,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1786,7 +1778,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDL, asm: x86.AANDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1802,7 +1794,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1802,7 +1794,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AANDL, asm: x86.AANDL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1818,8 +1810,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1818,8 +1810,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AORQ, asm: x86.AORQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1835,8 +1827,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1835,8 +1827,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AORL, asm: x86.AORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1852,8 +1844,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1852,8 +1844,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AORL, asm: x86.AORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1869,8 +1861,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1869,8 +1861,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AORL, asm: x86.AORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1886,7 +1878,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1886,7 +1878,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AORQ, asm: x86.AORQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1902,7 +1894,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1902,7 +1894,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AORL, asm: x86.AORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1918,7 +1910,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1918,7 +1910,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AORL, asm: x86.AORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1934,7 +1926,7 @@ var opcodeTable = [...]opInfo{ ...@@ -1934,7 +1926,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AORL, asm: x86.AORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1950,8 +1942,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1950,8 +1942,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORQ, asm: x86.AXORQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1967,8 +1959,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1967,8 +1959,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORL, asm: x86.AXORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -1984,8 +1976,8 @@ var opcodeTable = [...]opInfo{ ...@@ -1984,8 +1976,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORL, asm: x86.AXORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2001,8 +1993,8 @@ var opcodeTable = [...]opInfo{ ...@@ -2001,8 +1993,8 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORL, asm: x86.AXORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
{1, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {1, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2018,7 +2010,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2018,7 +2010,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORQ, asm: x86.AXORQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2034,7 +2026,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2034,7 +2026,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORL, asm: x86.AXORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2050,7 +2042,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2050,7 +2042,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORL, asm: x86.AXORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2066,7 +2058,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2066,7 +2058,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AXORL, asm: x86.AXORL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2334,11 +2326,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2334,11 +2326,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2350,11 +2342,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2350,11 +2342,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2366,11 +2358,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2366,11 +2358,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2382,11 +2374,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2382,11 +2374,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2398,7 +2390,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2398,7 +2390,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHLQ, asm: x86.ASHLQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2414,7 +2406,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2414,7 +2406,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHLL, asm: x86.ASHLL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2430,7 +2422,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2430,7 +2422,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHLL, asm: x86.ASHLL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2446,7 +2438,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2446,7 +2438,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHLL, asm: x86.ASHLL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2462,11 +2454,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2462,11 +2454,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2478,11 +2470,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2478,11 +2470,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2494,11 +2486,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2494,11 +2486,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2510,11 +2502,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2510,11 +2502,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2526,7 +2518,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2526,7 +2518,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHRQ, asm: x86.ASHRQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2542,7 +2534,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2542,7 +2534,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHRL, asm: x86.ASHRL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2558,7 +2550,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2558,7 +2550,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHRW, asm: x86.ASHRW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2574,7 +2566,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2574,7 +2566,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASHRB, asm: x86.ASHRB,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2590,11 +2582,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2590,11 +2582,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2606,11 +2598,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2606,11 +2598,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2622,11 +2614,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2622,11 +2614,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2638,11 +2630,11 @@ var opcodeTable = [...]opInfo{ ...@@ -2638,11 +2630,11 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 2}, // CX {1, 2}, // CX
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
65517, // AX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 65519, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
}, },
}, },
...@@ -2654,7 +2646,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2654,7 +2646,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASARQ, asm: x86.ASARQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2670,7 +2662,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2670,7 +2662,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASARL, asm: x86.ASARL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2686,7 +2678,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2686,7 +2678,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASARW, asm: x86.ASARW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2702,7 +2694,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2702,7 +2694,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ASARB, asm: x86.ASARB,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2718,7 +2710,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2718,7 +2710,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AROLQ, asm: x86.AROLQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2734,7 +2726,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2734,7 +2726,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AROLL, asm: x86.AROLL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2750,7 +2742,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2750,7 +2742,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AROLW, asm: x86.AROLW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2766,7 +2758,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2766,7 +2758,7 @@ var opcodeTable = [...]opInfo{
asm: x86.AROLB, asm: x86.AROLB,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2781,7 +2773,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2781,7 +2773,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANEGQ, asm: x86.ANEGQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2796,7 +2788,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2796,7 +2788,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANEGL, asm: x86.ANEGL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2811,7 +2803,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2811,7 +2803,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANEGL, asm: x86.ANEGL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2826,7 +2818,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2826,7 +2818,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANEGL, asm: x86.ANEGL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2841,7 +2833,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2841,7 +2833,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANOTQ, asm: x86.ANOTQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2856,7 +2848,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2856,7 +2848,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANOTL, asm: x86.ANOTL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2871,7 +2863,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2871,7 +2863,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANOTL, asm: x86.ANOTL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2886,7 +2878,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2886,7 +2878,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ANOTL, asm: x86.ANOTL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2900,7 +2892,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2900,7 +2892,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSFQ, asm: x86.ABSFQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2914,7 +2906,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2914,7 +2906,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSFL, asm: x86.ABSFL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2928,7 +2920,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2928,7 +2920,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSFW, asm: x86.ABSFW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2942,7 +2934,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2942,7 +2934,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSRQ, asm: x86.ABSRQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2956,7 +2948,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2956,7 +2948,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSRL, asm: x86.ABSRL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2970,7 +2962,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2970,7 +2962,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSRW, asm: x86.ABSRW,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -2987,7 +2979,7 @@ var opcodeTable = [...]opInfo{ ...@@ -2987,7 +2979,7 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 8589934592}, // FLAGS {1, 8589934592}, // FLAGS
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65518}, // CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934593, // AX FLAGS clobbers: 8589934593, // AX FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3004,7 +2996,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3004,7 +2996,7 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 8589934592}, // FLAGS {1, 8589934592}, // FLAGS
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65518}, // CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934593, // AX FLAGS clobbers: 8589934593, // AX FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3021,7 +3013,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3021,7 +3013,7 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 8589934592}, // FLAGS {1, 8589934592}, // FLAGS
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65518}, // CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934593, // AX FLAGS clobbers: 8589934593, // AX FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3038,7 +3030,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3038,7 +3030,7 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 8589934592}, // FLAGS {1, 8589934592}, // FLAGS
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65518}, // CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934593, // AX FLAGS clobbers: 8589934593, // AX FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3055,7 +3047,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3055,7 +3047,7 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 8589934592}, // FLAGS {1, 8589934592}, // FLAGS
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65518}, // CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934593, // AX FLAGS clobbers: 8589934593, // AX FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3072,7 +3064,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3072,7 +3064,7 @@ var opcodeTable = [...]opInfo{
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{1, 8589934592}, // FLAGS {1, 8589934592}, // FLAGS
{0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65518}, // CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934593, // AX FLAGS clobbers: 8589934593, // AX FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3087,7 +3079,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3087,7 +3079,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSWAPQ, asm: x86.ABSWAPQ,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
...@@ -3102,7 +3094,7 @@ var opcodeTable = [...]opInfo{ ...@@ -3102,7 +3094,7 @@ var opcodeTable = [...]opInfo{
asm: x86.ABSWAPL, asm: x86.ABSWAPL,
reg: regInfo{ reg: regInfo{
inputs: []inputInfo{ inputs: []inputInfo{
{0, 65535}, // AX CX DX BX SP BP SI DI R8 R9 R10 R11 R12 R13 R14 R15 {0, 65519}, // AX CX DX BX BP SI DI R8 R9 R10 R11 R12 R13 R14 R15
}, },
clobbers: 8589934592, // FLAGS clobbers: 8589934592, // FLAGS
outputs: []regMask{ outputs: []regMask{
......
...@@ -527,6 +527,18 @@ func (s *regAllocState) advanceUses(v *Value) { ...@@ -527,6 +527,18 @@ func (s *regAllocState) advanceUses(v *Value) {
} }
} }
// liveAfterCurrentInstruction reports whether v is live after
// the current instruction is completed. v must be used by the
// current instruction.
func (s *regAllocState) liveAfterCurrentInstruction(v *Value) bool {
u := s.values[v.ID].uses
d := u.dist
for u != nil && u.dist == d {
u = u.next
}
return u != nil && u.dist > d
}
// Sets the state of the registers to that encoded in regs. // Sets the state of the registers to that encoded in regs.
func (s *regAllocState) setState(regs []endReg) { func (s *regAllocState) setState(regs []endReg) {
s.freeRegs(s.used) s.freeRegs(s.used)
...@@ -891,6 +903,27 @@ func (s *regAllocState) regalloc(f *Func) { ...@@ -891,6 +903,27 @@ func (s *regAllocState) regalloc(f *Func) {
args[i.idx] = s.allocValToReg(v.Args[i.idx], i.regs, true, v.Line) args[i.idx] = s.allocValToReg(v.Args[i.idx], i.regs, true, v.Line)
} }
// If the output clobbers the input register, and the input register is
// live beyond the instruction, make another copy of the input register so
// we don't have to reload the value from the spill location.
if opcodeTable[v.Op].resultInArg0 &&
s.liveAfterCurrentInstruction(v.Args[0]) &&
countRegs(s.values[v.Args[0].ID].regs) == 1 {
if opcodeTable[v.Op].commutative &&
(!s.liveAfterCurrentInstruction(v.Args[1]) ||
countRegs(s.values[v.Args[1].ID].regs) > 1) {
// Input #1 is dead after the instruction, or we have
// more than one copy of it in a register. Either way,
// use that input as the one that is clobbered.
args[0], args[1] = args[1], args[0]
} else {
m := s.compatRegs(v.Args[0].Type)
m &^= s.values[v.Args[0].ID].regs // a register not already holding v.Args[0]
s.allocValToReg(v.Args[0], m, true, v.Line)
}
}
// Now that all args are in regs, we're ready to issue the value itself. // Now that all args are in regs, we're ready to issue the value itself.
// Before we pick a register for the output value, allow input registers // Before we pick a register for the output value, allow input registers
// to be deallocated. We do this here so that the output can use the // to be deallocated. We do this here so that the output can use the
...@@ -908,19 +941,9 @@ func (s *regAllocState) regalloc(f *Func) { ...@@ -908,19 +941,9 @@ func (s *regAllocState) regalloc(f *Func) {
s.f.Fatalf("bad mask %s\n", v.LongString()) s.f.Fatalf("bad mask %s\n", v.LongString())
} }
if opcodeTable[v.Op].resultInArg0 { if opcodeTable[v.Op].resultInArg0 {
// Output must use the same register as input 0.
r := register(s.f.getHome(args[0].ID).(*Register).Num) r := register(s.f.getHome(args[0].ID).(*Register).Num)
if (mask&^s.used)>>r&1 != 0 { mask = regMask(1) << r
mask = regMask(1) << r
}
if opcodeTable[v.Op].commutative {
r := register(s.f.getHome(args[1].ID).(*Register).Num)
if (mask&^s.used)>>r&1 != 0 {
mask = regMask(1) << r
}
}
// TODO: enforce resultInArg0 always, instead of treating it
// as a hint. Then we don't need the special cases adding
// moves all throughout ssa.go:genValue.
} }
r := s.allocReg(v, mask) r := s.allocReg(v, mask)
s.assignReg(r, v, v) s.assignReg(r, v, v)
......
...@@ -16653,6 +16653,17 @@ func rewriteValueAMD64_OpAMD64SUBBconst(v *Value, config *Config) bool { ...@@ -16653,6 +16653,17 @@ func rewriteValueAMD64_OpAMD64SUBBconst(v *Value, config *Config) bool {
v.AddArg(x) v.AddArg(x)
return true return true
} }
// match: (SUBBconst [c] x)
// cond:
// result: (ADDBconst [int64(int8(-c))] x)
for {
c := v.AuxInt
x := v.Args[0]
v.reset(OpAMD64ADDBconst)
v.AuxInt = int64(int8(-c))
v.AddArg(x)
return true
}
// match: (SUBBconst (MOVBconst [d]) [c]) // match: (SUBBconst (MOVBconst [d]) [c])
// cond: // cond:
// result: (MOVBconst [int64(int8(d-c))]) // result: (MOVBconst [int64(int8(d-c))])
...@@ -16751,6 +16762,17 @@ func rewriteValueAMD64_OpAMD64SUBLconst(v *Value, config *Config) bool { ...@@ -16751,6 +16762,17 @@ func rewriteValueAMD64_OpAMD64SUBLconst(v *Value, config *Config) bool {
v.AddArg(x) v.AddArg(x)
return true return true
} }
// match: (SUBLconst [c] x)
// cond:
// result: (ADDLconst [int64(int32(-c))] x)
for {
c := v.AuxInt
x := v.Args[0]
v.reset(OpAMD64ADDLconst)
v.AuxInt = int64(int32(-c))
v.AddArg(x)
return true
}
// match: (SUBLconst (MOVLconst [d]) [c]) // match: (SUBLconst (MOVLconst [d]) [c])
// cond: // cond:
// result: (MOVLconst [int64(int32(d-c))]) // result: (MOVLconst [int64(int32(d-c))])
...@@ -16854,6 +16876,20 @@ func rewriteValueAMD64_OpAMD64SUBQconst(v *Value, config *Config) bool { ...@@ -16854,6 +16876,20 @@ func rewriteValueAMD64_OpAMD64SUBQconst(v *Value, config *Config) bool {
v.AddArg(x) v.AddArg(x)
return true return true
} }
// match: (SUBQconst [c] x)
// cond: c != -(1<<31)
// result: (ADDQconst [-c] x)
for {
c := v.AuxInt
x := v.Args[0]
if !(c != -(1 << 31)) {
break
}
v.reset(OpAMD64ADDQconst)
v.AuxInt = -c
v.AddArg(x)
return true
}
// match: (SUBQconst (MOVQconst [d]) [c]) // match: (SUBQconst (MOVQconst [d]) [c])
// cond: // cond:
// result: (MOVQconst [d-c]) // result: (MOVQconst [d-c])
...@@ -16955,6 +16991,17 @@ func rewriteValueAMD64_OpAMD64SUBWconst(v *Value, config *Config) bool { ...@@ -16955,6 +16991,17 @@ func rewriteValueAMD64_OpAMD64SUBWconst(v *Value, config *Config) bool {
v.AddArg(x) v.AddArg(x)
return true return true
} }
// match: (SUBWconst [c] x)
// cond:
// result: (ADDWconst [int64(int16(-c))] x)
for {
c := v.AuxInt
x := v.Args[0]
v.reset(OpAMD64ADDWconst)
v.AuxInt = int64(int16(-c))
v.AddArg(x)
return true
}
// match: (SUBWconst (MOVWconst [d]) [c]) // match: (SUBWconst (MOVWconst [d]) [c])
// cond: // cond:
// result: (MOVWconst [int64(int16(d-c))]) // result: (MOVWconst [int64(int16(d-c))])
......
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