[RTEMS Project] #2369: [PowerPC Book E] Invalid mftb instruction in _CPU_Counter_read()

RTEMS trac trac at rtems.org
Thu Jul 9 05:51:57 UTC 2015


#2369: [PowerPC Book E] Invalid mftb instruction in _CPU_Counter_read()
--------------------------+---------------------
 Reporter:  nick.withers  |       Owner:
     Type:  defect        |      Status:  new
 Priority:  normal        |   Milestone:  4.11.1
Component:  General       |     Version:  4.11
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+---------------------

Comment (by sebastian.huber):

 We have:

 static inline CPU_Counter_ticks _CPU_Counter_read( void )
 {
   CPU_Counter_ticks value;

 #if defined(ppc8540) || defined(__PPC_CPU_E6500__)
   /* Use Alternate Time Base */
   __asm__ volatile( "mfspr %0, 526" : "=r" (value) );
 #else
   __asm__ volatile( "mftb %0" : "=r" (value) );
 #endif

   return value;
 }

 The ppc8540 is the multilib intended for the e500 processors, why is this
 not used?

--
Ticket URL: <http://devel.rtems.org/ticket/2369#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list