Commit a45d6859 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: enforce that MOVXconvert is a no-op on 386 and amd64

Follow-up to CL 58371.

Change-Id: I3d2aaec84ee6db3ef1bd4fcfcaf46cc297c7176b
Reviewed-on: https://go-review.googlesource.com/58610
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent fb05948d
......@@ -731,7 +731,11 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Sym = gc.Duffcopy
p.To.Offset = v.AuxInt
case ssa.OpCopy, ssa.OpAMD64MOVQconvert, ssa.OpAMD64MOVLconvert: // TODO: use MOVQreg for reg->reg copies instead of OpCopy?
case ssa.OpAMD64MOVQconvert, ssa.OpAMD64MOVLconvert:
if v.Args[0].Reg() != v.Reg() {
v.Fatalf("MOVXconvert should be a no-op")
}
case ssa.OpCopy: // TODO: use MOVQreg for reg->reg copies instead of OpCopy?
if v.Type.IsMemory() {
return
}
......
......@@ -604,7 +604,11 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
p.To.Sym = gc.Duffcopy
p.To.Offset = v.AuxInt
case ssa.OpCopy, ssa.Op386MOVLconvert: // TODO: use MOVLreg for reg->reg copies instead of OpCopy?
case ssa.Op386MOVLconvert:
if v.Args[0].Reg() != v.Reg() {
v.Fatalf("MOVLconvert should be a no-op")
}
case ssa.OpCopy: // TODO: use MOVLreg for reg->reg copies instead of OpCopy?
if v.Type.IsMemory() {
return
}
......
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