From: Nicholas Nethercote Date: Sun, 8 May 2005 17:49:37 +0000 (+0000) Subject: Rename some _SIZE macros as _SZB to make their units clear. This change is X-Git-Tag: svn/VALGRIND_3_0_0~679 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89a26b8f71e4795b0b5acdaa61664a20da083b6b;p=thirdparty%2Fvalgrind.git 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). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3639 --- diff --git a/NOTES.txt b/NOTES.txt index 6b6d7bc544..29a1c80d2a 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -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. diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c index 3cea6e2587..6421b1037c 100644 --- a/cachegrind/cg_main.c +++ b/cachegrind/cg_main.c @@ -535,8 +535,8 @@ void endOfInstr(IRBB* bbOut, instr_info* i_node, Bool bbSeenBefore, // Nb: instrLen will be zero if Vex failed to decode it. tl_assert( 0 == instrLen || - (instrLen >= VGA_MIN_INSTR_SIZE && - instrLen <= VGA_MAX_INSTR_SIZE) ); + (instrLen >= VGA_MIN_INSTR_SZB && + instrLen <= VGA_MAX_INSTR_SZB) ); // Large (eg. 28B, 108B, 512B on x86) data-sized instructions will be // done inaccurately, but they're very rare and this avoids errors from diff --git a/coregrind/m_aspacemgr/aspacemgr.c b/coregrind/m_aspacemgr/aspacemgr.c index 785eec73d7..e5505c00c5 100644 --- a/coregrind/m_aspacemgr/aspacemgr.c +++ b/coregrind/m_aspacemgr/aspacemgr.c @@ -1042,7 +1042,7 @@ Segment *VG_(find_segment_above_mapped)(Addr a) 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 @@ Segment *VG_(find_segment_above_mapped)(Addr a) When SP goes back up, mark the area receded over as unreadable and unwritable. - 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: + 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. - 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. */ diff --git a/coregrind/m_sigframe/sigframe-amd64-linux.c b/coregrind/m_sigframe/sigframe-amd64-linux.c index 622806a236..8c765c4993 100644 --- a/coregrind/m_sigframe/sigframe-amd64-linux.c +++ b/coregrind/m_sigframe/sigframe-amd64-linux.c @@ -399,8 +399,8 @@ static Bool extend ( ThreadState *tst, Addr addr, SizeT size ) /* 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 ); return True; } @@ -597,8 +597,8 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) size = restore_rt_sigframe(tst, (struct rt_sigframe *)rsp, &sigNo); - 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 ); if (VG_(clo_trace_signals)) VG_(message)( diff --git a/coregrind/m_sigframe/sigframe-x86-linux.c b/coregrind/m_sigframe/sigframe-x86-linux.c index bcf211167b..e19cac72f3 100644 --- a/coregrind/m_sigframe/sigframe-x86-linux.c +++ b/coregrind/m_sigframe/sigframe-x86-linux.c @@ -420,8 +420,8 @@ static Bool extend ( ThreadState *tst, Addr addr, SizeT size ) /* 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 ); return True; } @@ -679,8 +679,8 @@ void VG_(sigframe_destroy)( ThreadId tid, Bool isRT ) else size = restore_rt_sigframe(tst, (struct rt_sigframe *)esp, &sigNo); - 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 ); if (VG_(clo_trace_signals)) VG_(message)( diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index d5a7f6668a..36dd0dc703 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -205,7 +205,7 @@ void VG_(apply_StackTrace)( void(*action)(UInt n, Addr ip), do { Addr ip = ips[i]; if (i > 0) - ip -= VGA_MIN_INSTR_SIZE; // point to calling line + ip -= VGA_MIN_INSTR_SZB; // point to calling line // Stop after "main"; if main() is recursive, stop after last main(). if ( ! VG_(clo_show_below_main)) { diff --git a/coregrind/vg_signals.c b/coregrind/vg_signals.c index d763d67ac6..4496b2025b 100644 --- a/coregrind/vg_signals.c +++ b/coregrind/vg_signals.c @@ -797,7 +797,7 @@ void push_signal_frame ( ThreadId tid, const vki_siginfo_t *siginfo ) VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/True ); } else { - esp_top_of_frame = STACK_PTR(tst->arch) - VGA_STACK_REDZONE_SIZE; + esp_top_of_frame = STACK_PTR(tst->arch) - VGA_STACK_REDZONE_SZB; /* Signal delivery to tools */ VG_TRACK( pre_deliver_signal, tid, sigNo, /*alt_stack*/False ); @@ -1831,14 +1831,14 @@ void sync_signalhandler ( Int sigNo, vki_siginfo_t *info, struct vki_ucontext *u VG_(shadow_base), VG_(shadow_end)); } if (info->si_code == 1 /* SEGV_MAPERR */ - && fault >= (esp - VGA_STACK_REDZONE_SIZE) + && fault >= (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. */ - Addr base = PGROUNDDN(esp - VGA_STACK_REDZONE_SIZE); + Addr base = 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, diff --git a/include/amd64/tool_arch.h b/include/amd64/tool_arch.h index c2a15db3f7..fc48c68089 100644 --- a/include/amd64/tool_arch.h +++ b/include/amd64/tool_arch.h @@ -34,14 +34,14 @@ #define VGA_REGPARM(n) /* */ -#define VGA_MIN_INSTR_SIZE 1 -#define VGA_MAX_INSTR_SIZE 16 +#define VGA_MIN_INSTR_SZB 1 +#define VGA_MAX_INSTR_SZB 16 /* 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 #endif // __AMD64_TOOL_ARCH_H diff --git a/include/arm/tool_arch.h b/include/arm/tool_arch.h index 7e3165fbd2..383c0a5b7a 100644 --- a/include/arm/tool_arch.h +++ b/include/arm/tool_arch.h @@ -36,8 +36,8 @@ #define VGA_REGPARM(n) -#define VGA_MIN_INSTR_SIZE 4 -#define VGA_MAX_INSTR_SIZE 4 +#define VGA_MIN_INSTR_SZB 4 +#define VGA_MAX_INSTR_SZB 4 #endif // __ARM_TOOL_ARCH_H diff --git a/include/x86/tool_arch.h b/include/x86/tool_arch.h index 5d042f2a3b..a98d4ce9c5 100644 --- a/include/x86/tool_arch.h +++ b/include/x86/tool_arch.h @@ -34,14 +34,14 @@ #define VGA_REGPARM(n) __attribute__((regparm(n))) -#define VGA_MIN_INSTR_SIZE 1 -#define VGA_MAX_INSTR_SIZE 16 +#define VGA_MIN_INSTR_SZB 1 +#define VGA_MAX_INSTR_SZB 16 /* 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 #endif // __X86_TOOL_ARCH_H diff --git a/memcheck/mac_shared.h b/memcheck/mac_shared.h index f6b0653ea9..6d07e44bc3 100644 --- a/memcheck/mac_shared.h +++ b/memcheck/mac_shared.h @@ -451,9 +451,9 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_4)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_4)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_8)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_8)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_12)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_12)(Addr new_SP) \ 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 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_16)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_16)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(new_mem_stack_32)(Addr new_SP) \ { \ 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 @@ void VGA_REGPARM(1) MAC_(die_mem_stack_32)(Addr new_SP) \ { \ 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 ); \ } #endif /* __MAC_SHARED_H */