qemu/tests/tcg/mips/mips64-dsp/io.h
<<
>>
Prefs
   1#ifndef _ASM_IO_H
   2#define _ASM_IO_H
   3extern int printf(const char *fmt, ...);
   4extern unsigned long get_ticks(void);
   5
   6#define _read(source)                \
   7({ unsigned long __res;                \
   8    __asm__ __volatile__(            \
   9        "mfc0\t%0, " #source "\n\t"    \
  10        : "=r" (__res));        \
  11    __res;                    \
  12})
  13
  14#define __read(source)                \
  15({ unsigned long __res;                \
  16    __asm__ __volatile__(            \
  17        "move\t%0, " #source "\n\t"    \
  18        : "=r" (__res));        \
  19    __res;                    \
  20})
  21
  22#endif
  23