YJIT: x64: Split mem-to-mem Insn::Store like Insn::Mov

The ARM backend allows for this so let's make x64 consistent.
This commit is contained in:
Alan Wu 2023-08-22 18:43:56 -04:00 committed by GitHub
parent c23e2e19b7
commit ff55238913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-08-22 22:44:17 +00:00
Merged: https://github.com/ruby/ruby/pull/8263

Merged-By: XrXr
2 changed files with 2 additions and 2 deletions

View File

@ -635,7 +635,7 @@ fn write_rm_multi(cb: &mut CodeBlock, op_mem_reg8: u8, op_mem_reg_pref: u8, op_r
panic!("immediate value too large (num_bits={}, num={uimm:?})", num_bits);
}
},
_ => unreachable!()
_ => panic!("unknown encoding combo: {opnd0:?} {opnd1:?}")
};
}

View File

@ -291,7 +291,7 @@ impl Assembler
*out = asm.next_opnd_out(Opnd::match_num_bits(&[*truthy, *falsy]));
asm.push_insn(insn);
},
Insn::Mov { dest, src } => {
Insn::Mov { dest, src } | Insn::Store { dest, src } => {
match (&dest, &src) {
(Opnd::Mem(_), Opnd::Mem(_)) => {
// We load opnd1 because for mov, opnd0 is the output