A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
For win64 it is cast unsigned long long.
[simgrid.git]
/
src
/
xbt
/
win32_ucontext.c
diff --git
a/src/xbt/win32_ucontext.c
b/src/xbt/win32_ucontext.c
index
5dc8959
..
757eb43
100644
(file)
--- a/
src/xbt/win32_ucontext.c
+++ b/
src/xbt/win32_ucontext.c
@@
-57,10
+57,19
@@
int makecontext(ucontext_t * ucp, void (*func) (), int argc, ...)
return -1;
\r
}
\r
\r
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
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
/* Save/Restore the full machine context */
\r
ucp->uc_mcontext.ContextFlags = CONTEXT_FULL;
\r
\r