summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-14 13:20:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-17 08:56:31 +0200
commitfe283f6c7769a07f392b31eae357b33c7d91d932 (patch)
tree8def120f80ac42141a0a17de5f90884f9cdb37a9
parentaaa6653b726dcaa8916514c18a576079e62fe5d1 (diff)
downloadrtems-fe283f6c7769a07f392b31eae357b33c7d91d932.tar.bz2
powerpc: Fix _CPU_Counter_read() for MPC860
The mpc860 is a RTEMS-specific multilib define, see GCC "gcc/config/rs6000/rtems.h".
-rw-r--r--cpukit/score/cpu/powerpc/include/rtems/score/cpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
index a2a1135363..beacc2829e 100644
--- a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
@@ -745,6 +745,8 @@ static inline CPU_Counter_ticks _CPU_Counter_read( void )
#if defined(__PPC_CPU_E6500__)
/* Use Alternate Time Base */
__asm__ volatile( "mfspr %0, 526" : "=r" (value) );
+#elif defined(mpc860)
+ __asm__ volatile( "mftb %0" : "=r" (value) );
#else
__asm__ volatile( "mfspr %0, 268" : "=r" (value) );
#endif