From: Julian Seward Date: Sun, 13 Feb 2005 10:56:22 +0000 (+0000) Subject: Debugging hacks (switchback routine -- unused) X-Git-Tag: svn/VALGRIND_3_0_0~1080 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e6c170f752cf5e84c861bb700698fcbff0a02f9;p=thirdparty%2Fvalgrind.git Debugging hacks (switchback routine -- unused) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3238 --- diff --git a/coregrind/amd64/dispatch.S b/coregrind/amd64/dispatch.S index 8c9ad285ce..b8c8bdc3e5 100644 --- a/coregrind/amd64/dispatch.S +++ b/coregrind/amd64/dispatch.S @@ -35,6 +35,40 @@ /*------------------------------------------------------------*/ /*--- 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):