[mupen64plus-video-glide64] 64/172: Use more portable _mm_store_ps instead of GCC specific __builtin_ia32_shufps

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:11:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch master
in repository mupen64plus-video-glide64.

commit 2731cb9ce9dcdc521632f94b28b8ff8b6cb4d67d
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sun Jul 24 10:34:39 2011 +0200

    Use more portable _mm_store_ps instead of GCC specific __builtin_ia32_shufps
---
 debian/changelog                          |  2 ++
 debian/patches/portable_mm_store_ps.patch | 45 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 48 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e08d58b..244dcdd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ mupen64plus-video-glide64 (1.99.4-3) UNRELEASED; urgency=low
     - Add rewrite_makefile.patch, Rewrite Makefile to fix flags and linking
     - Add default_settings.patch, Load default settings in the PluginStartup
       function so they are available before a game runs
+    - Add portable_mm_store_ps.patch, Use more portable _mm_store_ps instead of
+      GCC specific __builtin_ia32_shufps
   * Depend on pkg-config in debian/control for new Makefile
 
  -- Sven Eckelmann <sven at narfation.org>  Sat, 23 Jul 2011 16:42:57 +0200
diff --git a/debian/patches/portable_mm_store_ps.patch b/debian/patches/portable_mm_store_ps.patch
new file mode 100644
index 0000000..28b5c45
--- /dev/null
+++ b/debian/patches/portable_mm_store_ps.patch
@@ -0,0 +1,45 @@
+Description: Use more portable _mm_store_ps instead of GCC specific function
+Origin: upstream, https://bitbucket.org/wahrhaft/mupen64plus-video-glide64/changeset/2bc96306ec92
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/3dmath.cpp b/src/3dmath.cpp
+index 0d1768b199d0f5ae1fca502359e5efcfb7f3cbff..2c01e9ea5bc1f94d0361fb9a18c077cf8fb0c71a 100755
+--- a/src/3dmath.cpp
++++ b/src/3dmath.cpp
+@@ -40,6 +40,7 @@
+ #include "m64p_config.h"
+ #include "m64p_vidext.h"
+ #include "3dmath.h"
++#include <xmmintrin.h>
+ 
+ void calc_light (VERTEX *v)
+ {
+@@ -193,23 +194,23 @@ void __stdcall MulMatricesSSE(float m1[4][4],float m2[4][4],float r[4][4])
+     
+     // Fill tmp with four copies of leftrow[0]
+     v4sf tmp = leftrow;
+-    tmp = __builtin_ia32_shufps (tmp, tmp, 0);
++    tmp = _mm_shuffle_ps (tmp, tmp, 0);
+     // Calculate the four first summands
+     v4sf destrow = tmp * row0;
+     
+     // Fill tmp with four copies of leftrow[1]
+     tmp = leftrow;
+-    tmp = __builtin_ia32_shufps (tmp, tmp, 1 + (1 << 2) + (1 << 4) + (1 << 6));
++    tmp = _mm_shuffle_ps (tmp, tmp, 1 + (1 << 2) + (1 << 4) + (1 << 6));
+     destrow += tmp * row1;
+     
+     // Fill tmp with four copies of leftrow[2]
+     tmp = leftrow;
+-    tmp = __builtin_ia32_shufps (tmp, tmp, 2 + (2 << 2) + (2 << 4) + (2 << 6));
++    tmp = _mm_shuffle_ps (tmp, tmp, 2 + (2 << 2) + (2 << 4) + (2 << 6));
+     destrow += tmp * row2;
+     
+     // Fill tmp with four copies of leftrow[3]
+     tmp = leftrow;
+-    tmp = __builtin_ia32_shufps (tmp, tmp, 3 + (3 << 2) + (3 << 4) + (3 << 6));
++    tmp = _mm_shuffle_ps (tmp, tmp, 3 + (3 << 2) + (3 << 4) + (3 << 6));
+     destrow += tmp * row3;
+     
+     __builtin_ia32_storeups(r[i], destrow);
diff --git a/debian/patches/series b/debian/patches/series
index 469b155..34d1f18 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 rewrite_makefile.patch
 printf_fixup.patch
 default_settings.patch
+portable_mm_store_ps.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-glide64.git



More information about the Pkg-games-commits mailing list