Skip to content

Commit

Permalink
Pass the right size to check if immediate will fit or not
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Sep 7, 2023
1 parent a16670a commit d7c511a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/coreclr/jit/codegenarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,14 @@ bool CodeGen::genInstrWithConstant(instruction ins,
break;

case INS_ldrsb:
case INS_ldrsh:
case INS_ldrsw:
case INS_ldrb:
immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_1BYTE);
break;
case INS_ldrsh:
case INS_ldrh:
immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, EA_2BYTE);
break;
case INS_ldrsw:
case INS_ldr:
immFitsInIns = emitter::emitIns_valid_imm_for_ldst_offset(imm, size);
break;
Expand Down

0 comments on commit d7c511a

Please sign in to comment.