4 #include "entry_frame.h"
5 #include "member_offs.h"
17 Continuation() : _ip(~0UL) {}
19 typedef Return_frame User_return_frame;
22 { return _ip != ~0UL; }
24 Address ip() const { return _ip; }
25 void ip(Address ip) { _ip = ip; }
27 Mword flags(Return_frame const *) const { return _psr; }
28 void flags(Return_frame *, Mword psr) { _psr = psr; }
30 Mword sp(Return_frame const *o) const { return o->usp; }
31 void sp(Return_frame *o, Mword sp) { o->usp = sp; }
33 void save(Return_frame const *regs)
39 void activate(Return_frame *regs, void *cont_func)
42 regs->pc = Mword(cont_func);
43 regs->psr &= ~(Proc::Status_mode_mask | Proc::Status_thumb); // clear mode
44 regs->psr |= Proc::Status_mode_supervisor | Proc::Status_interrupts_disabled;
47 void set(Return_frame *dst, User_return_frame const *src)
51 dst->km_lr = src->km_lr;
56 void get(User_return_frame *dst, Return_frame const *src) const
60 dst->km_lr = src->km_lr;
65 void clear() { _ip = ~0UL; }
67 void restore(Return_frame *regs)