|
From: <sv...@va...> - 2005-06-18 15:54:31
|
Author: njn
Date: 2005-06-18 16:54:25 +0100 (Sat, 18 Jun 2005)
New Revision: 3938
Log:
Moved call_on_new_stack_0_1 and jump_and_switch_stacks to better places.
This enabled the removal of $ARCH/jmp_with_stack.c, hurrah!
Removed:
trunk/coregrind/amd64/jmp_with_stack.c
trunk/coregrind/arm/jmp_with_stack.c
trunk/coregrind/x86/jmp_with_stack.c
Modified:
trunk/coregrind/Makefile.am
trunk/coregrind/amd64/Makefile.am
trunk/coregrind/arm/Makefile.am
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/coregrind/ume.c
trunk/coregrind/ume.h
trunk/coregrind/x86/Makefile.am
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-06-18 15:18:15 UTC (rev 3937)
+++ trunk/coregrind/Makefile.am 2005-06-18 15:54:25 UTC (rev 3938)
@@ -87,8 +87,7 @@
ume.c \
\
stage1.c \
- m_debuglog.c \
- ${VG_ARCH}/jmp_with_stack.c=20
+ m_debuglog.c
valgrind_DEPENDENCIES =3D
valgrind_LDFLAGS=3D-static -g
valgrind_LDADD=3D
Modified: trunk/coregrind/amd64/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64/Makefile.am 2005-06-18 15:18:15 UTC (rev 3937)
+++ trunk/coregrind/amd64/Makefile.am 2005-06-18 15:54:25 UTC (rev 3938)
@@ -7,8 +7,7 @@
CLEANFILES =3D stage2.lds
=20
libarch_a_SOURCES =3D \
- cpuid.S \
- jmp_with_stack.c
+ cpuid.S
=20
# Extract ld's default linker script and hack it to our needs
stage2.lds: Makefile
Deleted: trunk/coregrind/amd64/jmp_with_stack.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/amd64/jmp_with_stack.c 2005-06-18 15:18:15 UTC (rev 3=
937)
+++ trunk/coregrind/amd64/jmp_with_stack.c 2005-06-18 15:54:25 UTC (rev 3=
938)
@@ -1,103 +0,0 @@
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#include "ume.h"
-
-
-#define ZERO_ALL_INT_REGS \
- " movq $0, %rax\n" \
- " movq $0, %rbx\n" \
- " movq $0, %rcx\n" \
- " movq $0, %rdx\n" \
- " movq $0, %rsi\n" \
- " movq $0, %rdi\n" \
- " movq $0, %rbp\n" \
- " movq $0, %r8\n" \
- " movq $0, %r9\n" \
- " movq $0, %r10\n" \
- " movq $0, %r11\n" \
- " movq $0, %r12\n" \
- " movq $0, %r13\n" \
- " movq $0, %r14\n" \
- " movq $0, %r15\n"
-
-
-/* Jump to 'dst', but first set the stack pointer to 'stack'. Also,
- clear all the integer registers before entering 'dst'. It's
- important that the stack pointer is set to exactly 'stack' and not
- (eg) stack - apparently_harmless_looking_small_offset. Basically
- because the code at 'dst' might be wanting to scan the area above
- 'stack' (viz, the auxv array), and putting spurious words on the
- stack confuses it.
-*/
-/*
-__attribute__((noreturn))
-void jump_and_switch_stacks ( Addr stack, Addr dst );
-
- %rdi =3D=3D stack
- %rsi =3D=3D dst
-*/
-asm(
-".global jump_and_switch_stacks\n"
-"jump_and_switch_stacks:\n"
-" movq %rdi, %rsp\n" /* set stack */
-" pushq %rsi\n" /* f to stack*/
- ZERO_ALL_INT_REGS
-" ret\n" /* jump to f */
-" ud2\n" /* should never get here */
-);
-
-
-
-/* Call f(arg1), but first switch stacks, using 'stack' as the new
- stack, and use 'retaddr' as f's return-to address. Also, clear all
- the integer registers before entering f.*/
-/*
-__attribute__((noreturn))
-void call_on_new_stack_0_1 ( Addr stack,
- Addr retaddr,
- void (*f)(Word),
- Word arg1 );
- %rdi =3D=3D stack
- %rsi =3D=3D retaddr
- %rdx =3D=3D f
- %rcx =3D=3D arg1
-*/
-asm(
-".global call_on_new_stack_0_1\n"
-"call_on_new_stack_0_1:\n"
-" movq %rdi, %rsp\n" /* set stack */
-" pushq %rsi\n" /* retaddr to stack */
-" pushq %rdx\n" /* f to stack*/
-" pushq %rcx\n" /* arg1 to stack*/
- ZERO_ALL_INT_REGS
-" popq %rdi\n" /* arg1 to correct arg reg */
-" ret\n" /* jump to f */
-" ud2\n" /* should never get here */
-);
-
-
-#undef ZERO_ALL_INT_REGS
Modified: trunk/coregrind/arm/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/arm/Makefile.am 2005-06-18 15:18:15 UTC (rev 3937)
+++ trunk/coregrind/arm/Makefile.am 2005-06-18 15:54:25 UTC (rev 3938)
@@ -6,8 +6,7 @@
BUILT_SOURCES =3D stage2.lds
CLEANFILES =3D stage2.lds
=20
-libarch_a_SOURCES =3D \
- jmp_with_stack.c
+libarch_a_SOURCES =3D
=20
# Extract ld's default linker script and hack it to our needs
stage2.lds: Makefile
Deleted: trunk/coregrind/arm/jmp_with_stack.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/arm/jmp_with_stack.c 2005-06-18 15:18:15 UTC (rev 393=
7)
+++ trunk/coregrind/arm/jmp_with_stack.c 2005-06-18 15:54:25 UTC (rev 393=
8)
@@ -1,38 +0,0 @@
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#include "ume.h"
-
-void jmp_with_stack(Addr eip, Addr esp)
-{
- // XXX: temporary only
-extern int printf (__const char *__restrict __format, ...);
-extern void exit (int __status);
- printf("jmp_with_stack: argh\n");
- exit(1);
-
- // XXX: see x86/jmp_with_stack.c for how to implement this
-}=20
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-06-18 15:18:15 U=
TC (rev 3937)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2005-06-18 15:54:25 U=
TC (rev 3938)
@@ -29,7 +29,6 @@
*/
=20
#include "core.h"
-#include "ume.h" /* for jmp_with_stack */
#include "pub_core_debuglog.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_options.h"
@@ -197,6 +196,44 @@
}
=20
=20
+/* Call f(arg1), but first switch stacks, using 'stack' as the new
+ stack, and use 'retaddr' as f's return-to address. Also, clear all
+ the integer registers before entering f. */
+__attribute__((noreturn))
+void call_on_new_stack_0_1 ( Addr stack,
+ Addr retaddr,
+ void (*f)(Word),
+ Word arg1 );
+// %rdi =3D=3D stack
+// %rsi =3D=3D retaddr
+// %rdx =3D=3D f
+// %rcx =3D=3D arg1
+asm(
+"call_on_new_stack_0_1:\n"
+" movq %rdi, %rsp\n" // set stack
+" pushq %rsi\n" // retaddr to stack
+" pushq %rdx\n" // f to stack
+" pushq %rcx\n" // arg1 to stack
+" movq $0, %rax\n" // zero all GP regs
+" movq $0, %rbx\n"=20
+" movq $0, %rcx\n"
+" movq $0, %rdx\n"
+" movq $0, %rsi\n"
+" movq $0, %rdi\n"
+" movq $0, %rbp\n"
+" movq $0, %r8\n"
+" movq $0, %r9\n"
+" movq $0, %r10\n"
+" movq $0, %r11\n"
+" movq $0, %r12\n"
+" movq $0, %r13\n"
+" movq $0, %r14\n"
+" movq $0, %r15\n"
+" popq %rdi\n" // arg1 to correct arg reg
+" ret\n" // jump to f
+" ud2\n" // should never get here
+);
+
/*
Allocate a stack for the main thread, and run it all the way to the
end. =20
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2005-06-18 15:18:15 UTC=
(rev 3937)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2005-06-18 15:54:25 UTC=
(rev 3938)
@@ -34,7 +34,6 @@
*/
=20
#include "core.h"
-#include "ume.h" /* for jmp_with_stack */
#include "pub_core_debuglog.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_options.h"
@@ -203,6 +202,37 @@
}
=20
=20
+/* Call f(arg1), but first switch stacks, using 'stack' as the new
+ stack, and use 'retaddr' as f's return-to address. Also, clear all
+ the integer registers before entering f.*/
+__attribute__((noreturn))
+void call_on_new_stack_0_1 ( Addr stack,
+ Addr retaddr,
+ void (*f)(Word),
+ Word arg1 );
+// 4(%esp) =3D=3D stack
+// 8(%esp) =3D=3D retaddr
+// 12(%esp) =3D=3D f
+// 16(%esp) =3D=3D arg1
+asm(
+"call_on_new_stack_0_1:\n"
+" movl %esp, %esi\n" // remember old stack pointer
+" movl 4(%esi), %esp\n" // set stack
+" pushl 16(%esi)\n" // arg1 to stack
+" pushl 8(%esi)\n" // retaddr to stack
+" pushl 12(%esi)\n" // f to stack
+" movl $0, %eax\n" // zero all GP regs
+" movl $0, %ebx\n"
+" movl $0, %ecx\n"
+" movl $0, %edx\n"
+" movl $0, %esi\n"
+" movl $0, %edi\n"
+" movl $0, %ebp\n"
+" ret\n" // jump to f
+" ud2\n" // should never get here
+);
+
+
/*
Allocate a stack for the main thread, and run it all the way to the
end. =20
Modified: trunk/coregrind/ume.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/ume.c 2005-06-18 15:18:15 UTC (rev 3937)
+++ trunk/coregrind/ume.c 2005-06-18 15:54:25 UTC (rev 3938)
@@ -122,6 +122,61 @@
}
=20
/*------------------------------------------------------------*/
+/*--- Stack switching ---*/
+/*------------------------------------------------------------*/
+
+// __attribute__((noreturn))
+// void jump_and_switch_stacks ( Addr stack, Addr dst );
+#if defined(VGA_x86)
+// 4(%esp) =3D=3D stack
+// 8(%esp) =3D=3D dst
+asm(
+".global jump_and_switch_stacks\n"
+"jump_and_switch_stacks:\n"
+" movl %esp, %esi\n" // remember old stack pointer
+" movl 4(%esi), %esp\n" // set stack
+" pushl 8(%esi)\n" // dst to stack
+" movl $0, %eax\n" // zero all GP regs
+" movl $0, %ebx\n"
+" movl $0, %ecx\n"
+" movl $0, %edx\n"
+" movl $0, %esi\n"
+" movl $0, %edi\n"
+" movl $0, %ebp\n"
+" ret\n" // jump to dst
+" ud2\n" // should never get here
+);
+#elif defined(VGA_amd64)
+// %rdi =3D=3D stack
+// %rsi =3D=3D dst
+asm(
+".global jump_and_switch_stacks\n"
+"jump_and_switch_stacks:\n"
+" movq %rdi, %rsp\n" // set stack
+" pushq %rsi\n" // dst to stack
+" movq $0, %rax\n" // zero all GP regs
+" movq $0, %rbx\n"
+" movq $0, %rcx\n"
+" movq $0, %rdx\n"
+" movq $0, %rsi\n"
+" movq $0, %rdi\n"
+" movq $0, %rbp\n"
+" movq $0, %r8\n"\
+" movq $0, %r9\n"\
+" movq $0, %r10\n"
+" movq $0, %r11\n"
+" movq $0, %r12\n"
+" movq $0, %r13\n"
+" movq $0, %r14\n"
+" movq $0, %r15\n"
+" ret\n" // jump to dst
+" ud2\n" // should never get here
+);
+#else
+# error Unknown architecture
+#endif
+
+/*------------------------------------------------------------*/
/*--- Finding auxv on the stack ---*/
/*------------------------------------------------------------*/
=20
Modified: trunk/coregrind/ume.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/ume.h 2005-06-18 15:18:15 UTC (rev 3937)
+++ trunk/coregrind/ume.h 2005-06-18 15:54:25 UTC (rev 3938)
@@ -54,23 +54,14 @@
because the code at 'dst' might be wanting to scan the area above
'stack' (viz, the auxv array), and putting spurious words on the
stack confuses it.
+
+ This is only exported so that vgtest_ume.c can use it.
*/
extern
__attribute__((noreturn))
void jump_and_switch_stacks ( Addr stack, Addr dst );
=20
=20
-/* Call f(arg1), but first switch stacks, using 'stack' as the new
- stack, and use 'retaddr' as f's return-to address. Also, clear all
- the integer registers before entering f.*/
-extern
-__attribute__((noreturn))
-void call_on_new_stack_0_1 ( Addr stack,
- Addr retaddr,
- void (*f)(Word),
- Word arg1 );
-
-
/*------------------------------------------------------------*/
/*--- Loading ELF files ---*/
/*------------------------------------------------------------*/
Modified: trunk/coregrind/x86/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86/Makefile.am 2005-06-18 15:18:15 UTC (rev 3937)
+++ trunk/coregrind/x86/Makefile.am 2005-06-18 15:54:25 UTC (rev 3938)
@@ -7,8 +7,7 @@
CLEANFILES =3D stage2.lds
=20
libarch_a_SOURCES =3D \
- cpuid.S \
- jmp_with_stack.c
+ cpuid.S
=20
# Extract ld's default linker script and hack it to our needs
stage2.lds: Makefile
Deleted: trunk/coregrind/x86/jmp_with_stack.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/x86/jmp_with_stack.c 2005-06-18 15:18:15 UTC (rev 393=
7)
+++ trunk/coregrind/x86/jmp_with_stack.c 2005-06-18 15:54:25 UTC (rev 393=
8)
@@ -1,96 +0,0 @@
-
-/*
- This file is part of Valgrind, a dynamic binary instrumentation
- framework.
-
- Copyright (C) 2000-2005 Julian Seward=20
- js...@ac...
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307, USA.
-
- The GNU General Public License is contained in the file COPYING.
-*/
-
-#include "ume.h"
-
-
-#define ZERO_ALL_INT_REGS \
- " movl $0, %eax\n" \
- " movl $0, %ebx\n" \
- " movl $0, %ecx\n" \
- " movl $0, %edx\n" \
- " movl $0, %esi\n" \
- " movl $0, %edi\n" \
- " movl $0, %ebp\n"
-
-
-/* Jump to 'dst', but first set the stack pointer to 'stack'. Also,
- clear all the integer registers before entering 'dst'. It's
- important that the stack pointer is set to exactly 'stack' and not
- (eg) stack - apparently_harmless_looking_small_offset. Basically
- because the code at 'dst' might be wanting to scan the area above
- 'stack' (viz, the auxv array), and putting spurious words on the
- stack confuses it.
-*/
-/*
-__attribute__((noreturn))
-void jump_and_switch_stacks ( Addr stack, Addr dst );
-
- 4(%esp) =3D=3D stack
- 8(%esp) =3D=3D f
-*/
-asm(
-".global jump_and_switch_stacks\n"
-"jump_and_switch_stacks:\n"
-" movl %esp, %esi\n" /* remember old stack pointer */
-" movl 4(%esi), %esp\n" /* set stack */
-" pushl 8(%esi)\n" /* f to stack*/
- ZERO_ALL_INT_REGS
-" ret\n" /* jump to f */
-" ud2\n" /* should never get here */
-);
-
-
-
-/* Call f(arg1), but first switch stacks, using 'stack' as the new
- stack, and use 'retaddr' as f's return-to address. Also, clear all
- the integer registers before entering f.*/
-/*
-__attribute__((noreturn))
-void call_on_new_stack_0_1 ( Addr stack,
- Addr retaddr,
- void (*f)(Word),
- Word arg1 );
- 4(%esp) =3D=3D stack
- 8(%esp) =3D=3D retaddr
- 12(%esp) =3D=3D f
- 16(%esp) =3D=3D arg1
-*/
-asm(
-".global call_on_new_stack_0_1\n"
-"call_on_new_stack_0_1:\n"
-" movl %esp, %esi\n" /* remember old stack pointer */
-" movl 4(%esi), %esp\n" /* set stack */
-" pushl 16(%esi)\n" /* arg1 to stack */
-" pushl 8(%esi)\n" /* retaddr to stack */
-" pushl 12(%esi)\n" /* f to stack */
- ZERO_ALL_INT_REGS
-" ret\n" /* jump to f */
-" ud2\n" /* should never get here */
-);
-
-
-#undef ZERO_ALL_INT_REGS
|