From: Gabe Black Date: Fri, 27 Jul 2007 05:06:30 +0000 (-0700) Subject: X86: Fix carry calculation for subtraction based microops. X-Git-Tag: m5_2.0_beta4~276 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57428b8b0bc277f45dfcc415677a116c0c0673a6;p=gem5.git 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 --- 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"