From 10c2e37f604280fb89d800839cc965204d096c59 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 19 Sep 2011 02:46:48 -0700 Subject: Syscall: Make the syscall function available in both SE and FS modes. In FS mode the syscall function will panic, but the interface will be consistent and code which calls syscall can be compiled in. This will allow, for instance, instructions that use syscall to be built unconditionally but then not returned by the decoder. --- src/cpu/inorder/inorder_dyn_inst.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/cpu/inorder/inorder_dyn_inst.cc') diff --git a/src/cpu/inorder/inorder_dyn_inst.cc b/src/cpu/inorder/inorder_dyn_inst.cc index f65d2ea9f..ff178f6d3 100644 --- a/src/cpu/inorder/inorder_dyn_inst.cc +++ b/src/cpu/inorder/inorder_dyn_inst.cc @@ -311,14 +311,18 @@ InOrderDynInst::simPalCheck(int palFunc) #endif return this->cpu->simPalCheck(palFunc, this->threadNumber); } -#else +#endif + void InOrderDynInst::syscall(int64_t callnum) { +#if FULL_SYSTEM + panic("Syscall emulation isn't available in FS mode.\n"); +#else syscallNum = callnum; cpu->syscallContext(NoFault, this->threadNumber, this); -} #endif +} void InOrderDynInst::setSquashInfo(unsigned stage_num) -- cgit v1.2.3