# HG changeset patch # User mikek # Date 1276689558 -3600 # Node ID 30e0864169102f9677e8a321353559becbe2d2ae # Parent 185ac9ba847c7b44cd945fba73bf49863983ff70 Fix for Bug 2984 - [GCCE] Illegal inline assembler in kernel/eka/debug/utrace/src/e32utrace.cpp diff -r 185ac9ba847c -r 30e086416910 kernel/eka/debug/ost/inc/traceutils.h --- a/kernel/eka/debug/ost/inc/traceutils.h Wed Jun 16 12:01:26 2010 +0100 +++ b/kernel/eka/debug/ost/inc/traceutils.h Wed Jun 16 12:59:18 2010 +0100 @@ -85,9 +85,17 @@ #ifdef __MARM_ARMV5__ //armv5 -#define GET_PC(pc) \ - TUint32 pc = 0; \ - asm("mov pc, __return_address()") + #if defined(__GCCE__) + #define GET_PC(pc) \ + TUint32 pc = 0; \ + asm("mov %[res], %[val]" : [res] "=r" (pc) : [val] "r" (__builtin_return_address(0))) + #elif defined(__ARMCC__) + #define GET_PC(pc) \ + TUint32 pc = 0; \ + asm("mov pc, __return_address()") + #else + #error What compiler? + #endif #elif __MARM_ARM4__ //arm4 not implemented yet! #define GET_PC(pc) \ diff -r 185ac9ba847c -r 30e086416910 kernel/eka/debug/utrace/inc/traceutils.h --- a/kernel/eka/debug/utrace/inc/traceutils.h Wed Jun 16 12:01:26 2010 +0100 +++ b/kernel/eka/debug/utrace/inc/traceutils.h Wed Jun 16 12:59:18 2010 +0100 @@ -77,9 +77,17 @@ #ifdef __MARM_ARMV5__ //armv5 -#define GET_PC(pc) \ - TUint32 pc = 0; \ - asm("mov pc, __return_address()") + #if defined(__GCCE__) + #define GET_PC(pc) \ + TUint32 pc = 0; \ + asm("mov %[res], %[val]" : [res] "=r" (pc) : [val] "r" (__builtin_return_address(0))) + #elif defined(__ARMCC__) + #define GET_PC(pc) \ + TUint32 pc = 0; \ + asm("mov pc, __return_address()") + #else + #error What compiler? + #endif #elif __MARM_ARM4__ //arm4 not implemented yet! #define GET_PC(pc) \