summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390.c4
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.target/s390/dwarfregtable-1.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/dwarfregtable-2.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/dwarfregtable-3.c20
6 files changed, 77 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 357ea67b76e..aab022cb722 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2015-08-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+ * config/s390/s390.c (s390_dwarf_frame_reg_mode): Return Pmode for
+ all GPRs.
+
+2015-08-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
* config/s390/s390.c (s390_expand_tbegin): Expand either
tbegin_1_z13 or tbegin_1 depending on VX flag.
* config/s390/s390.md ("tbegin_1_z13"): New expander.
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 24a92908556..5814694adbc 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -6497,6 +6497,10 @@ s390_dwarf_frame_reg_mode (int regno)
{
machine_mode save_mode = default_dwarf_frame_reg_mode (regno);
+ /* Make sure not to return DImode for any GPR with -m31 -mzarch. */
+ if (GENERAL_REGNO_P (regno))
+ save_mode = Pmode;
+
/* The rightmost 64 bits of vector registers are call-clobbered. */
if (GET_MODE_SIZE (save_mode) > 8)
save_mode = DImode;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e087538b332..74bbd272d7f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-08-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+ * gcc.target/s390/dwarfregtable-1.c: New test.
+ * gcc.target/s390/dwarfregtable-2.c: New test.
+ * gcc.target/s390/dwarfregtable-3.c: New test.
+
+2015-08-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
* gcc.target/s390/htm-builtins-z13-1.c: New test.
2015-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
diff --git a/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c b/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c
new file mode 100644
index 00000000000..b1254987451
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c
@@ -0,0 +1,21 @@
+/* Make sure the dwarf reg size table doesn't change for 31 bit. */
+
+/* { dg-do compile { target { ! lp64 } } } */
+/* { dg-options "-mesa" } */
+
+#define DWARF_FRAME_REGISTERS 34
+
+static unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS + 1];
+static unsigned char ref_reg_size_table[DWARF_FRAME_REGISTERS + 1] =
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 0 };
+
+int
+main ()
+{
+ __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
+ if (__builtin_memcmp (ref_reg_size_table,
+ dwarf_reg_size_table, DWARF_FRAME_REGISTERS + 1) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/dwarfregtable-2.c b/gcc/testsuite/gcc.target/s390/dwarfregtable-2.c
new file mode 100644
index 00000000000..bc5a9f8e6d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/dwarfregtable-2.c
@@ -0,0 +1,21 @@
+/* Make sure the dwarf reg size table doesn't change for 31 bit zarch. */
+
+/* { dg-do compile { target { ! lp64 } } } */
+/* { dg-options "-mzarch" } */
+
+#define DWARF_FRAME_REGISTERS 34
+
+static unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS + 1];
+static unsigned char ref_reg_size_table[DWARF_FRAME_REGISTERS + 1] =
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 0 };
+
+int
+main ()
+{
+ __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
+ if (__builtin_memcmp (ref_reg_size_table,
+ dwarf_reg_size_table, DWARF_FRAME_REGISTERS + 1) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/dwarfregtable-3.c b/gcc/testsuite/gcc.target/s390/dwarfregtable-3.c
new file mode 100644
index 00000000000..55711bf71e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/dwarfregtable-3.c
@@ -0,0 +1,20 @@
+/* Make sure the dwarf reg size table doesn't change for 64 bit. */
+
+/* { dg-do compile { target { lp64 } } } */
+
+#define DWARF_FRAME_REGISTERS 34
+
+static unsigned char dwarf_reg_size_table[DWARF_FRAME_REGISTERS + 1];
+static unsigned char ref_reg_size_table[DWARF_FRAME_REGISTERS + 1] =
+ { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 0 };
+
+int
+main ()
+{
+ __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table);
+ if (__builtin_memcmp (ref_reg_size_table,
+ dwarf_reg_size_table, DWARF_FRAME_REGISTERS + 1) != 0)
+ __builtin_abort ();
+ return 0;
+}