From cd482a8dfcd52e6dc52e0661406343c6c841cbf3 Mon Sep 17 00:00:00 2001 From: marcel Date: Tue, 29 Jun 2010 19:07:44 +0000 Subject: Fix profiling (part 1): o Functions are 4-byte aligned for Book-E. o We get compiled with -DPROF and not -DGPROF if profiling is enabled. --- sys/powerpc/include/asm.h | 2 +- sys/powerpc/include/profile.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/include/asm.h b/sys/powerpc/include/asm.h index d611617..f80c118 100644 --- a/sys/powerpc/include/asm.h +++ b/sys/powerpc/include/asm.h @@ -63,7 +63,7 @@ #define _ENTRY(x) \ .text; .align 4; .globl x; .type x,@function; x: -#ifdef GPROF +#ifdef PROF # define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount #else # define _PROF_PROLOGUE diff --git a/sys/powerpc/include/profile.h b/sys/powerpc/include/profile.h index 388feb1..47f1393 100644 --- a/sys/powerpc/include/profile.h +++ b/sys/powerpc/include/profile.h @@ -34,7 +34,7 @@ #define _MCOUNT_DECL void __mcount -#define FUNCTION_ALIGNMENT 16 +#define FUNCTION_ALIGNMENT 4 typedef u_int fptrdiff_t; -- cgit v1.1