dyn_inst_impl.hh (8779:2a590c51adb1) | dyn_inst_impl.hh (8806:669e93d79ed9) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 179 unchanged lines hidden (view full) --- 188#endif 189 return this->cpu->simPalCheck(palFunc, this->threadNumber); 190} 191 192template <class Impl> 193void 194BaseO3DynInst<Impl>::syscall(int64_t callnum) 195{ | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 179 unchanged lines hidden (view full) --- 188#endif 189 return this->cpu->simPalCheck(palFunc, this->threadNumber); 190} 191 192template <class Impl> 193void 194BaseO3DynInst<Impl>::syscall(int64_t callnum) 195{ |
196 if (FullSystem) { | 196 if (FullSystem) |
197 panic("Syscall emulation isn't available in FS mode.\n"); | 197 panic("Syscall emulation isn't available in FS mode.\n"); |
198 } else { 199 // HACK: check CPU's nextPC before and after syscall. If it 200 // changes, update this instruction's nextPC because the syscall 201 // must have changed the nextPC. 202 TheISA::PCState curPC = this->cpu->pcState(this->threadNumber); 203 this->cpu->syscall(callnum, this->threadNumber); 204 TheISA::PCState newPC = this->cpu->pcState(this->threadNumber); 205 if (!(curPC == newPC)) { 206 this->pcState(newPC); 207 } | 198 199 // HACK: check CPU's nextPC before and after syscall. If it 200 // changes, update this instruction's nextPC because the syscall 201 // must have changed the nextPC. 202 TheISA::PCState curPC = this->cpu->pcState(this->threadNumber); 203 this->cpu->syscall(callnum, this->threadNumber); 204 TheISA::PCState newPC = this->cpu->pcState(this->threadNumber); 205 if (!(curPC == newPC)) { 206 this->pcState(newPC); |
208 } 209} 210 | 207 } 208} 209 |