changeset 45:90f38dca4132 test_without_inline

no idea what doing!
author kshalle
date Tue, 06 Dec 2011 06:43:34 -0800
parents 07fd95a5cd31
children
files .hgignore DESIGN_NOTES.txt SSR.h SSR.s SSR_PluginFns.c SSR_Request_Handlers.c SSR_Request_Handlers.h SSR_lib.c
diffstat 2 files changed, 24 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgignore	Tue Dec 06 06:43:34 2011 -0800
     1.3 @@ -0,0 +1,3 @@
     1.4 +syntax: glob
     1.5 +
     1.6 +*.o
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/SSR.s	Tue Dec 06 06:43:34 2011 -0800
     2.3 @@ -0,0 +1,21 @@
     2.4 +
     2.5 +//Assembly code takes the return addr off the stack and saves
     2.6 +// into the singleton.  The first field in the singleton is the
     2.7 +// "endInstrAddr" field, and the return addr is at 0x4(%ebp)
     2.8 +.globl asm_save_ret_to_singleton
     2.9 +asm_save_ret_to_singleton:
    2.10 +    movq 0x8(%rbp),     %rax   #get ret address, ebp is the same as in the calling function
    2.11 +    movq     %rax,     (%rdi) #write ret addr to endInstrAddr field
    2.12 +    ret
    2.13 +
    2.14 +
    2.15 +//Assembly code changes the return addr on the stack to the one
    2.16 +// saved into the singleton by the end-singleton-fn
    2.17 +//The stack's return addr is at 0x4(%%ebp)
    2.18 +.globl asm_write_ret_from_singleton
    2.19 +asm_write_ret_from_singleton:
    2.20 +    movq    (%rdi),    %rax  #get endInstrAddr field
    2.21 +    movq      %rax,    0x8(%rbp) #write return addr to the stack of the caller
    2.22 +    ret
    2.23 +
    2.24 +