Lines Matching refs:cBits
194 def randUxx(cBits):
196 return g_oMyRand.getrandbits(cBits);
198 def randSxx(cBits):
200 uVal = randUxx(cBits);
201 iRet = uVal & ((1 << (cBits - 1)) - 1);
206 def randUxxList(cBits, cElements):
208 return [randUxx(cBits) for _ in range(cElements)];
254 def rotateLeftUxx(cBits, uVal, cShift):
256 assert cShift < cBits;
258 if cBits == 16:
260 elif cBits == 32:
262 elif cBits == 64:
265 assert cBits == 8;
270 uRet |= (uVal >> (cBits - cShift));
273 def rotateRightUxx(cBits, uVal, cShift):
275 assert cShift < cBits;
277 if cBits == 16:
279 elif cBits == 32:
281 elif cBits == 64:
284 assert cBits == 8;
289 uRet |= (uVal << (cBits - cShift)) & uMask;
292 def gregName(iReg, cBits, fRexByteRegs = True):
294 if cBits == 64:
296 if cBits == 32:
298 if cBits == 16:
300 assert cBits == 8;
421 def gregNameBits(self, iReg, cBits):
423 return gregName(iReg, cBits, self.is64Bit());
482 for cBits, cValues in ( (8, 4), (16, 4), (32, 8), (64, 8) ):
483 if cBits < cbMaxOp * 8:
484 auRet += randUxxList(cBits, cValues);
487 for cBits, cValues in ( (8, 8), (16, 8), (24, 2), (32, 16), (40, 1), (48, 1), (56, 1), (64, 16) ):
488 if cBits < cbMaxOp * 8:
489 auRet += randUxxList(cBits, cValues);
492 for cBits, cValues in ( (8, 16), (16, 16), (24, 4), (32, 64), (40, 4), (48, 4), (56, 4), (64, 64) ):
493 if cBits < cbMaxOp * 8:
494 auRet += randUxxList(cBits, cValues);
509 for cBits in (8, 16, 32, 64):
510 if cBits < cbMaxOp * 8:
511 auRet += randUxxList(cBits, 1);