summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-07-26 22:06:30 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-07-26 22:06:30 -0700
commit57428b8b0bc277f45dfcc415677a116c0c0673a6 (patch)
treebadf1049524458d34947921bfaa3a77b8a417079 /src
parent749ed15b606d0d6d5f27277a0b7d456aa56a6ac5 (diff)
downloadgem5-57428b8b0bc277f45dfcc415677a116c0c0673a6.tar.xz
X86: Fix carry calculation for subtraction based microops.
The carry flag should be calculated using the -complement- of the second operand, not it's negation. The carry in which is part of computing the 2's complement may induce a carry, but if you've already caused the carry before you get the carry computing logic involved, it will miss it. --HG-- extra : convert_revision : 318cf86929664fc52ed9e023606a9e892eba635c
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/isa/microops/regop.isa2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index c3f008993..bb34df7df 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -343,7 +343,7 @@ let {{
immCode = matcher.sub("imm8", code)
if subtract:
- secondSrc = "-op2, true"
+ secondSrc = "~op2, true"
else:
secondSrc = "op2"