From 57428b8b0bc277f45dfcc415677a116c0c0673a6 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 26 Jul 2007 22:06:30 -0700 Subject: [PATCH] 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 --- src/arch/x86/isa/microops/regop.isa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- 2.30.2