projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc76842
)
X86: Make the cvti2f microop sign extend its integer source correctly.
author
Gabe Black
<gblack@eecs.umich.edu>
Wed, 12 May 2010 07:51:35 +0000
(
00:51
-0700)
committer
Gabe Black
<gblack@eecs.umich.edu>
Wed, 12 May 2010 07:51:35 +0000
(
00:51
-0700)
The code was using the wrong bit as the sign bit. Other similar bits of code
seem to be correct.
src/arch/x86/isa/microops/mediaop.isa
patch
|
blob
|
history
diff --git
a/src/arch/x86/isa/microops/mediaop.isa
b/src/arch/x86/isa/microops/mediaop.isa
index 900c166f88a6d52c43f417c7b097dc1ed2c52dbb..9a2707b5985d34754bfb966843ddfb9087430a4c 100644
(file)
--- a/
src/arch/x86/isa/microops/mediaop.isa
+++ b/
src/arch/x86/isa/microops/mediaop.isa
@@
-1294,7
+1294,8
@@
let {{
int srcLoIndex = srcStart + (i + 0) * srcSizeBits;
uint64_t argBits = bits(FpSrcReg1.uqw, srcHiIndex, srcLoIndex);
- int64_t sArg = argBits | (0 - (argBits & (ULL(1) << srcHiIndex)));
+ int64_t sArg = argBits |
+ (0 - (argBits & (ULL(1) << (srcSizeBits - 1))));
double arg = sArg;
if (destSize == 4) {