@@ -9839,11 +9839,7 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va
98399839 scale = NaturalScale_helper(EA_16BYTE);
98409840 ssize_t mask = (1 << scale) - 1; // the mask of low bits that must be zero to encode the immediate
98419841
9842- if (((imm & mask) == 0) && (isValidSimm<9>(imm >> scale)))
9843- {
9844- imm >>= scale; // The immediate is scaled by the size of the ld/st
9845- }
9846- else
9842+ if (((imm & mask) != 0) || (!isValidSimm<9>(imm >> scale)))
98479843 {
98489844 useRegForImm = true;
98499845 regNumber rsvdReg = codeGen->rsGetRsvdReg();
@@ -9867,11 +9863,7 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va
98679863 scale = NaturalScale_helper(EA_2BYTE);
98689864 ssize_t mask = (1 << scale) - 1; // the mask of low bits that must be zero to encode the immediate
98699865
9870- if (((imm & mask) == 0) && (isValidSimm<9>(imm >> scale)))
9871- {
9872- imm >>= scale; // The immediate is scaled by the size of the ld/st
9873- }
9874- else
9866+ if (((imm & mask) != 0) || (!isValidSimm<9>(imm >> scale)))
98759867 {
98769868 useRegForImm = true;
98779869 regNumber rsvdReg = codeGen->rsGetRsvdReg();
@@ -10118,11 +10110,7 @@ void emitter::emitIns_S_R(instruction ins, emitAttr attr, regNumber reg1, int va
1011810110 scale = NaturalScale_helper(EA_16BYTE);
1011910111 ssize_t mask = (1 << scale) - 1; // the mask of low bits that must be zero to encode the immediate
1012010112
10121- if (((imm & mask) == 0) && (isValidSimm<9>(imm >> scale)))
10122- {
10123- imm >>= scale; // The immediate is scaled by the size of the ld/st
10124- }
10125- else
10113+ if (((imm & mask) != 0) || (!isValidSimm<9>(imm >> scale)))
1012610114 {
1012710115 useRegForImm = true;
1012810116 regNumber rsvdReg = codeGen->rsGetRsvdReg();
@@ -10146,11 +10134,7 @@ void emitter::emitIns_S_R(instruction ins, emitAttr attr, regNumber reg1, int va
1014610134 scale = NaturalScale_helper(EA_2BYTE);
1014710135 ssize_t mask = (1 << scale) - 1; // the mask of low bits that must be zero to encode the immediate
1014810136
10149- if (((imm & mask) == 0) && (isValidSimm<9>(imm >> scale)))
10150- {
10151- imm >>= scale; // The immediate is scaled by the size of the ld/st
10152- }
10153- else
10137+ if (((imm & mask) != 0) || (!isValidSimm<9>(imm >> scale)))
1015410138 {
1015510139 useRegForImm = true;
1015610140 regNumber rsvdReg = codeGen->rsGetRsvdReg();
0 commit comments