| 3119 | |
| 3120 | |
| 3121 | bool cHardwareCPU::Inst_Copy(cAvidaContext& ctx) |
| 3122 | { |
| 3123 | const int op1 = REG_BX; |
| 3124 | const int op2 = REG_AX; |
| 3125 | |
| 3126 | const cHeadCPU from(this, GetRegister(op1)); |
| 3127 | cHeadCPU to(this, GetRegister(op2) + GetRegister(op1)); |
| 3128 | |
| 3129 | //checkNoMutList is for head to head kaboom experiments |
| 3130 | if (m_organism->TestCopyMut(ctx) && !(checkNoMutList(from))) { |
| 3131 | to.SetInst(m_inst_set->GetRandomInst(ctx)); |
| 3132 | to.SetFlagMutated(); // Mark this instruction as mutated... |
| 3133 | to.SetFlagCopyMut(); // Mark this instruction as copy mut... |
| 3134 | } else { |
| 3135 | to.SetInst(from.GetInst()); |
| 3136 | to.ClearFlagMutated(); // UnMark |
| 3137 | to.ClearFlagCopyMut(); // UnMark |
| 3138 | } |
| 3139 | |
| 3140 | to.SetFlagCopied(); // Set the copied flag. |
| 3141 | // cpu_stats.mut_stats.copies_exec++; |
| 3142 | return true; |
| 3143 | } |
| 3144 | |
| 3145 | bool cHardwareCPU::Inst_ReadInst(cAvidaContext&) |
| 3146 | { |
nothing calls this directly
no test coverage detected