105 |
return ts; |
return ts; |
106 |
} |
} |
107 |
|
|
108 |
#elif defined(LINUX) || defined(DJGPP) || defined(FREEBSD) |
#elif defined(LINUX) || defined(DJGPP) || defined(FREEBSD) || defined(BEOS) |
109 |
|
|
110 |
#include <stdio.h> |
#include <stdio.h> |
111 |
#include <stdarg.h> |
#include <stdarg.h> |
143 |
#define DEBUGCBR(A,B,C) |
#define DEBUGCBR(A,B,C) |
144 |
#endif |
#endif |
145 |
|
|
146 |
#if defined(LINUX) |
#if defined(LINUX) || defined(BEOS) |
147 |
|
|
148 |
|
#if defined(BEOS) |
149 |
|
#include <inttypes.h> |
150 |
|
#else |
151 |
#include <stdint.h> |
#include <stdint.h> |
152 |
|
#endif |
153 |
|
|
154 |
#define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ |
#define DECLARE_ALIGNED_MATRIX(name,sizex,sizey,type,alignment) \ |
155 |
type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ |
type name##_storage[(sizex)*(sizey)+(alignment)-1]; \ |
218 |
|
|
219 |
#define EMMS() |
#define EMMS() |
220 |
|
|
221 |
|
#ifdef __GNUC__ |
222 |
|
|
223 |
// needed for bitstream.h |
// needed for bitstream.h |
224 |
#define BSWAP(a) __asm__ __volatile__ ("mux1 %1 = %0, @rev" \ |
#define BSWAP(a) __asm__ __volatile__ ("mux1 %1 = %0, @rev" \ |
225 |
";;" \ |
";;" \ |
236 |
|
|
237 |
} |
} |
238 |
|
|
239 |
|
/* we are missing our ia64intrin.h file, but according to the |
240 |
|
Intel's ecc manual, this should be the right way ... |
241 |
|
this |
242 |
|
|
243 |
|
#elif defined(__INTEL_COMPILER) |
244 |
|
|
245 |
|
#include <ia64intrin.h> |
246 |
|
|
247 |
|
static __inline int64_t read_counter() { |
248 |
|
return __getReg(44); |
249 |
|
} |
250 |
|
|
251 |
|
#define BSWAP(a) ((unsigned int) (_m64_mux1(a, 0xb) >> 32)) |
252 |
|
*/ |
253 |
|
|
254 |
|
#else |
255 |
|
|
256 |
|
// needed for bitstream.h |
257 |
|
#define BSWAP(a) \ |
258 |
|
((a) = ( ((a)&0xff)<<24) | (((a)&0xff00)<<8) | (((a)>>8)&0xff00) | (((a)>>24)&0xff)) |
259 |
|
|
260 |
|
// rdtsc command most likely not supported, |
261 |
|
// so just dummy code here |
262 |
|
static __inline int64_t |
263 |
|
read_counter() |
264 |
|
{ |
265 |
|
return 0; |
266 |
|
} |
267 |
|
|
268 |
|
#endif // gcc or ecc |
269 |
|
|
270 |
#else |
#else |
271 |
#define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) |
#define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) |
272 |
#define EMMS() __asm__("emms\n\t") |
#define EMMS() __asm__("emms\n\t") |