mirror of
https://github.com/golang/go
synced 2024-10-02 04:28:33 -06:00
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: Keith Randall <khr@golang.org>
This commit is contained in:
parent
fb05948d9e
commit
a45d6859cb
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user