#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)
bool simPalCheck(int palFunc);
#else
short syscallNum;
+#endif
- /** Calls a syscall. */
+ /** Emulates a syscall. */
void syscall(int64_t callnum);
-#endif
////////////////////////////////////////////////////////////
//
/** Traps to handle specified fault. */
void trap(Fault fault);
bool simPalCheck(int palFunc);
-#else
- /** Calls a syscall. */
- void syscall(int64_t callnum);
#endif
+ /** Emulates a syscall. */
+ void syscall(int64_t callnum);
+
public:
// The register accessor methods provide the index of the
#endif
return this->cpu->simPalCheck(palFunc, this->threadNumber);
}
-#else
+#endif
+
template <class Impl>
void
BaseO3DynInst<Impl>::syscall(int64_t callnum)
{
+#if FULL_SYSTEM
+ 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.
if (!(curPC == newPC)) {
this->pcState(newPC);
}
-}
#endif
+}
#if FULL_SYSTEM
Fault hwrei() { return thread->hwrei(); }
bool simPalCheck(int palFunc) { return thread->simPalCheck(palFunc); }
+#endif
+
+ void
+ syscall(int64_t callnum)
+ {
+#if FULL_SYSTEM
+ panic("Syscall emulation isn't available in FS mode.\n");
#else
- void syscall(int64_t callnum) { thread->syscall(callnum); }
+ thread->syscall(callnum);
#endif
+ }
bool misspeculating() { return thread->misspeculating(); }
ThreadContext *tcBase() { return tc; }