~ubuntu-branches/ubuntu/karmic/e-uae/karmic

« back to all changes in this revision

Viewing changes to src/md-ppc-gcc/rpt.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Suerken
  • Date: 2008-07-05 14:02:02 UTC
  • Revision ID: james.westby@ubuntu.com-20080705140202-u5aagnhtg31pmjc3
Tags: upstream-0.8.29-WIP4
ImportĀ upstreamĀ versionĀ 0.8.29-WIP4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 /*
 
2
  * UAE - The Un*x Amiga Emulator
 
3
  *
 
4
  * Definitions for accessing cycle counters on a given machine, if possible.
 
5
  *
 
6
  * Copyright 1998 Bernd Schmidt
 
7
  * Copyright 2005 Richard Drummond
 
8
  */
 
9
 
 
10
#ifndef EUAE_MACHDEP_RPT_H
 
11
#define EUAE_MACHDEP_RPT_H
 
12
 
 
13
STATIC_INLINE uae_s32 read_processor_time (void)
 
14
{
 
15
    frame_time_t b;
 
16
    __asm__ __volatile__ ("mfspr %0,268" : "=r" (b) :  );
 
17
    return b;
 
18
}
 
19
 
 
20
STATIC_INLINE frame_time_t machdep_gethrtime (void)
 
21
{
 
22
    return read_processor_time ();
 
23
}
 
24
 
 
25
frame_time_t machdep_gethrtimebase (void);
 
26
int          machdep_inithrtimer   (void);
 
27
 
 
28
#endif /* EUAE_MACHDEP_RPT_H */