pixman: Branch 'master' - 6 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 27 22:10:23 UTC 2019


 arm-simd-test.S    |   10 ++++++++++
 meson.build        |   51 +++++++++++++--------------------------------------
 neon-test.S        |   12 ++++++++++++
 pixman/meson.build |   20 ++++++++++----------
 4 files changed, 45 insertions(+), 48 deletions(-)

New commits:
commit 0ea37df4286e913b686ff0e85e686b6e6a494bda
Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Mar 25 16:28:06 2019 -0700

    meson: store ARM SIMD and NEON tests as text files
    
    This is unfortunately required to make the tests work correctly, as
    otherwise meson assumes that the files are C code not assembly. I've
    opened https://github.com/mesonbuild/meson/issues/5151, to discuss
    fixing the issue in meson upstream.
    
    Fixes #29

diff --git a/arm-simd-test.S b/arm-simd-test.S
new file mode 100644
index 0000000..910c814
--- /dev/null
+++ b/arm-simd-test.S
@@ -0,0 +1,10 @@
+.text
+.arch armv6
+.object_arch armv4
+.arm
+.altmacro
+#ifndef __ARM_EABI__
+#error EABI is required (to be sure that calling conventions are compatible)
+#endif
+pld [r0]
+uqadd8 r0, r0, r0
diff --git a/meson.build b/meson.build
index 6b247d8..7bfbd99 100644
--- a/meson.build
+++ b/meson.build
@@ -224,20 +224,7 @@ use_armv6_simd = get_option('arm-simd')
 have_armv6_simd = false
 if not use_armv6_simd.disabled()
   if host_machine.cpu_family() == 'arm'
-    if cc.compiles('''
-        .text
-        .arch armv6
-        .object_arch armv4
-        .arm
-        .altmacro
-        #ifndef __ARM_EABI__
-        #error EABI is required (to be sure that calling conventions are compatible)
-        #endif
-        pld [r0]
-        uqadd8 r0, r0, r0
-        ''',
-        args : ['-x assembler-with-cpp'],
-        name : 'ARMv6 SIMD Intrinsic Support')
+    if cc.compiles(files('arm-simd-test.S'), name : 'ARMv6 SIMD Intrinsic Support')
       have_armv6_simd = true
     endif
   endif
@@ -253,22 +240,7 @@ use_neon = get_option('neon')
 have_neon = false
 if not use_neon.disabled()
   if host_machine.cpu_family() == 'arm'
-    if cc.compiles('''
-        .text
-        .fpu neon
-        .arch armv7a
-        .object_arch armv4
-        .eabi_attribute 10, 0
-        .arm
-        .altmacro
-        #ifndef __ARM_EABI__
-        #error EABI is required (to be sure that calling conventions are compatible)
-        #endif
-        pld [r0]
-        vmovn.u16 d0, q0
-        ''',
-        args : ['-x assembler-with-cpp'],
-        name : 'NEON Intrinsic Support')
+    if cc.compiles(files('neon-test.S'), name : 'NEON Intrinsic Support')
       have_neon = true
     endif
   endif
diff --git a/neon-test.S b/neon-test.S
new file mode 100644
index 0000000..c30a399
--- /dev/null
+++ b/neon-test.S
@@ -0,0 +1,12 @@
+.text
+.fpu neon
+.arch armv7a
+.object_arch armv4
+.eabi_attribute 10, 0
+.arm
+.altmacro
+#ifndef __ARM_EABI__
+#error EABI is required (to be sure that calling conventions are compatible)
+#endif
+pld [r0]
+vmovn.u16 d0, q0
commit 2065a07e989b7f4041eb21a109c3cfedce3bfc39
Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Mar 25 16:10:11 2019 -0700

    meson: simplify and fix mmx library compilation
    
    This simplifies the logic and fixes the loongson-mmi implementation to
    build correctly.

diff --git a/pixman/meson.build b/pixman/meson.build
index 372ebde..6ce87e7 100644
--- a/pixman/meson.build
+++ b/pixman/meson.build
@@ -32,7 +32,16 @@ version_h = configure_file(
 
 pixman_simd_libs = []
 simds = [
+  # the mmx library can be compiled with mmx on x86/x86_64, iwmmxt on
+  # some arm cores, or loongson mmi on loongson mips systems. The
+  # libraries will all have the same name, "pixman-mmx", but there is
+  # no chance of more than one version being built in the same build
+  # because no system could have mmx, iwmmxt, and mmi, and it
+  # simplifies the build logic to give them the same name.
   ['mmx', have_mmx, mmx_flags, []],
+  ['mmx', have_loongson_mmi, loongson_mmi_flags, []],
+  ['mmx', have_iwmmxt, iwmmxt_flags, []],
+
   ['sse2', have_sse2, sse2_flags, []],
   ['ssse3', have_ssse3, ssse3_flags, []],
   ['vmx', have_vmx, vmx_flags, []],
@@ -42,7 +51,6 @@ simds = [
    ['pixman-arm-neon-asm.S', 'pixman-arm-neon-asm-bilinear.S']],
   ['mips-dspr2', have_mips_dspr2, mips_dspr2_flags,
    ['pixman-mips-dspr2-asm.S', 'pixman-mips-memcpy-asm.S']],
-  ['loongson-mmi', have_loongson_mmi, loongson_mmi_flags, []]
 ]
 
 foreach simd : simds
@@ -56,14 +64,6 @@ foreach simd : simds
   endif
 endforeach
 
-if have_iwmmxt
-  pixman_simd_libs += static_library(
-    'pixman-iwmmt',
-    'pixman-mmx.c',
-    c_args : iwmmxt_flags,
-  )
-endif
-
 pixman_files = files(
   'pixman.c',
   'pixman-access.c',
commit 6e206cf7fcb942db2b41ec8d292cc8d677b85d5a
Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Mar 25 16:05:33 2019 -0700

    meson: Add proper include paths for the loongson check

diff --git a/meson.build b/meson.build
index 49bbf2d..6b247d8 100644
--- a/meson.build
+++ b/meson.build
@@ -70,6 +70,7 @@ if not use_loongson_mmi.disabled()
         return 0;
       }''',
       args : loongson_mmi_flags,
+      include_directories : include_directories('.'),
       name : 'Loongson MMI Intrinsic Support')
     have_loongson_mmi = true
   endif
commit 9ed0576a73b2f98003c56e2cb8513f828c1d59e2
Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Mar 25 15:39:18 2019 -0700

    meson: fix copy-n-paste error for arm simd assembly
    
    mentioned in #29

diff --git a/pixman/meson.build b/pixman/meson.build
index 3dabec9..372ebde 100644
--- a/pixman/meson.build
+++ b/pixman/meson.build
@@ -39,7 +39,7 @@ simds = [
   ['arm-simd', have_armv6_simd, [],
    ['pixman-arm-simd-asm.S', 'pixman-arm-simd-asm-scaled.S']],
   ['arm-neon', have_neon, [],
-   ['pixman-arm-neon-asm.S', 'pixman-arm-neon-asm-scaled.S']],
+   ['pixman-arm-neon-asm.S', 'pixman-arm-neon-asm-bilinear.S']],
   ['mips-dspr2', have_mips_dspr2, mips_dspr2_flags,
    ['pixman-mips-dspr2-asm.S', 'pixman-mips-memcpy-asm.S']],
   ['loongson-mmi', have_loongson_mmi, loongson_mmi_flags, []]
commit d13f6a8b1d40c73c206d95f57e0a8339a346dd5f
Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Mar 25 15:24:12 2019 -0700

    meson: fix typo which breaks loongson checks
    
    mach -> march

diff --git a/meson.build b/meson.build
index 2c6b57f..49bbf2d 100644
--- a/meson.build
+++ b/meson.build
@@ -50,7 +50,7 @@ endforeach
 
 use_loongson_mmi = get_option('loongson-mmi')
 have_loongson_mmi = false
-loongson_mmi_flags = ['-mach=loongson2f']
+loongson_mmi_flags = ['-march=loongson2f']
 if not use_loongson_mmi.disabled()
   if host_machine.cpu_family() == 'mips64' and cc.compiles('''
       #ifndef __mips_loongson_vector_rev
commit e7ac62c3c70d6983c8d59c2289fd9ea9b6719916
Author: Dylan Baker <dylan at pnwbakers.com>
Date:   Mon Mar 25 15:22:13 2019 -0700

    meson: work around meson issue #5115
    
    This issue causes openmp arguments to be injected into compilers that
    can support openmp, even if they don't. This issue will be fixed in
    0.51 (code already landed in mesonbuild#5116), for older versions lets
    work around the issue.

diff --git a/meson.build b/meson.build
index fe77893..2c6b57f 100644
--- a/meson.build
+++ b/meson.build
@@ -376,13 +376,15 @@ if get_option('gnuplot')
   config.set('PIXMAN_GNUPLOT', 1)
 endif
 
-use_openmp = get_option('openmp')
-dep_openmp = null_dep
-if not use_openmp.disabled()
-  dep_openmp = dependency('openmp', required : get_option('openmp'))
-  if dep_openmp.found()
-    config.set10('USE_OPENMP', true)
-  endif
+dep_openmp = dependency('openmp', required : get_option('openmp'))
+if dep_openmp.found()
+  config.set10('USE_OPENMP', true)
+elif meson.version().version_compare('<0.51.0')
+# In versions of meson before 0.51 the openmp dependency can still
+# inject arguments in the the auto case when it is not found, the
+# detection does work correctly in that case however, so we just
+# replace dep_openmp with null_dep to work around this.
+  dep_openmp = null_dep
 endif
 
 dep_gtk = dependency('gtk+-2.0', version : '>= 2.16', required : get_option('gtk'))


More information about the xorg-commit mailing list