View | Details | Raw Unified
Collapse All | Expand All

(-) misc.h.orig (-13 / +9 lines)
 Lines 25-30    Link Here 
#include "dyn_misc.h"
#include "dyn_misc.h"
#include "misc.h"
#include "misc.h"
#define rdtsc(low,high) \
     __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
char *xStrdup (const char *t) {{{
char *xStrdup (const char *t) {{{
  char *ret;
  char *ret;
  ret = strdup (t);
  ret = strdup (t);
 Lines 42-59    Link Here 
void getTimeStampCounter ( TimeStampCounter *t ) {{{
void getTimeStampCounter ( TimeStampCounter *t ) {{{
#ifdef TIMER	
#ifdef TIMER	
	unsigned int h=t->high;
	unsigned long h=t->high;
	unsigned int l=t->low ;
	unsigned long l=t->low ;
	asm (	
	rdtsc(l,h);
		"push %%eax	\n"
		"push %%edx	\n"
		"rdtsc		\n"
		"movl %%eax,%1	\n"
		"movl %%edx,%0	\n"
		"pop  %%edx	\n"
		"pop  %%edx	\n"
		: "=m" (h) , "=m" (l)
	    );
	t->high = h;
	t->high = h;
	t->low  = l;
	t->low  = l;
#else	
#else	
 Lines 24-30    Link Here 
char *xStrdup (const char *t);
char *xStrdup (const char *t);
typedef struct { unsigned int high, low; } TimeStampCounter;
typedef struct { unsigned long high, low; } TimeStampCounter;
void getTimeStampCounter ( TimeStampCounter *t );
void getTimeStampCounter ( TimeStampCounter *t );
void Start_Timer (unsigned int idx);
void Start_Timer (unsigned int idx);
void Ende_Timer  (unsigned int idx);
void Ende_Timer  (unsigned int idx);