Use 'xor r, r' to set registers to 0 instead of mov (#766)
This commit is contained in:
committed by
Benjamin Bouvier
parent
b95508c51a
commit
99380fad1a
@@ -1023,6 +1023,18 @@ pub(crate) fn define<'shared>(
|
||||
),
|
||||
);
|
||||
|
||||
// XX+rd id unary with zero immediate.
|
||||
recipes.add_template_recipe(
|
||||
EncodingRecipeBuilder::new("u_id_z", f_unary_imm, 1)
|
||||
.operands_out(vec![gpr])
|
||||
.emit(
|
||||
r#"
|
||||
{{PUT_OP}}(bits, rex2(out_reg0, out_reg0), sink);
|
||||
modrm_rr(out_reg0, out_reg0, sink);
|
||||
"#,
|
||||
),
|
||||
);
|
||||
|
||||
// XX /n Unary with floating point 32-bit immediate equal to zero.
|
||||
{
|
||||
let format = formats.get(f_unary_ieee32);
|
||||
|
||||
Reference in New Issue
Block a user