Fix for Bug 2984 - [GCCE] Illegal inline assembler in kernel/eka/debug/utrace/src/e32utrace.cpp
--- 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) \
--- 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) \