diff options
Diffstat (limited to 'cpu/base.cc')
-rw-r--r-- | cpu/base.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpu/base.cc b/cpu/base.cc index 9e66d934f..50c777b0d 100644 --- a/cpu/base.cc +++ b/cpu/base.cc @@ -189,15 +189,15 @@ BaseCPU::registerExecContexts() { for (int i = 0; i < execContexts.size(); ++i) { ExecContext *xc = execContexts[i]; - int cpu_id; - #ifdef FULL_SYSTEM - cpu_id = system->registerExecContext(xc); + int id = params->cpu_id; + if (id != -1) + id += i; + + xc->cpu_id = system->registerExecContext(xc, id); #else - cpu_id = xc->process->registerExecContext(xc); + xc->cpu_id = xc->process->registerExecContext(xc); #endif - - xc->cpu_id = cpu_id; } } |