215 |
#define EMMS() |
#define EMMS() |
216 |
|
|
217 |
// needed for bitstream.h |
// needed for bitstream.h |
218 |
#define BSWAP(a) \ |
#define BSWAP(a) __asm__ __volatile__ ("mux1 %1 = %0, @rev" \ |
219 |
((a) = ( ((a)&0xff)<<24) | (((a)&0xff00)<<8) | (((a)>>8)&0xff00) | (((a)>>24)&0xff)) |
";;" \ |
220 |
|
"shr.u %1 = %1, 32" : "=r" (a) : "r" (a)); |
221 |
|
|
222 |
// rdtsc command most likely not supported, |
// rdtsc replacement for ia64 |
|
// so just dummy code here |
|
223 |
static __inline int64_t read_counter() { |
static __inline int64_t read_counter() { |
224 |
return 0; |
unsigned long result; |
225 |
|
|
226 |
|
// __asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory"); |
227 |
|
// while (__builtin_expect ((int) result == -1, 0)) |
228 |
|
__asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory"); |
229 |
|
return result; |
230 |
|
|
231 |
} |
} |
232 |
|
|
233 |
#else |
#else |