Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 109161
Collapse All | Expand All

(-)misc.c.orig (-12 / +8 lines)
Lines 25-30 Link Here
25
#include "dyn_misc.h"
25
#include "dyn_misc.h"
26
#include "misc.h"
26
#include "misc.h"
27
27
28
#define rdtsc(low,high) \
29
     __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
30
31
32
28
char *xStrdup (const char *t) {{{
33
char *xStrdup (const char *t) {{{
29
  char *ret;
34
  char *ret;
30
  ret = strdup (t);
35
  ret = strdup (t);
Lines 42-59 Link Here
42
47
43
void getTimeStampCounter ( TimeStampCounter *t ) {{{
48
void getTimeStampCounter ( TimeStampCounter *t ) {{{
44
#ifdef TIMER	
49
#ifdef TIMER	
45
	unsigned int h=t->high;
50
	unsigned long h=t->high;
46
	unsigned int l=t->low ;
51
	unsigned long l=t->low ;
47
	asm (	
52
	rdtsc(l,h);
48
		"push %%eax	\n"
49
		"push %%edx	\n"
50
		"rdtsc		\n"
51
		"movl %%eax,%1	\n"
52
		"movl %%edx,%0	\n"
53
		"pop  %%edx	\n"
54
		"pop  %%edx	\n"
55
		: "=m" (h) , "=m" (l)
56
	    );
57
	t->high = h;
53
	t->high = h;
58
	t->low  = l;
54
	t->low  = l;
59
#else	
55
#else	
(-)misc.h.orig (-1 / +1 lines)
Lines 24-30 Link Here
24
24
25
char *xStrdup (const char *t);
25
char *xStrdup (const char *t);
26
26
27
typedef struct { unsigned int high, low; } TimeStampCounter;
27
typedef struct { unsigned long high, low; } TimeStampCounter;
28
void getTimeStampCounter ( TimeStampCounter *t );
28
void getTimeStampCounter ( TimeStampCounter *t );
29
void Start_Timer (unsigned int idx);
29
void Start_Timer (unsigned int idx);
30
void Ende_Timer  (unsigned int idx);
30
void Ende_Timer  (unsigned int idx);

Return to bug 109161