X86: Handle rotating right all the way around or more.

This commit is contained in:
Gabe Black 2009-08-05 03:00:03 -07:00
parent 88041f75c4
commit 64d7948692

View file

@ -727,10 +727,11 @@ let {{
code = '''
uint8_t shiftAmt =
(op2 & ((dataSize == 8) ? mask(6) : mask(5)));
if(shiftAmt)
uint8_t realShiftAmt = shiftAmt % (dataSize * 8);
if(realShiftAmt)
{
uint64_t top = psrc1 << (dataSize * 8 - shiftAmt);
uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt);
uint64_t top = psrc1 << (dataSize * 8 - realShiftAmt);
uint64_t bottom = bits(psrc1, dataSize * 8, realShiftAmt);
DestReg = merge(DestReg, top | bottom, dataSize);
}
else