emit_arm64_data_processing: Fix LogicalShiftRight32 for immediate shift = 32

This commit is contained in:
Merry 2022-07-24 22:28:15 +01:00 committed by merry
parent 78e266a869
commit 3d420e34ae

View file

@ -380,7 +380,7 @@ void EmitIR<IR::Opcode::LogicalShiftRight32>(oaknut::CodeGenerator& code, EmitCo
auto Woperand = ctx.reg_alloc.ReadW(operand_arg); auto Woperand = ctx.reg_alloc.ReadW(operand_arg);
RegAlloc::Realize(Wresult, Wcarry_out, Woperand); RegAlloc::Realize(Wresult, Wcarry_out, Woperand);
code.LSL(Wcarry_out, Woperand, 31 - 29); code.LSR(Wcarry_out, Woperand, 31 - 29);
code.AND(Wcarry_out, Wcarry_out, 1 << 29); code.AND(Wcarry_out, Wcarry_out, 1 << 29);
code.MOV(Wresult, WZR); code.MOV(Wresult, WZR);
} }