backend/A64: Fix ASR impl

This commit is contained in:
SachinVin 2019-11-02 19:46:22 +05:30
parent e12d635bde
commit 43d37293b1

View File

@ -480,7 +480,7 @@ void EmitA64::EmitArithmeticShiftRight32(EmitContext& ctx, IR::Inst* inst) {
// if (Rs & 0xFF == 0) goto end; // if (Rs & 0xFF == 0) goto end;
end = code.B(CC_EQ); end = code.B(CC_EQ);
// else { // else {
code.MOVI2R(carry, 31); code.MOVI2R(carry, 32);
code.CMPI2R(shift, u32(31)); code.CMPI2R(shift, u32(31));
code.CSEL(shift, shift, carry, CC_LE); code.CSEL(shift, shift, carry, CC_LE);
code.SUBI2R(shift, shift, 1); code.SUBI2R(shift, shift, 1);