ROSS
ia64.c
Go to the documentation of this file.
1 #include <ross.h>
2 
3 #ifndef __GNUC__
4 # error gcc asm extensions required
5 #endif
6 #ifndef __ia64__
7 # error only ia64 platform supported
8 #endif
9 
10 static tw_clock tw_clock_read(void)
11 {
12  tw_clock result;
13  do {
14  __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
15  } while (__builtin_expect ((int) result == -1, 0));
16  return result;
17 }
18 
19 void
21 {
22  me->clock_time = 0;
24 }
25 
28 {
30  return me->clock_time;
31 }
void tw_clock_init(tw_pe *me)
Definition: ia64.c:20
Holds the entire PE state.
Definition: ross-types.h:375
tw_clock tw_clock_now(tw_pe *me)
Definition: ia64.c:27
static tw_clock tw_clock_read(void)
Definition: ia64.c:10
tw_clock clock_offset
Initial clock value for this PE.
Definition: ross-types.h:396
tw_clock clock_time
Most recent clock value for this PE.
Definition: ross-types.h:397
uint64_t tw_clock
Definition: aarch64.h:4