+
+
+/* md_executionstate_write *****************************************************
+
+ Write the given executionstate back to the context.
+
+*******************************************************************************/
+
+void md_executionstate_write(executionstate_t *es, void *context)
+{
+#if 0
+ ucontext_t *_uc;
+ mcontext_t *_mc;
+ unsigned long *_gregs;
+ s4 i;
+
+ _uc = (ucontext_t *) context;
+
+ _mc = _uc->uc_mcontext.uc_regs;
+ _gregs = _mc->gregs;
+
+ /* write integer registers */
+ for (i = 0; i < INT_REG_CNT; i++)
+ _gregs[i] = es->intregs[i];
+
+ /* write float registers */
+ /* Do not use the assignment operator '=', as the type of
+ * the _mc->fpregs[i] can cause invalid conversions. */
+
+ assert(sizeof(_mc->fpregs.fpregs) == sizeof(es->fltregs));
+ system_memcpy(&_mc->fpregs.fpregs, &es->fltregs, sizeof(_mc->fpregs.fpregs));
+
+ /* write special registers */
+ _gregs[PT_NIP] = (ptrint) es->pc;
+ _gregs[REG_SP] = (ptrint) es->sp;
+ _gregs[REG_PV] = (ptrint) es->pv;
+ _gregs[PT_LNK] = (ptrint) es->ra;