[gcc-6] 253/401: * Fix PR target/77822 (s390x), proposed patch.
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:49:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.
commit 45384fe30ca8179b6ea870ae5e7aa0b90ae940d7
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Tue Nov 8 18:36:24 2016 +0000
* Fix PR target/77822 (s390x), proposed patch.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@9031 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/changelog | 1 +
debian/patches/pr77822-s390x.diff | 54 +++++++++++++++++++++++++++++++++++++++
debian/rules.patch | 1 +
3 files changed, 56 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index c88c4bf..9377fa4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ gcc-6 (6.2.0-12) UNRELEASED; urgency=medium
PR tree-optimization/77768, PR c++/78039 (closes: #841316).
* Fix using the gcc-6-source package (Stephen Kitt). Closes: #843476.
* Fix PR target/77822 (AArch64), taken from the trunk. Closes: #839249.
+ * Fix PR target/77822 (s390x), proposed patch.
* Update libiberty to the trunk 20161108. Addresses security issues:
CVE-2016-6131, CVE-2016-4493, CVE-2016-4492, CVE-2016-4490,
CVE-2016-4489, CVE-2016-4488, CVE-2016-4487, CVE-2016-2226.
diff --git a/debian/patches/pr77822-s390x.diff b/debian/patches/pr77822-s390x.diff
new file mode 100644
index 0000000..fec986a
--- /dev/null
+++ b/debian/patches/pr77822-s390x.diff
@@ -0,0 +1,54 @@
+# DP: S390: Fix PR/77822.
+
+From: Dominik Vogt <vogt at linux.vnet.ibm.com>
+Date: Tue, 8 Nov 2016 09:54:03 +0100
+Subject: [PATCH] S390: Fix PR/77822.
+
+Check the range of the arguments in extzv patterns. This avoids generating
+risbg instructions with an out of range shift count.
+---
+
+gcc/
+
+ * config/s390/s390.md ("extzv", "*extzv<mode>_zEC12")
+ ("*extzv<mode>_z10"): Check validity of zero_extend arguments.
+
+gcc/testsuite/
+
+ * gcc.target/s390/pr77822.c: New test for PR/77822.
+
+--- a/src/gcc/config/s390/s390.md
++++ b/src/gcc/config/s390/s390.md
+@@ -3708,6 +3708,10 @@
+ (clobber (reg:CC CC_REGNUM))])]
+ "TARGET_Z10"
+ {
++ if (!IN_RANGE (INTVAL (operands[3]), 0, GET_MODE_BITSIZE (DImode) - 1)
++ || !IN_RANGE (INTVAL (operands[3]) + INTVAL (operands[2]), 1,
++ GET_MODE_BITSIZE (DImode)))
++ FAIL;
+ /* Starting with zEC12 there is risbgn not clobbering CC. */
+ if (TARGET_ZEC12)
+ {
+@@ -3726,7 +3730,9 @@
+ (match_operand:GPR 1 "register_operand" "d")
+ (match_operand 2 "const_int_operand" "") ; size
+ (match_operand 3 "const_int_operand" "")))] ; start]
+- "TARGET_ZEC12"
++ "TARGET_ZEC12
++ && IN_RANGE (INTVAL (operands[3]), 0, GET_MODE_BITSIZE (DImode) - 1)
++ && IN_RANGE (INTVAL (operands[3]) + INTVAL (operands[2]), 1, GET_MODE_BITSIZE (DImode))"
+ "risbgn\t%0,%1,64-%2,128+63,<bitsize>+%3+%2" ; dst, src, start, end, shift
+ [(set_attr "op_type" "RIE")])
+
+@@ -3737,7 +3743,9 @@
+ (match_operand 2 "const_int_operand" "") ; size
+ (match_operand 3 "const_int_operand" ""))) ; start
+ (clobber (reg:CC CC_REGNUM))]
+- "TARGET_Z10"
++ "TARGET_Z10
++ && IN_RANGE (INTVAL (operands[3]), 0, GET_MODE_BITSIZE (DImode) - 1)
++ && IN_RANGE (INTVAL (operands[3]) + INTVAL (operands[2]), 1, GET_MODE_BITSIZE (DImode))"
+ "risbg\t%0,%1,64-%2,128+63,<bitsize>+%3+%2" ; dst, src, start, end, shift
+ [(set_attr "op_type" "RIE")
+ (set_attr "z10prop" "z10_super_E1")])
diff --git a/debian/rules.patch b/debian/rules.patch
index b5d7ad6..6a4f9c3 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -102,6 +102,7 @@ debian_patches += \
libgo-rawClone-no-pt_regs \
libgo-elf-relocations-sparc64 \
pr77822 \
+ pr77822-s390x \
# this is still needed on powerpc, e.g. firefox and insighttoolkit4 will ftbfs.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git
More information about the Reproducible-commits
mailing list