return -1;\r
}\r
\r
- /* Set the instruction and the stack pointer */ \r
- ucp->uc_mcontext.Eip = (unsigned long) func;\r
+ /* Set the instruction and the stack pointer */\r
+ #ifdef I_X86_\r
+ ucp->uc_mcontext.Eip = (unsigned long) func;\r
ucp->uc_mcontext.Esp = (unsigned long) sp - 4;\r
- \r
+ #endif\r
+ #ifdef _IA64_\r
+ # error "_IA64_"\r
+ #endif\r
+ #ifdef _AMD64_\r
+ ucp->uc_mcontext.Rip = (unsigned long long) func;\r
+ ucp->uc_mcontext.Rsp = (unsigned long long) sp - 8;\r
+ #endif\r
+\r
/* Save/Restore the full machine context */ \r
ucp->uc_mcontext.ContextFlags = CONTEXT_FULL;\r
\r