|
From: <sv...@va...> - 2005-05-08 17:49:45
|
Author: njn
Date: 2005-05-08 18:49:37 +0100 (Sun, 08 May 2005)
New Revision: 3639
Modified:
trunk/NOTES.txt
trunk/cachegrind/cg_main.c
trunk/coregrind/m_aspacemgr/aspacemgr.c
trunk/coregrind/m_sigframe/sigframe-amd64-linux.c
trunk/coregrind/m_sigframe/sigframe-x86-linux.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/vg_signals.c
trunk/include/amd64/tool_arch.h
trunk/include/arm/tool_arch.h
trunk/include/x86/tool_arch.h
trunk/memcheck/mac_shared.h
Log:
Rename some _SIZE macros as _SZB to make their units clear. This change =
is
in response to a mixed-units (bytes and words) error we had involving
VGA_STACK_REDZONE_SIZE (which is now VGA_STACK_REDZONE_SZB).
Modified: trunk/NOTES.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/NOTES.txt 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/NOTES.txt 2005-05-08 17:49:37 UTC (rev 3639)
@@ -2,7 +2,7 @@
23 Apr 05 (memcheck-on-amd64 notes)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* If a thread is given an initial stack with address range [lo .. hi],
- we need to tell memcheck that the area [lo - VGA_STACK_REDZONE_SIZE
+ we need to tell memcheck that the area [lo - VGA_STACK_REDZONE_SZB
.. hi] is valid, rather than just [lo .. hi] as has been the case on
x86-only systems. However, am not sure where to look for the call
into memcheck that states the new stack area.
Modified: trunk/cachegrind/cg_main.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/cachegrind/cg_main.c 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/cachegrind/cg_main.c 2005-05-08 17:49:37 UTC (rev 3639)
@@ -535,8 +535,8 @@
=20
// Nb: instrLen will be zero if Vex failed to decode it.
tl_assert( 0 =3D=3D instrLen ||
- (instrLen >=3D VGA_MIN_INSTR_SIZE &&=20
- instrLen <=3D VGA_MAX_INSTR_SIZE) );
+ (instrLen >=3D VGA_MIN_INSTR_SZB &&=20
+ instrLen <=3D VGA_MAX_INSTR_SZB) );
=20
// Large (eg. 28B, 108B, 512B on x86) data-sized instructions will be
// done inaccurately, but they're very rare and this avoids errors fr=
om
Modified: trunk/coregrind/m_aspacemgr/aspacemgr.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_aspacemgr/aspacemgr.c 2005-05-08 15:52:18 UTC (rev =
3638)
+++ trunk/coregrind/m_aspacemgr/aspacemgr.c 2005-05-08 17:49:37 UTC (rev =
3639)
@@ -1042,7 +1042,7 @@
the kernel as the stack pointer moves down. Initially, a 1-page
(4k) stack is allocated. When SP moves below that for the first
time, presumably a page fault occurs. The kernel detects that the
- faulting address is in the range from SP - VGA_STACK_REDZONE_SIZE
+ faulting address is in the range from SP - VGA_STACK_REDZONE_SZB
upwards to the current valid stack. It then extends the stack
segment downwards for enough to cover the faulting address, and
resumes the process (invisibly). The process is unaware of any of
@@ -1062,12 +1062,12 @@
When SP goes back up, mark the area receded over as unreadable and
unwritable.
=20
- Just to record the SP boundary conditions somewhere convenient: SP
- - VGA_STACK_REDZONE_SIZE always points to the lowest live byte in
- the stack. All addresses below SP - VGA_STACK_REDZONE_SIZE are not
+ Just to record the SP boundary conditions somewhere convenient:=20
+ SP - VGA_STACK_REDZONE_SZB always points to the lowest live byte in
+ the stack. All addresses below SP - VGA_STACK_REDZONE_SZB are not
live; those at and above it are.
=20
- We do not concern ourselves here with the VGA_STACK_REDZONE_SIZE
+ We do not concern ourselves here with the VGA_STACK_REDZONE_SZB
bias; that is handled by new_mem_stack/die_mem_stack.
*/
=20
Modified: trunk/coregrind/m_sigframe/sigframe-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_sigframe/sigframe-amd64-linux.c 2005-05-08 15:52:18=
UTC (rev 3638)
+++ trunk/coregrind/m_sigframe/sigframe-amd64-linux.c 2005-05-08 17:49:37=
UTC (rev 3639)
@@ -399,8 +399,8 @@
=20
/* For tracking memory events, indicate the entire frame has been
allocated. */
- VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SIZE,
- size + VGA_STACK_REDZONE_SIZE );
+ VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SZB,
+ size + VGA_STACK_REDZONE_SZB );
=20
return True;
}
@@ -597,8 +597,8 @@
=20
size =3D restore_rt_sigframe(tst, (struct rt_sigframe *)rsp, &sigNo);
=20
- VG_TRACK( die_mem_stack_signal, rsp - VGA_STACK_REDZONE_SIZE,
- size + VGA_STACK_REDZONE_SIZE );
+ VG_TRACK( die_mem_stack_signal, rsp - VGA_STACK_REDZONE_SZB,
+ size + VGA_STACK_REDZONE_SZB );
=20
if (VG_(clo_trace_signals))
VG_(message)(
Modified: trunk/coregrind/m_sigframe/sigframe-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_sigframe/sigframe-x86-linux.c 2005-05-08 15:52:18 U=
TC (rev 3638)
+++ trunk/coregrind/m_sigframe/sigframe-x86-linux.c 2005-05-08 17:49:37 U=
TC (rev 3639)
@@ -420,8 +420,8 @@
=20
/* For tracking memory events, indicate the entire frame has been
allocated. */
- VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SIZE,
- size + VGA_STACK_REDZONE_SIZE );
+ VG_TRACK( new_mem_stack_signal, addr - VGA_STACK_REDZONE_SZB,
+ size + VGA_STACK_REDZONE_SZB );
=20
return True;
}
@@ -679,8 +679,8 @@
else
size =3D restore_rt_sigframe(tst, (struct rt_sigframe *)esp, &sigN=
o);
=20
- VG_TRACK( die_mem_stack_signal, esp - VGA_STACK_REDZONE_SIZE,
- size + VGA_STACK_REDZONE_SIZE );
+ VG_TRACK( die_mem_stack_signal, esp - VGA_STACK_REDZONE_SZB,
+ size + VGA_STACK_REDZONE_SZB );
=20
if (VG_(clo_trace_signals))
VG_(message)(
Modified: trunk/coregrind/m_stacktrace.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_stacktrace.c 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/coregrind/m_stacktrace.c 2005-05-08 17:49:37 UTC (rev 3639)
@@ -205,7 +205,7 @@
do {
Addr ip =3D ips[i];
if (i > 0)=20
- ip -=3D VGA_MIN_INSTR_SIZE; // point to calling line
+ ip -=3D VGA_MIN_INSTR_SZB; // point to calling line
=20
// Stop after "main"; if main() is recursive, stop after last mai=
n().
if ( ! VG_(clo_show_below_main)) {
Modified: trunk/coregrind/vg_signals.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/vg_signals.c 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/coregrind/vg_signals.c 2005-05-08 17:49:37 UTC (rev 3639)
@@ -797,7 +797,7 @@
VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/True );
=20
} else {
- esp_top_of_frame =3D STACK_PTR(tst->arch) - VGA_STACK_REDZONE_SIZE=
;
+ esp_top_of_frame =3D STACK_PTR(tst->arch) - VGA_STACK_REDZONE_SZB;
=20
/* Signal delivery to tools */
VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False );
@@ -1831,14 +1831,14 @@
VG_(shadow_base), VG_(shadow_end));
}
if (info->si_code =3D=3D 1 /* SEGV_MAPERR */
- && fault >=3D (esp - VGA_STACK_REDZONE_SIZE)
+ && fault >=3D (esp - VGA_STACK_REDZONE_SZB)
&& fault < VG_(client_end)) {
/* If the fault address is above esp but below the current known
stack segment base, and it was a fault because there was
nothing mapped there (as opposed to a permissions fault),
then extend the stack segment.=20
*/
- Addr base =3D PGROUNDDN(esp - VGA_STACK_REDZONE_SIZE);
+ Addr base =3D PGROUNDDN(esp - VGA_STACK_REDZONE_SZB);
if (VG_(extend_stack)(base, VG_(threads)[tid].client_stack_szB)) {
if (VG_(clo_trace_signals))
VG_(message)(Vg_DebugMsg,=20
Modified: trunk/include/amd64/tool_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/include/amd64/tool_arch.h 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/include/amd64/tool_arch.h 2005-05-08 17:49:37 UTC (rev 3639)
@@ -34,14 +34,14 @@
#define VGA_REGPARM(n) /* */
=20
=20
-#define VGA_MIN_INSTR_SIZE 1
-#define VGA_MAX_INSTR_SIZE 16
+#define VGA_MIN_INSTR_SZB 1
+#define VGA_MAX_INSTR_SZB 16
=20
=20
/* How many bytes below the stack pointer are validly addressible?
On amd64, the answer is: 128.
*/
-#define VGA_STACK_REDZONE_SIZE 128
+#define VGA_STACK_REDZONE_SZB 128
=20
=20
#endif // __AMD64_TOOL_ARCH_H
Modified: trunk/include/arm/tool_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/include/arm/tool_arch.h 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/include/arm/tool_arch.h 2005-05-08 17:49:37 UTC (rev 3639)
@@ -36,8 +36,8 @@
=20
#define VGA_REGPARM(n)
=20
-#define VGA_MIN_INSTR_SIZE 4
-#define VGA_MAX_INSTR_SIZE 4=20
+#define VGA_MIN_INSTR_SZB 4
+#define VGA_MAX_INSTR_SZB 4=20
=20
#endif // __ARM_TOOL_ARCH_H
=20
Modified: trunk/include/x86/tool_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/include/x86/tool_arch.h 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/include/x86/tool_arch.h 2005-05-08 17:49:37 UTC (rev 3639)
@@ -34,14 +34,14 @@
#define VGA_REGPARM(n) __attribute__((regparm(n)))
=20
=20
-#define VGA_MIN_INSTR_SIZE 1
-#define VGA_MAX_INSTR_SIZE 16
+#define VGA_MIN_INSTR_SZB 1
+#define VGA_MAX_INSTR_SZB 16
=20
=20
/* How many bytes below the stack pointer are validly addressible?
On x86, the answer is: none.
*/
-#define VGA_STACK_REDZONE_SIZE 0
+#define VGA_STACK_REDZONE_SZB 0
=20
=20
#endif // __X86_TOOL_ARCH_H
Modified: trunk/memcheck/mac_shared.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/memcheck/mac_shared.h 2005-05-08 15:52:18 UTC (rev 3638)
+++ trunk/memcheck/mac_shared.h 2005-05-08 17:49:37 UTC (rev 3639)
@@ -451,9 +451,9 @@
{ \
PROF_EVENT(110, "new_mem_stack_4"); \
if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
} else { \
- UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 4 ); \
+ UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 4 ); \
} \
} \
\
@@ -461,9 +461,9 @@
{ \
PROF_EVENT(120, "die_mem_stack_4"); \
if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4 ); \
} else { \
- UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4, 4 ); \
+ UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4, 4 ); \
} \
} \
\
@@ -471,12 +471,12 @@
{ \
PROF_EVENT(111, "new_mem_stack_8"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+4 ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+4 ); \
} else { \
- UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 8 ); \
+ UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 8 ); \
} \
} \
\
@@ -484,12 +484,12 @@
{ \
PROF_EVENT(121, "die_mem_stack_8"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-8 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-8 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-8 ); \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-8 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4 ); \
} else { \
- UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-8, 8 ); \
+ UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-8, 8 ); \
} \
} \
\
@@ -497,13 +497,13 @@
{ \
PROF_EVENT(112, "new_mem_stack_12"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+8 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+8 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+4 ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+4 ); \
} else { \
- UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 12 ); \
+ UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 12 ); \
} \
} \
\
@@ -512,13 +512,13 @@
PROF_EVENT(122, "die_mem_stack_12"); \
/* Note the -12 in the test */ \
if (VG_IS_8_ALIGNED(new_SP-12)) { \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-12 ); \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-12 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-12 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-8 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-12 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-8 ); \
} else { \
- UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-12, 12 ); \
+ UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-12, 12 ); \
} \
} \
\
@@ -526,14 +526,14 @@
{ \
PROF_EVENT(113, "new_mem_stack_16"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+8 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+8 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+4 ); \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+12 ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+4 ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+12 ); \
} else { \
- UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 16 ); \
+ UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 16 ); \
} \
} \
\
@@ -541,14 +541,14 @@
{ \
PROF_EVENT(123, "die_mem_stack_16"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-16 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-8 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-16 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-8 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-16 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-12 ); \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-16 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-12 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4 ); \
} else { \
- UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-16, 16 ); \
+ UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-16, 16 ); \
} \
} \
\
@@ -556,18 +556,18 @@
{ \
PROF_EVENT(114, "new_mem_stack_32"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+8 ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+16 ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+24 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+8 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+16 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+24 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+4 ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+12 ); \
- ALIGNED8_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+20 ); \
- ALIGNED4_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP+28 ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+4 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+12 ); \
+ ALIGNED8_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+20 ); \
+ ALIGNED4_NEW ( -VGA_STACK_REDZONE_SZB + new_SP+28 ); \
} else { \
- UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + new_SP, 32 ); \
+ UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + new_SP, 32 ); \
} \
} \
\
@@ -575,31 +575,31 @@
{ \
PROF_EVENT(124, "die_mem_stack_32"); \
if (VG_IS_8_ALIGNED(new_SP)) { \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-32 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-24 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-16 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP- 8 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-32 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-24 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-16 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP- 8 ); \
} else if (VG_IS_4_ALIGNED(new_SP)) { \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-32 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-28 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-20 ); \
- ALIGNED8_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-12 ); \
- ALIGNED4_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-4 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-32 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-28 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-20 ); \
+ ALIGNED8_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-12 ); \
+ ALIGNED4_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-4 ); \
} else { \
- UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + new_SP-32, 32 ); \
+ UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + new_SP-32, 32 ); \
} \
} \
\
void MAC_(new_mem_stack) ( Addr a, SizeT len ) \
{ \
PROF_EVENT(115, "new_mem_stack"); \
- UNALIGNED_NEW ( -VGA_STACK_REDZONE_SIZE + a, len ); \
+ UNALIGNED_NEW ( -VGA_STACK_REDZONE_SZB + a, len ); \
} \
\
void MAC_(die_mem_stack) ( Addr a, SizeT len ) \
{ \
PROF_EVENT(125, "die_mem_stack"); \
- UNALIGNED_DIE ( -VGA_STACK_REDZONE_SIZE + a, len ); \
+ UNALIGNED_DIE ( -VGA_STACK_REDZONE_SZB + a, len ); \
}
=20
#endif /* __MAC_SHARED_H */
|