Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 70575 Details for
Bug 109161
TSC fix for media-video/SDLcam on Pentium M CPUs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
TSC assembly fix for SDLcam 0.7.3
sdlcam-tsc-fix.patch (text/plain), 1.13 KB, created by
Tobias Klausmann (RETIRED)
on 2005-10-13 09:19:46 UTC
(
hide
)
Description:
TSC assembly fix for SDLcam 0.7.3
Filename:
MIME Type:
Creator:
Tobias Klausmann (RETIRED)
Created:
2005-10-13 09:19:46 UTC
Size:
1.13 KB
patch
obsolete
>--- misc.c.orig 2005-10-08 11:44:32.000000000 +0200 >+++ misc.c 2005-10-08 11:46:13.000000000 +0200 >@@ -25,6 +25,11 @@ > #include "dyn_misc.h" > #include "misc.h" > >+#define rdtsc(low,high) \ >+ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) >+ >+ >+ > char *xStrdup (const char *t) {{{ > char *ret; > ret = strdup (t); >@@ -42,18 +47,9 @@ > > void getTimeStampCounter ( TimeStampCounter *t ) {{{ > #ifdef TIMER >- unsigned int h=t->high; >- unsigned int l=t->low ; >- asm ( >- "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) >- ); >+ unsigned long h=t->high; >+ unsigned long l=t->low ; >+ rdtsc(l,h); > t->high = h; > t->low = l; > #else >--- misc.h.orig 2005-10-08 13:52:05.000000000 +0200 >+++ misc.h 2005-10-08 13:52:18.000000000 +0200 >@@ -24,7 +24,7 @@ > > char *xStrdup (const char *t); > >-typedef struct { unsigned int high, low; } TimeStampCounter; >+typedef struct { unsigned long high, low; } TimeStampCounter; > void getTimeStampCounter ( TimeStampCounter *t ); > void Start_Timer (unsigned int idx); > void Ende_Timer (unsigned int idx);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 109161
: 70575