Added system call interrupt handler.
Added handler calling in decoder file.
Change-Id: I80b99257fe4b96a1a286f17afcec28bb8a849b83
Signed-off-by: kajoljain379 <kajoljain797@gmail.com>
};
+class SystemCallInterrupt : public PowerInterrupt
+{
+ public:
+ SystemCallInterrupt()
+ {
+ }
+ virtual void invoke(ThreadContext * tc, const StaticInstPtr &inst =
+ StaticInst::nullStaticInstPtr)
+ {
+ //TODO: Right now it not handle case when LEV=0.
+ tc->setIntReg(INTREG_SRR0 , tc->instAddr() + 4);
+ PowerInterrupt::updateSRR1(tc);
+ PowerInterrupt::updateMsr(tc);
+ tc->pcState(SystemCallPCSet);
+ }
+};
+
class DecrementerInterrupt : public PowerInterrupt
{
public:
}
}
+//TODO:Right now sc instruction not handles LEV=1 case
+
format IntOp {
- 17: sc({{ xc->syscall(R0, &fault); }},
- [ IsSyscall, IsNonSpeculative, IsSerializeAfter ]);
+ 17: sc({{
+ if (FullSystem) {
+ fault= std::make_shared<SystemCallInterrupt>();
+ } else {
+ xc->syscall(R0, &fault);
+ }
+ }},
+ [ IsSyscall, IsNonSpeculative, IsSerializeAfter ]);
2: tdi({{ }});
}