This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/tvtime.git tree:

Subject: cpuinfo: Fix asm code in cpuid() clobering the upper 32 bits of rbx
Author:  Hans de Goede <[email protected]>
Date:    Wed Mar 9 17:47:47 2016 +0100

This fixes a crash when running "tvtime -v" when build with certain cflags.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1315619
Signed-off-by: Hans de Goede <[email protected]>

 src/cpuinfo.c | 8 ++++++++
 1 file changed, 8 insertions(+)

---

http://git.linuxtv.org/cgit.cgi/tvtime.git/commit/?id=685966c5013efe41d1c9d066ef736c3f5b574fa6
diff --git a/src/cpuinfo.c b/src/cpuinfo.c
index 437e72a9eef4..0f6c5973434c 100644
--- a/src/cpuinfo.c
+++ b/src/cpuinfo.c
@@ -81,11 +81,19 @@ static cpuid_regs_t cpuid( int func ) {
             : "g" (func)
             : "%eax", "%ebx", "%ecx", "%edx");
 #else
+#ifndef __x86_64__
     asm("movl %%ebx, %%esi; movl %4,%%eax; " CPUID
         "movl %%eax,%0; movl %%ebx,%1; movl %%ecx,%2; movl %%edx,%3; movl 
%%esi, %%ebx"
             : "=m" (regs.eax), "=m" (regs.ebx), "=m" (regs.ecx), "=m" 
(regs.edx)
             : "g" (func)
             : "%eax", "%ecx", "%edx", "%esi");
+#else
+    asm("movq %%rbx, %%rsi; movl %4,%%eax; " CPUID
+        "movl %%eax,%0; movl %%ebx,%1; movl %%ecx,%2; movl %%edx,%3; movq 
%%rsi, %%rbx"
+            : "=m" (regs.eax), "=m" (regs.ebx), "=m" (regs.ecx), "=m" 
(regs.edx)
+            : "g" (func)
+            : "%eax", "%ecx", "%edx", "%esi");
+#endif
 #endif
     return regs;
 }

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to