… | … | ||
---|---|---|---|
116 | ".text\n" | 116 | ".text\n" |
117 | ".globl coro_transfer\n" | 117 | ".globl coro_transfer\n" |
118 | ".type coro_transfer, @function\n" | 118 | ".type coro_transfer, @function\n" |
119 | "coro_transfer:\n" | 119 | "coro_transfer:\n" |
120 | #if __amd64 | 120 | #if __amd64 |
121 | #if CORO_WIN_TIB | ||
122 | #define NUM_SAVED 6+3 | ||
123 | "\tpush %fs:0x0\n" | ||
124 | "\tpush %fs:0x8\n" | ||
125 | "\tpush %fs:0xc\n" | ||
126 | #else | ||
121 | #define NUM_SAVED 6 | 127 | #define NUM_SAVED 6 |
128 | #endif | ||
122 | "\tpush %rbp\n" | 129 | "\tpush %rbp\n" |
123 | "\tpush %rbx\n" | 130 | "\tpush %rbx\n" |
124 | "\tpush %r12\n" | 131 | "\tpush %r12\n" |
125 | "\tpush %r13\n" | 132 | "\tpush %r13\n" |
126 | "\tpush %r14\n" | 133 | "\tpush %r14\n" |
… | … | ||
131 | "\tpop %r14\n" | 138 | "\tpop %r14\n" |
132 | "\tpop %r13\n" | 139 | "\tpop %r13\n" |
133 | "\tpop %r12\n" | 140 | "\tpop %r12\n" |
134 | "\tpop %rbx\n" | 141 | "\tpop %rbx\n" |
135 | "\tpop %rbp\n" | 142 | "\tpop %rbp\n" |
143 | #if CORO_WIN_TIB | ||
144 | "\tpop %fs:0xc\n" | ||
145 | "\tpop %fs:0x8\n" | ||
146 | "\tpop %fs:0x0\n" | ||
147 | #endif | ||
136 | #elif __i386 | 148 | #elif __i386 |
149 | #if CORO_WIN_TIB | ||
150 | #define NUM_SAVED 4+3 | ||
151 | "\tpush %fs:0x0\n" | ||
152 | "\tpush %fs:0x4\n" | ||
153 | "\tpush %fs:0x8\n" | ||
154 | #else | ||
137 | #define NUM_SAVED 4 | 155 | #define NUM_SAVED 4 |
156 | #endif | ||
138 | "\tpush %ebp\n" | 157 | "\tpush %ebp\n" |
139 | "\tpush %ebx\n" | 158 | "\tpush %ebx\n" |
140 | "\tpush %esi\n" | 159 | "\tpush %esi\n" |
141 | "\tpush %edi\n" | 160 | "\tpush %edi\n" |
142 | "\tmov %esp, (%eax)\n" | 161 | "\tmov %esp, (%eax)\n" |
143 | "\tmov (%edx), %esp\n" | 162 | "\tmov (%edx), %esp\n" |
144 | "\tpop %edi\n" | 163 | "\tpop %edi\n" |
145 | "\tpop %esi\n" | 164 | "\tpop %esi\n" |
146 | "\tpop %ebx\n" | 165 | "\tpop %ebx\n" |
147 | "\tpop %ebp\n" | 166 | "\tpop %ebp\n" |
167 | #if CORO_WIN_TIB | ||
168 | "\tpop %fs:0x8\n" | ||
169 | "\tpop %fs:0x4\n" | ||
170 | "\tpop %fs:0x0\n" | ||
171 | #endif | ||
148 | #else | 172 | #else |
149 | #error unsupported architecture | 173 | #error unsupported architecture |
150 | #endif | 174 | #endif |
151 | "\tret\n" | 175 | "\tret\n" |
152 | ); | 176 | ); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |