diff options
Diffstat (limited to 'trunk/src/lib/cothread/doc/x86.asm')
-rw-r--r-- | trunk/src/lib/cothread/doc/x86.asm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/trunk/src/lib/cothread/doc/x86.asm b/trunk/src/lib/cothread/doc/x86.asm new file mode 100644 index 00000000000..c55c25252dd --- /dev/null +++ b/trunk/src/lib/cothread/doc/x86.asm @@ -0,0 +1,21 @@ +; fastcall ABI: +; return = eax +; arguments = ecx,edx +; non-volatile registers = ebp,esi,edi,ebx + +co_swap_fastcall(to = ecx, from = edx): + mov [edx],esp + mov esp,[ecx] + pop eax + + mov [edx+ 4],ebp + mov [edx+ 8],esi + mov [edx+12],edi + mov [edx+16],ebx + + mov ebp,[ecx+ 4] + mov esi,[ecx+ 8] + mov edi,[ecx+12] + mov ebx,[ecx+16] + + jmp eax |