GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > TEX / V0-0-0

Constituent: tex     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

TEX_pubdefs.h.xx-ppc-gcc File Reference

PowerPC/gcc specific implementation of the TRC__tics macro. More...


Defines

#define TRC__tics()


Detailed Description

PowerPC/gcc specific implementation of the TRC__tics macro.

CVS $Id: TEX_pubdefs.h.xx-ppc-gcc,v 1.1.1.1 2007/03/22 00:56:19 apw Exp $
Author:
A.P.Waite

Define Documentation

 
#define TRC__tics  ) 
 

Value:

({                                                          \
           union                                                   \
           {                                                       \
                 struct { unsigned int hi; unsigned int lo; } ui;  \
                 unsigned long long                          ull;  \
           } ll;                                                   \
           unsigned int tbl, tbh, tbh_i;                           \
           asm volatile ("mftbu %0": "=r"(tbh_i));                 \
           while (1)                                               \
           {                                                       \
               asm volatile ("mftb  %0    \n"                      \
                             "mftbu %1    \n"                      \
                             : "=r"(tbl), "=r"(tbh));              \
               if (tbh == tbh_i) break;                            \
               tbh_i = tbh;                                        \
           }                                                       \
           ll.ui.hi = tbh;                                         \
           ll.ui.lo = tbl;                                         \
           ll.ull;} )


Generated on Thu Mar 22 02:57:49 2007 by  doxygen 1.4.4