diff VPThread.s @ 6:ce4ad44fcc23

make hardware independent and port to 64bit
author Merten Sach <msach@mailbox.tu-berlin.de>
date Thu, 16 Jun 2011 14:39:38 +0200
parents f36e9ab2e030
children
line diff
     1.1 --- a/VPThread.s	Mon Jun 06 18:30:00 2011 +0200
     1.2 +++ b/VPThread.s	Thu Jun 16 14:39:38 2011 +0200
     1.3 @@ -4,9 +4,8 @@
     1.4  // "endInstrAddr" field, and the return addr is at 0x4(%ebp)
     1.5  .globl asm_save_ret_to_singleton
     1.6  asm_save_ret_to_singleton:
     1.7 -    movl 0x4(%ebp),     %eax   #get ret address, ebp is the same as in the calling function
     1.8 -    movl 0x4(%esp),     %edx   #get argument(singletonPtrAddr) from stack
     1.9 -    movl      %eax,     (%edx) #write ret addr to endInstrAddr field
    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 @@ -15,9 +14,8 @@
    1.16  //The stack's return addr is at 0x4(%%ebp)
    1.17  .globl asm_write_ret_from_singleton
    1.18  asm_write_ret_from_singleton:
    1.19 -    movl 0x4(%esp),    %edx  #get singleton addr from stack
    1.20 -    movl    (%edx),    %eax  #get endInstrAddr field
    1.21 -    movl      %eax,    0x4(%ebp) #write return addr to the stack of the caller
    1.22 +    movq    (%rdi),    %rax  #get endInstrAddr field
    1.23 +    movq      %rax,    0x8(%rbp) #write return addr to the stack of the caller
    1.24      ret
    1.25  
    1.26