kernel/eka/debug/ost/inc/traceutils.h
branchGCC_SURGE
changeset 160 30e086416910
parent 0 a41df078684a
--- 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) \