projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df2c862
)
X86: Fix the carry flag for shl.
author
Gabe Black
<gblack@eecs.umich.edu>
Wed, 5 Aug 2009 09:56:38 +0000
(
02:56
-0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Wed, 5 Aug 2009 09:56:38 +0000
(
02:56
-0700)
src/arch/x86/isa/microops/regop.isa
patch
|
blob
|
history
diff --git
a/src/arch/x86/isa/microops/regop.isa
b/src/arch/x86/isa/microops/regop.isa
index 698216139205bac67c13046452d682a33526e54f..ac380f34bc9a54cc7b5af679f10680f3584fe00a 100644
(file)
--- a/
src/arch/x86/isa/microops/regop.isa
+++ b/
src/arch/x86/isa/microops/regop.isa
@@
-648,8
+648,10
@@
let {{
ccFlagBits = ccFlagBits & ~(ext & (CFBit | ECFBit | OFBit));
int CFBits = 0;
//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;
+ }
//If some combination of the CF bits need to be set, set them.
if ((ext & (CFBit | ECFBit)) && CFBits)
ccFlagBits = ccFlagBits | (ext & (CFBit | ECFBit));