barebox/arch/arm/include/asm/common.h
Sascha Hauer 6b8e614bac add arm helper function to determine the program counter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-05-03 15:05:38 +02:00

20 lines
321 B
C

#ifndef __ASM_ARM_COMMON_H
#define __ASM_ARM_COMMON_H
#define ARCH_SHUTDOWN
static inline unsigned long get_pc(void)
{
unsigned long pc;
__asm__ __volatile__(
"mov %0, pc\n"
: "=r" (pc)
:
: "memory");
return pc;
}
#endif /* __ASM_ARM_COMMON_H */