X86: Fix how the parity flag is computed.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 5 Aug 2009 09:56:12 +0000 (02:56 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 5 Aug 2009 09:56:12 +0000 (02:56 -0700)
It's only for the lowest order byte, and I had the polarity wrong.

src/arch/x86/insts/microregop.cc

index 2edd3ba87c73b6ecfaa40a114dc3b633da7c5c1f..5982dff7af680081abce66d9f248bdca77c67fd1 100644 (file)
@@ -78,7 +78,7 @@ namespace X86ISA
             if(subtract)
                 flags ^= (flagMask & (ECFBit | CFBit));
         }
-        if(flagMask & PFBit && findParity(dataSize*8, _dest))
+        if(flagMask & PFBit && !findParity(8, _dest))
             flags |= PFBit;
         if(flagMask & AFBit)
         {