[Avida-SVN] r2511 - branches/jobScheduling/source/cpu
beckma24 at myxo.css.msu.edu
beckma24 at myxo.css.msu.edu
Tue Apr 1 13:20:46 PDT 2008
Author: beckma24
Date: 2008-04-01 16:20:46 -0400 (Tue, 01 Apr 2008)
New Revision: 2511
Modified:
branches/jobScheduling/source/cpu/cHardwareCPU.cc
Log:
Add instruction check for test CPU
Modified: branches/jobScheduling/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/jobScheduling/source/cpu/cHardwareCPU.cc 2008-04-01 19:54:57 UTC (rev 2510)
+++ branches/jobScheduling/source/cpu/cHardwareCPU.cc 2008-04-01 20:20:46 UTC (rev 2511)
@@ -3182,6 +3182,9 @@
}
bool cHardwareCPU::Inst_CollectCellDataAndKillEvent(cAvidaContext& ctx) {
+ // Fail if we're running in the test CPU.
+ if((organism->GetOrgInterface().GetDemeID() < 0) || (organism->GetCellID() < 0)) return false;
+
const int out_reg = FindModifiedRegister(REG_BX);
int eventID = organism->GetCellData();
GetRegister(out_reg) = eventID;
More information about the Avida-cvs
mailing list