[mame] 05/05: Fix an infinite loop in the fallback C code.
Jordi Mallach
jordi at moszumanska.debian.org
Thu Mar 22 10:51:43 UTC 2018
This is an automated email from the git hooks/post-receive script.
jordi pushed a commit to branch master
in repository mame.
commit 2ff3ab0d5be693af4125caaa18f9c44f900f977e
Author: Jordi Mallach <jordi at debian.org>
Date: Thu Mar 22 11:47:33 2018 +0100
Fix an infinite loop in the fallback C code.
Validation tests were failing for mips*, arm*, s390x, and other arches
with no native ASM.
Cherrypick Vas' patch to fix this.
See https://github.com/mamedev/mame/issues/3371 for more info.
---
debian/changelog | 3 +++
debian/patches/fix_c_fallback.patch | 21 +++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 25 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 292c194..5b4d4d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ mame (0.195+dfsg.1-2) UNRELEASED; urgency=medium
* Set PYTHON_EXECUTABLE=python3 and Build-Depend on python3-dev.
* Add B-D-I on python3-distutils so Sphynx works as expected.
* Move links and doc-base paths to new default location of docs.
+ * Add patch to fix an infinite loop in the fallback C code for
+ mips*, arm*, s390x, and other arches with no native ASM. This
+ fixes the validation tests for the check build rule.
-- Jordi Mallach <jordi at debian.org> Thu, 22 Mar 2018 11:39:45 +0100
diff --git a/debian/patches/fix_c_fallback.patch b/debian/patches/fix_c_fallback.patch
new file mode 100644
index 0000000..36a3948
--- /dev/null
+++ b/debian/patches/fix_c_fallback.patch
@@ -0,0 +1,21 @@
+Index: mame-0.195+dfsg.1/src/osd/eminline.h
+===================================================================
+--- mame-0.195+dfsg.1.orig/src/osd/eminline.h
++++ mame-0.195+dfsg.1/src/osd/eminline.h
+@@ -273,6 +273,7 @@ inline float recip_approx(float value)
+ #ifndef count_leading_zeros
+ inline uint8_t count_leading_zeros(uint32_t val)
+ {
++ if (!val) return 32U;
+ uint8_t count;
+ for (count = 0; int32_t(val) >= 0; count++) val <<= 1;
+ return count;
+@@ -289,7 +290,7 @@ inline uint8_t count_leading_zeros(uint3
+ inline uint8_t count_leading_ones(uint32_t val)
+ {
+ uint8_t count;
+- for (count = 0; (int32_t)val < 0; count++) val <<= 1;
++ for (count = 0; int32_t(val) < 0; count++) val <<= 1;
+ return count;
+ }
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
index aefffe1..cd0545f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ hurd.patch
sphinx_mathjax_location.patch
m68000_archopts.patch
kfreebsd_dirent.h_path.patch
+fix_c_fallback.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mame.git
More information about the Pkg-games-commits
mailing list