]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Debugging hacks (switchback routine -- unused)
authorJulian Seward <jseward@acm.org>
Sun, 13 Feb 2005 10:56:22 +0000 (10:56 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 13 Feb 2005 10:56:22 +0000 (10:56 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3238

coregrind/amd64/dispatch.S

index 8c9ad285ceb98a3bc21bf8433df94a888435c2fc..b8c8bdc3e5cdc01d46ab31ea3f1dc0abf5159697 100644 (file)
 /*------------------------------------------------------------*/
 /*--- The dispatch loop.                                   ---*/
 /*------------------------------------------------------------*/
+
+.globl switchback
+switchback:
+       /* %rdi -> guest state */
+       /* %rsi is rflags */
+       movq    0(%rdi), %rax
+       movq    8(%rdi), %rcx
+       movq    16(%rdi), %rdx
+       movq    24(%rdi), %rbx
+       movq    32(%rdi), %rsp
+       movq    40(%rdi), %rbp
+       movq    64(%rdi), %r8
+       movq    72(%rdi), %r9
+       movq    80(%rdi), %r10
+       movq    88(%rdi), %r11
+       movq    96(%rdi), %r12
+       movq    104(%rdi), %r13
+       movq    112(%rdi), %r14
+       movq    120(%rdi), %r15
+       /* now we need to deal with rsi rdi rflags rip */
+
+       pushq   168(%rdi) /* %RIP -> stack */
+
+       pushq   %rsi
+       popfq
+
+       movq    48(%rdi), %rsi
+       movq    56(%rdi), %rdi
+
+       ret
+       
+/*------------------------------------------------------------*/
+/*--- The dispatch loop.                                   ---*/
+/*------------------------------------------------------------*/
        
 .globl VG_(run_innerloop)
 VG_(run_innerloop):