From 6ac6f0b873cffea1817a361764e868e93f043af2 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 16 Nov 2012 13:48:51 +0000 Subject: Enable android profiler build. Requires android-ndk-profiler to be copied into android and android/jni. Also requires r8c of the NDK. --- draw/draw_simple_scale.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'draw') diff --git a/draw/draw_simple_scale.c b/draw/draw_simple_scale.c index 6f123ce3..f79b4c2c 100644 --- a/draw/draw_simple_scale.c +++ b/draw/draw_simple_scale.c @@ -20,6 +20,13 @@ intermediate results rather than ints. */ #define SINGLE_PIXEL_SPECIALS +#ifdef NDK_PROFILER +extern void __gnu_mcount_nc(void); +#define ENTER_PG "push {lr}\nbl __gnu_mcount_nc\n" +#else +#define ENTER_PG +#endif + /* If we're compiling as thumb code, then we need to tell the compiler * to enter and exit ARM mode around our assembly sections. If we move * the ARM functions to a separate file and arrange for it to be compiled @@ -27,8 +34,8 @@ intermediate results rather than ints. */ #ifdef ARCH_ARM #ifdef ARCH_THUMB -#define ENTER_ARM ".balign 4\nmov r12,pc\nbx r12\n0:.arm\n" -#define ENTER_THUMB "9:.thumb\n" +#define ENTER_ARM ".balign 4\nmov r12,pc\nbx r12\n0:.arm\n" ENTER_PG +#define ENTER_THUMB "9:.thumb\n" ENTER_PG #else #define ENTER_ARM #define ENTER_THUMB -- cgit v1.2.3