Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > Vthread_impls > Vthread_MC_shared_impl
diff Vthread.s @ 27:e5d4d5871ac9
half-done update to common_ancesor VMS version.. in middle
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Thu, 01 Mar 2012 13:20:51 -0800 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Vthread.s Thu Mar 01 13:20:51 2012 -0800 1.3 @@ -0,0 +1,21 @@ 1.4 + 1.5 +//Assembly code takes the return addr off the stack and saves 1.6 +// into the singleton. The first field in the singleton is the 1.7 +// "endInstrAddr" field, and the return addr is at 0x4(%ebp) 1.8 +.globl asm_save_ret_to_singleton 1.9 +asm_save_ret_to_singleton: 1.10 + movq 0x8(%rbp), %rax #get ret address, ebp is the same as in the calling function 1.11 + movq %rax, (%rdi) #write ret addr to endInstrAddr field 1.12 + ret 1.13 + 1.14 + 1.15 +//Assembly code changes the return addr on the stack to the one 1.16 +// saved into the singleton by the end-singleton-fn 1.17 +//The stack's return addr is at 0x4(%%ebp) 1.18 +.globl asm_write_ret_from_singleton 1.19 +asm_write_ret_from_singleton: 1.20 + movq (%rdi), %rax #get endInstrAddr field 1.21 + movq %rax, 0x8(%rbp) #write return addr to the stack of the caller 1.22 + ret 1.23 + 1.24 +
