From dc0e629ea1f074691d307cde3ab7dd51a5e2102f Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 29 Jan 2012 02:04:34 -0800 Subject: Implement Ali's review feedback. Try to decrease indentation, and remove some redundant FullSystem checks. --- src/cpu/o3/dyn_inst_impl.hh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/cpu/o3/dyn_inst_impl.hh') diff --git a/src/cpu/o3/dyn_inst_impl.hh b/src/cpu/o3/dyn_inst_impl.hh index 93ae83441..76a456ee3 100644 --- a/src/cpu/o3/dyn_inst_impl.hh +++ b/src/cpu/o3/dyn_inst_impl.hh @@ -193,18 +193,17 @@ template void BaseO3DynInst::syscall(int64_t callnum) { - if (FullSystem) { + if (FullSystem) panic("Syscall emulation isn't available in FS mode.\n"); - } else { - // HACK: check CPU's nextPC before and after syscall. If it - // changes, update this instruction's nextPC because the syscall - // must have changed the nextPC. - TheISA::PCState curPC = this->cpu->pcState(this->threadNumber); - this->cpu->syscall(callnum, this->threadNumber); - TheISA::PCState newPC = this->cpu->pcState(this->threadNumber); - if (!(curPC == newPC)) { - this->pcState(newPC); - } + + // HACK: check CPU's nextPC before and after syscall. If it + // changes, update this instruction's nextPC because the syscall + // must have changed the nextPC. + TheISA::PCState curPC = this->cpu->pcState(this->threadNumber); + this->cpu->syscall(callnum, this->threadNumber); + TheISA::PCState newPC = this->cpu->pcState(this->threadNumber); + if (!(curPC == newPC)) { + this->pcState(newPC); } } -- cgit v1.2.3