pixman: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 7 20:36:38 UTC 2021


 pixman/pixman-ppc.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

New commits:
commit 4251202d9dbb7503976fa6c651747b8e99ea0988
Author: pkubaj <pkubaj at anongoth.pl>
Date:   Sun Aug 30 16:01:21 2020 +0000

    Fix AltiVec detection on FreeBSD.

diff --git a/pixman/pixman-ppc.c b/pixman/pixman-ppc.c
index a6e7bb0..4d5506d 100644
--- a/pixman/pixman-ppc.c
+++ b/pixman/pixman-ppc.c
@@ -68,6 +68,24 @@ pixman_have_vmx (void)
     return have_vmx;
 }
 
+#elif defined (__FreeBSD__)
+#include <machine/cpu.h>
+#include <sys/auxv.h>
+
+static pixman_bool_t
+pixman_have_vmx (void)
+{
+
+    unsigned long cpufeatures;
+    int have_vmx;
+
+    if (elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures)))
+    return FALSE;
+
+    have_vmx = cpufeatures & PPC_FEATURE_HAS_ALTIVEC;
+    return have_vmx;
+}
+
 #elif defined (__linux__)
 
 #include <sys/types.h>


More information about the xorg-commit mailing list