ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libcoro/coro.c
(Generate patch)

Comparing libcoro/coro.c (file contents):
Revision 1.48 by root, Fri Jan 29 20:35:23 2010 UTC vs.
Revision 1.51 by root, Fri Apr 2 19:18:01 2010 UTC

123 "\tpush %rbx\n" 123 "\tpush %rbx\n"
124 "\tpush %r12\n" 124 "\tpush %r12\n"
125 "\tpush %r13\n" 125 "\tpush %r13\n"
126 "\tpush %r14\n" 126 "\tpush %r14\n"
127 "\tpush %r15\n" 127 "\tpush %r15\n"
128 #if CORO_WIN_TIB
129 "\tpush %fs:0x0\n"
130 "\tpush %fs:0x8\n"
131 "\tpush %fs:0xc\n"
132 #endif
128 "\tmov %rsp, (%rdi)\n" 133 "\tmov %rsp, (%rdi)\n"
129 "\tmov (%rsi), %rsp\n" 134 "\tmov (%rsi), %rsp\n"
135 #if CORO_WIN_TIB
136 "\tpop %fs:0xc\n"
137 "\tpop %fs:0x8\n"
138 "\tpop %fs:0x0\n"
139 #endif
130 "\tpop %r15\n" 140 "\tpop %r15\n"
131 "\tpop %r14\n" 141 "\tpop %r14\n"
132 "\tpop %r13\n" 142 "\tpop %r13\n"
133 "\tpop %r12\n" 143 "\tpop %r12\n"
134 "\tpop %rbx\n" 144 "\tpop %rbx\n"
137 #define NUM_SAVED 4 147 #define NUM_SAVED 4
138 "\tpush %ebp\n" 148 "\tpush %ebp\n"
139 "\tpush %ebx\n" 149 "\tpush %ebx\n"
140 "\tpush %esi\n" 150 "\tpush %esi\n"
141 "\tpush %edi\n" 151 "\tpush %edi\n"
152 #if CORO_WIN_TIB
153 "\tpush %fs:0\n"
154 "\tpush %fs:4\n"
155 "\tpush %fs:8\n"
156 #endif
142 "\tmov %esp, (%eax)\n" 157 "\tmov %esp, (%eax)\n"
143 "\tmov (%edx), %esp\n" 158 "\tmov (%edx), %esp\n"
159 #if CORO_WIN_TIB
160 "\tpop %fs:8\n"
161 "\tpop %fs:4\n"
162 "\tpop %fs:0\n"
163 #endif
144 "\tpop %edi\n" 164 "\tpop %edi\n"
145 "\tpop %esi\n" 165 "\tpop %esi\n"
146 "\tpop %ebx\n" 166 "\tpop %ebx\n"
147 "\tpop %ebp\n" 167 "\tpop %ebp\n"
148 #else 168 #else
275# elif CORO_ASM 295# elif CORO_ASM
276 296
277 ctx->sp = (void **)(ssize + (char *)sptr); 297 ctx->sp = (void **)(ssize + (char *)sptr);
278 *--ctx->sp = (void *)abort; /* needed for alignment only */ 298 *--ctx->sp = (void *)abort; /* needed for alignment only */
279 *--ctx->sp = (void *)coro_init; 299 *--ctx->sp = (void *)coro_init;
300
301 #if CORO_WIN_TIB
302 *--ctx->sp = 0; /* ExceptionList */
303 *--ctx->sp = (char *)sptr + ssize; /* StackBase */
304 *--ctx->sp = sptr; /* StackLimit */
305 #endif
306
280 ctx->sp -= NUM_SAVED; 307 ctx->sp -= NUM_SAVED;
281 308
282# elif CORO_UCONTEXT 309# elif CORO_UCONTEXT
283 310
284 getcontext (&(ctx->uc)); 311 getcontext (&(ctx->uc));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines