summaryrefslogtreecommitdiff
path: root/graphics/mesa/patches/patch-src_util_u_cpu_detect_c
blob: 246013fd1b2c8d5876aa04bd2e71c8f99f180903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

Index: src/util/u_cpu_detect.c
--- src/util/u_cpu_detect.c.orig
+++ src/util/u_cpu_detect.c
@@ -133,7 +133,7 @@ check_os_altivec_support(void)
    int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
 #endif
    int has_vu = 0;
-   int len = sizeof (has_vu);
+   size_t len = sizeof (has_vu);
    int err;
 
    err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
@@ -212,10 +212,13 @@ check_os_altivec_support(void)
 
          util_cpu_caps.has_altivec = 1;
 
+/* no support for POWER7 VSX instructions in binutils 2.17 */
+#ifndef __OpenBSD__
          if (enable_vsx) {
             __asm __volatile("xxland %vs0, %vs0, %vs0");
             util_cpu_caps.has_vsx = 1;
          }
+#endif
          signal(SIGILL, SIG_DFL);
       } else {
          util_cpu_caps.has_altivec = 0;