X86: Fix the carry flag for shl.
This commit is contained in:
parent
df2c862a07
commit
22a5f66820
1 changed files with 3 additions and 1 deletions
|
@ -648,8 +648,10 @@ let {{
|
||||||
ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit));
|
ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit));
|
||||||
int CFBits = 0;
|
int CFBits = 0;
|
||||||
//Figure out if we -would- set the CF bits if requested.
|
//Figure out if we -would- set the CF bits if requested.
|
||||||
if (bits(SrcReg1, dataSize * 8 - shiftAmt))
|
if (shiftAmt <= dataSize * 8 &&
|
||||||
|
bits(SrcReg1, dataSize * 8 - shiftAmt)) {
|
||||||
CFBits = 1;
|
CFBits = 1;
|
||||||
|
}
|
||||||
//If some combination of the CF bits need to be set, set them.
|
//If some combination of the CF bits need to be set, set them.
|
||||||
if ((ext & (CFBit | ECFBit)) && CFBits)
|
if ((ext & (CFBit | ECFBit)) && CFBits)
|
||||||
ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit));
|
ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit));
|
||||||
|
|
Loading…
Reference in a new issue