X86: Handle left rotations that go all the way around or more.
This commit is contained in:
parent
99adfd9dae
commit
7f9a3af250
1 changed files with 4 additions and 3 deletions
|
@ -796,11 +796,12 @@ 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 << shiftAmt;
|
||||
uint64_t top = psrc1 << realShiftAmt;
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue