[MPlayer-dev-eng] read_time PPC

Andrea Palmatè andrea at amigasoft.net
Tue May 31 11:08:33 CEST 2005


Hi,

i have problem to compile this function on my G4.

static inline uint64_t read_time(void)
{
     uint32_t tbu, tbl, temp;

      /* from section 2.2.1 of the 32-bit PowerPC PEM */
      __asm__ __volatile__(
          "1:\n"
          "mftbu  %2\n"
          "mftb   %0\n"
          "mftbu  %1\n"
          "cmpw   %2,%1\n"
          "bne    1b\n"
      : "=r"(tbl), "=r"(tbu), "=r"(temp)
      :
      : "cc");

      return (((uint64_t)tbu)<<32) | (uint64_t)tbl;
}

The assempler doesn'r recognize mftbu and mftb instructions. I must add 
some machine parameters to config.mak?

Bye
Andrea




More information about the MPlayer-dev-eng mailing list