diff options
Diffstat (limited to 'src/arch/x86/insts/microregop.cc')
-rw-r--r-- | src/arch/x86/insts/microregop.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/arch/x86/insts/microregop.cc b/src/arch/x86/insts/microregop.cc index e67a82d4f..b6a30d6a7 100644 --- a/src/arch/x86/insts/microregop.cc +++ b/src/arch/x86/insts/microregop.cc @@ -69,19 +69,23 @@ namespace X86ISA DPRINTF(Sparc, "flagMask = %#x\n", flagMask); uint64_t flags = oldFlags & ~flagMask; if(flagMask & CFBit) + { if(findCarry(dataSize*8, _dest, _src1, _src2)) flags |= CFBit; if(subtract) flags ^= CFBit; + } if(flagMask & PFBit && findParity(dataSize*8, _dest)) flags |= PFBit; if(flagMask & ECFBit && findCarry(dataSize*8, _dest, _src1, _src2)) flags |= ECFBit; if(flagMask & AFBit) + { if(findCarry(4, _dest, _src1, _src2)) flags |= AFBit; if(subtract) flags ^= AFBit; + } if(flagMask & EZFBit && findZero(dataSize*8, _dest)) flags |= EZFBit; if(flagMask & ZFBit && findZero(dataSize*8, _dest)) @@ -112,8 +116,9 @@ namespace X86ISA panic("This condition is not implemented!"); case ConditionTests::MSTRC: panic("This condition is not implemented!"); - case ConditionTests::STRZnZF: - panic("This condition is not implemented!"); + case ConditionTests::STRZnEZF: + return !ccflags.EZF & ccflags.ZF; + //And no interrupts or debug traps are waiting case ConditionTests::OF: return ccflags.OF; case ConditionTests::CF: @@ -144,8 +149,9 @@ namespace X86ISA panic("This condition is not implemented!"); case ConditionTests::NotMSTRC: panic("This condition is not implemented!"); - case ConditionTests::NotSTRZnZF: - panic("This condition is not implemented!"); + case ConditionTests::STRnZnEZF: + return !ccflags.EZF & !ccflags.ZF; + //And no interrupts or debug traps are waiting case ConditionTests::NotOF: return !ccflags.OF; case ConditionTests::NotCF: |