aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorDominik Vogt <vogt@linux.vnet.ibm.com>2015-11-20 07:36:07 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2015-11-20 07:36:07 +0000
commitaf344a30f80436c7ad88034221f55070b9ae1325 (patch)
tree15eae77bb1d9aa92aedf7f1b6c942a3a9f95b69f /gcc/testsuite
parentcf0347ae4c15e3435225e3285bfcb6ed3bf044b1 (diff)
downloadgcc-af344a30f80436c7ad88034221f55070b9ae1325.zip
gcc-af344a30f80436c7ad88034221f55070b9ae1325.tar.gz
gcc-af344a30f80436c7ad88034221f55070b9ae1325.tar.bz2
S/390: Clobber r1 in patterns resulting in pfpo instruction.
gcc/ChangeLog * config/s390/s390.md (GPR1_REGNUM): New constant. ("*trunc<BFP:mode><DFP_ALL:mode>2") ("*trunc<DFP_ALL:mode><BFP:mode>2") ("trunc<BFP:mode><DFP_ALL:mode>2") ("trunc<DFP_ALL:mode><BFP:mode>2") ("*extend<BFP:mode><DFP_ALL:mode>2") ("*extend<DFP_ALL:mode><BFP:mode>2") ("extend<BFP:mode><DFP_ALL:mode>2") ("extend<DFP_ALL:mode><BFP:mode>2"): Clobber r1. gcc/testsuite/ChangeLog * gcc.target/s390/pfpo.c: New test. From-SVN: r230642
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/s390/pfpo.c21
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c8a7238..247aa3a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-11-20 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * gcc.target/s390/pfpo.c: New test.
+
2015-11-20 Kirill Yukhin <kirill.yukhin@intel.com>
* c-c++-common/attr-simd-3.c: Put xfail (PR68158) on dg-error.
diff --git a/gcc/testsuite/gcc.target/s390/pfpo.c b/gcc/testsuite/gcc.target/s390/pfpo.c
new file mode 100644
index 0000000..32725c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pfpo.c
@@ -0,0 +1,21 @@
+/* The pfpo instruction generated by this code clobbers the r1 register while
+ it was still in use. */
+
+/* { dg-do run } */
+/* { dg-options "-O0 -march=z10 -mzarch" } */
+
+int foo(int x)
+{
+ return x;
+}
+
+int bar(int i, float f)
+{
+ return i;
+}
+
+int main()
+{
+ _Decimal32 d = 7;
+ return bar(foo(0x10203040), (float)d) == 0x10203040 ? 0 : 1;
+}