| 3189 | } |
| 3190 | |
| 3191 | bool cHardwareCPU::Inst_StackWriteInst(cAvidaContext& ctx) |
| 3192 | { |
| 3193 | const int dst = FindModifiedRegister(REG_BX); |
| 3194 | const int op1 = REG_AX; |
| 3195 | cHeadCPU to(this, GetRegister(op1) + GetRegister(dst)); |
| 3196 | const int value = Mod(StackPop(), m_inst_set->GetSize()); |
| 3197 | |
| 3198 | // Change value on a mutation... checkNoMutList is for head to head kaboom experiments |
| 3199 | if (m_organism->TestCopyMut(ctx) && !(checkNoMutList(to))) { |
| 3200 | to.SetInst(m_inst_set->GetRandomInst(ctx)); |
| 3201 | to.SetFlagMutated(); // Mark this instruction as mutated... |
| 3202 | to.SetFlagCopyMut(); // Mark this instruction as copy mut... |
| 3203 | } else { |
| 3204 | to.SetInst(Instruction(value)); |
| 3205 | to.ClearFlagMutated(); // UnMark |
| 3206 | to.ClearFlagCopyMut(); // UnMark |
| 3207 | } |
| 3208 | |
| 3209 | to.SetFlagCopied(); // Set the copied flag. |
| 3210 | return true; |
| 3211 | } |
| 3212 | |
| 3213 | bool cHardwareCPU::Inst_Compare(cAvidaContext& ctx) |
| 3214 | { |
nothing calls this directly
no test coverage detected