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:
@@ -412,6 +412,11 @@ impl Context for IsleContext<'_, '_, MInst, Flags, IsaFlags, 6> {
|
||||
amode.clone().into()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn const_to_synthetic_amode(&mut self, c: VCodeConstant) -> SyntheticAmode {
|
||||
SyntheticAmode::ConstantOffset(c)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn writable_gpr_to_reg(&mut self, r: WritableGpr) -> WritableReg {
|
||||
r.to_writable_reg()
|
||||
|
||||
Reference in New Issue
Block a user