|
From: <sv...@va...> - 2005-05-16 22:39:30
|
Author: njn
Date: 2005-05-16 22:39:23 +0100 (Mon, 16 May 2005)
New Revision: 3749
Modified:
trunk/coregrind/amd64/core_arch.h
trunk/coregrind/arm/core_arch.h
trunk/coregrind/m_syscalls/syscalls-amd64-linux.c
trunk/coregrind/m_syscalls/syscalls-x86-linux.c
trunk/coregrind/x86/core_arch.h
Log:
Move VGA_STACK_SIZE_W into m_syscalls, the only place that uses it.
Modified: trunk/coregrind/amd64/core_arch.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/amd64/core_arch.h 2005-05-16 21:30:24 UTC (rev 3748)
+++ trunk/coregrind/amd64/core_arch.h 2005-05-16 21:39:23 UTC (rev 3749)
@@ -54,13 +54,6 @@
#define VGA_CLREQ_ARGS guest_RAX
#define VGA_CLREQ_RET guest_RDX
=20
-/* ---------------------------------------------------------------------
- Miscellaneous constants
- ------------------------------------------------------------------ */
-
-// Valgrind's stack size, in words.
-#define VGA_STACK_SIZE_W 16384
-
#endif // __AMD64_CORE_ARCH_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/arm/core_arch.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/arm/core_arch.h 2005-05-16 21:30:24 UTC (rev 3748)
+++ trunk/coregrind/arm/core_arch.h 2005-05-16 21:39:23 UTC (rev 3749)
@@ -59,10 +59,6 @@
#define VGA_CLREQ_ARGS guest_R0
#define VGA_CLREQ_RET guest_R0
=20
-/* ---------------------------------------------------------------------
- Miscellaneous constants
- ------------------------------------------------------------------ */
-
#endif // __ARM_CORE_ARCH_H
=20
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_syscalls/syscalls-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_syscalls/syscalls-amd64-linux.c 2005-05-16 21:30:24=
UTC (rev 3748)
+++ trunk/coregrind/m_syscalls/syscalls-amd64-linux.c 2005-05-16 21:39:23=
UTC (rev 3749)
@@ -187,13 +187,16 @@
*/
#define FILL 0xdeadbeefcabafeed
=20
+// Valgrind's stack size, in words.
+#define STACK_SIZE_W 16384
+
static UWord* allocstack(ThreadId tid)
{
ThreadState *tst =3D VG_(get_ThreadState)(tid);
UWord* rsp;
=20
if (tst->os_state.valgrind_stack_base =3D=3D 0) {
- void *stk =3D VG_(mmap)(0, VGA_STACK_SIZE_W * sizeof(UWord) + VKI_=
PAGE_SIZE,
+ void *stk =3D VG_(mmap)(0, STACK_SIZE_W * sizeof(UWord) + VKI_PAGE=
_SIZE,
VKI_PROT_READ|VKI_PROT_WRITE,
VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
SF_VALGRIND,
@@ -202,7 +205,7 @@
if (stk !=3D (void *)-1) {
VG_(mprotect)(stk, VKI_PAGE_SIZE, VKI_PROT_NONE); /* guard page */
tst->os_state.valgrind_stack_base =3D ((Addr)stk) + VKI_PAGE_SIZE;
- tst->os_state.valgrind_stack_szB =3D VGA_STACK_SIZE_W * sizeof(UWord)=
;
+ tst->os_state.valgrind_stack_szB =3D STACK_SIZE_W * sizeof(UWord);
} else=20
return (UWord*)-1;
}
Modified: trunk/coregrind/m_syscalls/syscalls-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_syscalls/syscalls-x86-linux.c 2005-05-16 21:30:24 U=
TC (rev 3748)
+++ trunk/coregrind/m_syscalls/syscalls-x86-linux.c 2005-05-16 21:39:23 U=
TC (rev 3749)
@@ -47,6 +47,7 @@
Note. Why is this stuff here?
------------------------------------------------------------------ */
=20
+
/* These are addresses within VGA_(client_syscall). See syscall.S for d=
etails. */
extern const Addr VGA_(blksys_setup);
extern const Addr VGA_(blksys_restart);
@@ -185,13 +186,16 @@
*/
#define FILL 0xdeadbeef
=20
+// Valgrind's stack size, in words.
+#define STACK_SIZE_W 16384
+
static UWord* allocstack(ThreadId tid)
{
ThreadState *tst =3D VG_(get_ThreadState)(tid);
UWord *esp;
=20
if (tst->os_state.valgrind_stack_base =3D=3D 0) {
- void *stk =3D VG_(mmap)(0, VGA_STACK_SIZE_W * sizeof(UWord) + VKI_=
PAGE_SIZE,
+ void *stk =3D VG_(mmap)(0, STACK_SIZE_W * sizeof(UWord) + VKI_PAGE=
_SIZE,
VKI_PROT_READ|VKI_PROT_WRITE,
VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
SF_VALGRIND,
@@ -200,7 +204,7 @@
if (stk !=3D (void *)-1) {
VG_(mprotect)(stk, VKI_PAGE_SIZE, VKI_PROT_NONE); /* guard page */
tst->os_state.valgrind_stack_base =3D ((Addr)stk) + VKI_PAGE_SIZE;
- tst->os_state.valgrind_stack_szB =3D VGA_STACK_SIZE_W * sizeof(UWord)=
;
+ tst->os_state.valgrind_stack_szB =3D STACK_SIZE_W * sizeof(UWord);
} else=20
return (UWord*)-1;
}
Modified: trunk/coregrind/x86/core_arch.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/x86/core_arch.h 2005-05-16 21:30:24 UTC (rev 3748)
+++ trunk/coregrind/x86/core_arch.h 2005-05-16 21:39:23 UTC (rev 3749)
@@ -61,14 +61,6 @@
//extern const Char VG_(helper_INT)[];
//extern const Char VG_(helper_breakpoint)[];
=20
-
-/* ---------------------------------------------------------------------
- Miscellaneous constants
- ------------------------------------------------------------------ */
-
-// Valgrind's stack size, in words.
-#define VGA_STACK_SIZE_W 16384
-
#endif // __X86_CORE_ARCH_H
=20
/*--------------------------------------------------------------------*/
|