X86: Handle left rotations that go all the way around or more.
This commit is contained in:
parent
99adfd9dae
commit
7f9a3af250
|
@ -796,11 +796,12 @@ let {{
|
||||||
code = '''
|
code = '''
|
||||||
uint8_t shiftAmt =
|
uint8_t shiftAmt =
|
||||||
(op2 & ((dataSize == 8) ? mask(6) : mask(5)));
|
(op2 & ((dataSize == 8) ? mask(6) : mask(5)));
|
||||||
if(shiftAmt)
|
uint8_t realShiftAmt = shiftAmt % (dataSize * 8);
|
||||||
|
if(realShiftAmt)
|
||||||
{
|
{
|
||||||
uint64_t top = psrc1 << shiftAmt;
|
uint64_t top = psrc1 << realShiftAmt;
|
||||||
uint64_t bottom =
|
uint64_t bottom =
|
||||||
bits(psrc1, dataSize * 8 - 1, dataSize * 8 - shiftAmt);
|
bits(psrc1, dataSize * 8 - 1, dataSize * 8 - realShiftAmt);
|
||||||
DestReg = merge(DestReg, top | bottom, dataSize);
|
DestReg = merge(DestReg, top | bottom, dataSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue