projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a238959
)
X86: Fix sign extension when doing an arithmetic shift right by 0.
author
Gabe Black
<gblack@eecs.umich.edu>
Wed, 5 Aug 2009 09:57:47 +0000
(
02:57
-0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Wed, 5 Aug 2009 09:57:47 +0000
(
02:57
-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 e86e9f00a2adccfced90b7e9b5b36c22946b7e9f..4d4079f5f4cc8add299119a4c7fb19e3d6cc6a5d 100644
(file)
--- a/
src/arch/x86/isa/microops/regop.isa
+++ b/
src/arch/x86/isa/microops/regop.isa
@@
-700,7
+700,7
@@
let {{
// Because what happens to the bits shift -in- on a right shift
// is not defined in the C/C++ standard, we have to sign extend
// them manually to be sure.
- uint64_t arithMask =
+ uint64_t arithMask =
(shiftAmt == 0) ? 0 :
-bits(psrc1, dataSize * 8 - 1) << (dataSize * 8 - shiftAmt);
DestReg = merge(DestReg, (psrc1 >> shiftAmt) | arithMask, dataSize);
'''