x64: remove Inst::XmmLoadConst (#4876)
This is a cherry-pick of a long-ago commit, 2d46637. The original message reads: > Now that `SyntheticAmode` can refer to constants, there is no longer a > need for a separate instruction format--standard load instructions will > work. Since then, the transition to ISLE and the use of `XmmLoadConst` in many more places makes this change a larger diff than the original. The basic idea is the same, though: the extra indirection of `Inst::XMmLoadConst` is removed and replaced by a direct use of `VCodeConstant` as a `SyntheticAmode`. This has no effect on codegen, but the CLIF output is now clearer in that the actual instruction is displayed (e.g., `movdqu`) instead of a made-up instruction (`load_const`).
This commit is contained in:
@@ -112,7 +112,6 @@ impl Inst {
|
||||
| Inst::VirtualSPOffsetAdj { .. }
|
||||
| Inst::XmmCmove { .. }
|
||||
| Inst::XmmCmpRmR { .. }
|
||||
| Inst::XmmLoadConst { .. }
|
||||
| Inst::XmmMinMaxSeq { .. }
|
||||
| Inst::XmmUninitializedValue { .. }
|
||||
| Inst::ElfTlsGetAddr { .. }
|
||||
@@ -1081,11 +1080,6 @@ impl PrettyPrint for Inst {
|
||||
format!("{} {}", ljustify("uninit".into()), dst)
|
||||
}
|
||||
|
||||
Inst::XmmLoadConst { src, dst, .. } => {
|
||||
let dst = pretty_print_reg(dst.to_reg(), 8, allocs);
|
||||
format!("load_const {:?}, {}", src, dst)
|
||||
}
|
||||
|
||||
Inst::XmmToGpr {
|
||||
op,
|
||||
src,
|
||||
@@ -1830,7 +1824,6 @@ fn x64_get_operands<F: Fn(VReg) -> VReg>(inst: &Inst, collector: &mut OperandCol
|
||||
}
|
||||
}
|
||||
Inst::XmmUninitializedValue { dst } => collector.reg_def(dst.to_writable_reg()),
|
||||
Inst::XmmLoadConst { dst, .. } => collector.reg_def(*dst),
|
||||
Inst::XmmMinMaxSeq { lhs, rhs, dst, .. } => {
|
||||
collector.reg_use(rhs.to_reg());
|
||||
collector.reg_use(lhs.to_reg());
|
||||
|
||||
Reference in New Issue
Block a user