@@ -1927,14 +1927,15 @@ void CodeGen::genAllocLclFrame(unsigned frameSize, regNumber initReg, bool* pIni
19271927
19281928void CodeGen::genPushFltRegs (regMaskTP regMask)
19291929{
1930- assert (regMask != 0 ); // Don't call uness we have some registers to push
1931- assert ((regMask & RBM_ALLFLOAT) == regMask); // Only floasting point registers should be in regMask
1930+ assert (regMask != 0 ); // Don't call unless we have some registers to push
1931+ assert ((regMask & RBM_ALLFLOAT) == regMask); // Only floating point registers should be in regMask
19321932
19331933 regNumber lowReg = genRegNumFromMask (genFindLowestBit (regMask));
19341934 int slots = genCountBits (regMask);
1935+
19351936 // regMask should be contiguously set
1936- regMaskTP tmpMask = ((regMask >> lowReg) + 1 ); // tmpMask should have a single bit set
1937- assert ((tmpMask & (tmpMask - 1 )) == 0 );
1937+ regMaskSmall tmpMask = ((regMask. getLow () >> lowReg) + 1 ); // tmpMask should have a single bit set
1938+ assert (genMaxOneBit (tmpMask) );
19381939 assert (lowReg == REG_F16); // Currently we expect to start at F16 in the unwind codes
19391940
19401941 // Our calling convention requires that we only use vpush for TYP_DOUBLE registers
@@ -1952,8 +1953,8 @@ void CodeGen::genPopFltRegs(regMaskTP regMask)
19521953 regNumber lowReg = genRegNumFromMask (genFindLowestBit (regMask));
19531954 int slots = genCountBits (regMask);
19541955 // regMask should be contiguously set
1955- regMaskTP tmpMask = ((regMask >> lowReg) + 1 ); // tmpMask should have a single bit set
1956- assert ((tmpMask & (tmpMask - 1 )) == 0 );
1956+ regMaskSmall tmpMask = ((regMask. getLow () >> lowReg) + 1 ); // tmpMask should have a single bit set
1957+ assert (genMaxOneBit (tmpMask) );
19571958
19581959 // Our calling convention requires that we only use vpop for TYP_DOUBLE registers
19591960 noway_assert (floatRegCanHoldType (lowReg, TYP_DOUBLE));
@@ -2192,7 +2193,7 @@ void CodeGen::genPopCalleeSavedRegisters(bool jmpEpilog)
21922193 genUsedPopToReturn = false ;
21932194 }
21942195
2195- assert (FitsIn<int >(maskPopRegsInt));
2196+ assert (FitsIn<int >(maskPopRegsInt. getLow () ));
21962197 inst_IV (INS_pop, (int )maskPopRegsInt);
21972198 compiler->unwindPopMaskInt (maskPopRegsInt);
21982199}
@@ -2320,7 +2321,7 @@ void CodeGen::genFuncletProlog(BasicBlock* block)
23202321 regMaskTP maskStackAlloc = genStackAllocRegisterMask (genFuncletInfo.fiSpDelta , maskPushRegsFloat);
23212322 maskPushRegsInt |= maskStackAlloc;
23222323
2323- assert (FitsIn<int >(maskPushRegsInt));
2324+ assert (FitsIn<int >(maskPushRegsInt. getLow () ));
23242325 inst_IV (INS_push, (int )maskPushRegsInt);
23252326 compiler->unwindPushMaskInt (maskPushRegsInt);
23262327
@@ -2437,7 +2438,7 @@ void CodeGen::genFuncletEpilog()
24372438 compiler->unwindPopMaskFloat (maskPopRegsFloat);
24382439 }
24392440
2440- assert (FitsIn<int >(maskPopRegsInt));
2441+ assert (FitsIn<int >(maskPopRegsInt. getLow () ));
24412442 inst_IV (INS_pop, (int )maskPopRegsInt);
24422443 compiler->unwindPopMaskInt (maskPopRegsInt);
24432444
0 commit comments