Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
comparison SSR.s @ 27:2c146b6b3890
fixing problems with linker by including the right file
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 29 Aug 2011 14:17:43 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:e8b47eaabecb |
|---|---|
| 1 | |
| 2 //Assembly code takes the return addr off the stack and saves | |
| 3 // into the singleton. The first field in the singleton is the | |
| 4 // "endInstrAddr" field, and the return addr is at 0x4(%ebp) | |
| 5 .globl asm_save_ret_to_singleton | |
| 6 asm_save_ret_to_singleton: | |
| 7 movq 0x8(%rbp), %rax #get ret address, ebp is the same as in the calling function | |
| 8 movq %rax, (%rdi) #write ret addr to endInstrAddr field | |
| 9 ret | |
| 10 | |
| 11 | |
| 12 //Assembly code changes the return addr on the stack to the one | |
| 13 // saved into the singleton by the end-singleton-fn | |
| 14 //The stack's return addr is at 0x4(%%ebp) | |
| 15 .globl asm_write_ret_from_singleton | |
| 16 asm_write_ret_from_singleton: | |
| 17 movq (%rdi), %rax #get endInstrAddr field | |
| 18 movq %rax, 0x8(%rbp) #write return addr to the stack of the caller | |
| 19 ret | |
| 20 | |
| 21 |
