summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2017-05-31 11:32:31 +0200
committerPacho Ramos <pacho@gentoo.org>2017-05-31 11:32:31 +0200
commite41771703356e344dd98066f85834e345bcd675f (patch)
tree773dfa6161d1c7e72d234a4c812e6a5d2d8b9140 /app-benchmarks/i7z/files/fix_cpuid_asm.patch
parentapp-benchmarks/i7z: Take package as agreed with chewi (diff)
downloadgentoo-e41771703356e344dd98066f85834e345bcd675f.tar.gz
gentoo-e41771703356e344dd98066f85834e345bcd675f.tar.bz2
gentoo-e41771703356e344dd98066f85834e345bcd675f.zip
app-benchmarks/i7z: Apply Debian patches fixing multiple bugs, drop deprecated qt4 support (https://wiki.gentoo.org/wiki/Project:Qt/Policies#Handling_different_versions_of_Qt), allow -Ox for now as it looks to work ok for me with this version.
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'app-benchmarks/i7z/files/fix_cpuid_asm.patch')
-rw-r--r--app-benchmarks/i7z/files/fix_cpuid_asm.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/app-benchmarks/i7z/files/fix_cpuid_asm.patch b/app-benchmarks/i7z/files/fix_cpuid_asm.patch
new file mode 100644
index 000000000000..27739a64523e
--- /dev/null
+++ b/app-benchmarks/i7z/files/fix_cpuid_asm.patch
@@ -0,0 +1,21 @@
+Author: Andreas Beckmann <anbe@debian.org>
+Description: fix cpuid inline assembly
+ the old code zeroed the upper half of %rbx
+
+--- a/helper_functions.c
++++ b/helper_functions.c
+@@ -101,13 +101,7 @@ static inline void cpuid (unsigned int i
+ unsigned int *ecx, unsigned int *edx)
+ {
+ unsigned int _eax = info, _ebx, _ecx, _edx;
+- asm volatile ("mov %%ebx, %%edi;" // save ebx (for PIC)
+- "cpuid;"
+- "mov %%ebx, %%esi;" // pass to caller
+- "mov %%edi, %%ebx;" // restore ebx
+- :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx)
+- : /* inputs: eax is handled above */
+- :"edi" /* clobbers: we hit edi directly */);
++ asm volatile ("cpuid\n\t" : "+a" (_eax), "=b" (_ebx), "=c" (_ecx), "=d" (_edx) : : );
+ if (eax) *eax = _eax;
+ if (ebx) *ebx = _ebx;
+ if (ecx) *ecx = _ecx;