summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-09-06 16:20:12 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-09-06 16:20:12 -0700
commit832ef7412b7ab35cb50613fb1b53bd32c48d5a1f (patch)
tree3a372e58a5b5290d325ee5bdfd59554db95a451f /src/arch
parent389abade01f44ce7204776c0d71f89c8d3177d9d (diff)
downloadgem5-832ef7412b7ab35cb50613fb1b53bd32c48d5a1f.tar.xz
X86: Correct how the hi portion of a product is computed.
--HG-- extra : convert_revision : 1f503e1cae0374e62e6254e8073e903adc29d067
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/isa/microops/regop.isa4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index 57edbb606..60089085f 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -463,8 +463,8 @@ let {{
uint64_t psrc2_h = op2 >> halfSize;
uint64_t psrc2_l = op2 & mask(halfSize);
uint64_t result =
- ((psrc1_l * psrc2_h) >> halfSize) +
- ((psrc1_h * psrc2_l) >> halfSize) +
+ ((psrc1_l * psrc2_h + psrc1_h * psrc2_l +
+ ((psrc1_l * psrc2_l) >> halfSize)) >> halfSize) +
psrc1_h * psrc2_h;
DestReg = merge(DestReg, result, dataSize);
'''