emit_x64_data_processing: Correct bug in ArithmeticShiftRight64

This branch of this implementation is unused, and thus has not been tested.
This commit is contained in:
MerryMage 2021-04-27 18:51:23 +01:00
parent 68088c277c
commit 6759942b56

View file

@ -681,7 +681,7 @@ void EmitX64::EmitArithmeticShiftRight64(EmitContext& ctx, IR::Inst* inst) {
// We note that all shift values above 63 have the same behaviour as 63 does, so we saturate `shift` to 63.
code.mov(const63, 63);
code.cmp(code.cl, u32(63));
code.cmovg(code.ecx, const63);
code.cmovnb(code.ecx, const63);
code.sar(result, code.cl);
ctx.reg_alloc.DefineValue(inst, result);