Infer REX prefix for SIMD load instruction

This commit is contained in:
Andrew Brown
2020-02-13 10:46:47 -08:00
parent 936120dcf9
commit 1a9dc743d1
4 changed files with 29 additions and 5 deletions

View File

@@ -1835,7 +1835,10 @@ fn define_simd(
// Load
let bound_load = load.bind(vector(ty, sse_vector_size)).bind(Any);
e.enc_32_64(bound_load.clone(), rec_fld.opcodes(&MOVUPS_LOAD));
e.enc_32_64(
bound_load.clone(),
rec_fld.opcodes(&MOVUPS_LOAD).infer_rex(),
);
e.enc_32_64(bound_load.clone(), rec_fldDisp8.opcodes(&MOVUPS_LOAD));
e.enc_32_64(bound_load, rec_fldDisp32.opcodes(&MOVUPS_LOAD));

View File

@@ -2002,7 +2002,7 @@ pub(crate) fn define<'shared>(
);
// XX /r float load with no offset.
recipes.add_template_recipe(
recipes.add_template_inferred(
EncodingRecipeBuilder::new("fld", &formats.load, 1)
.operands_in(vec![gpr])
.operands_out(vec![fpr])
@@ -2026,6 +2026,7 @@ pub(crate) fn define<'shared>(
}
"#,
),
"size_plus_maybe_sib_or_offset_for_inreg_0_plus_rex_prefix_for_inreg0_outreg0",
);
let has_small_offset =