raven-rhel6/gcc44/gcc44-rh1553817-2.patch
2024-02-21 20:14:44 +06:00

36 lines
1.6 KiB
Diff

diff -Nrup gcc/config/s390/s390.c gcc/config/s390/s390.c
--- gcc/config/s390/s390.c 2018-04-12 10:04:58.531128091 -0600
+++ gcc/config/s390/s390.c 2018-04-12 10:09:30.773164976 -0600
@@ -10880,7 +10880,7 @@ s390_output_indirect_thunk_function (uns
calls: Instead of caller->thunk the backtrace will be
caller->callee->thunk */
- if (flag_asynchronous_unwind_tables)
+ if (flag_asynchronous_unwind_tables && flag_dwarf2_cfi_asm)
{
fputs ("\t.cfi_signal_frame\n", asm_out_file);
fprintf (asm_out_file, "\t.cfi_return_column %d\n", regno);
diff -Nrup gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c
--- gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c 1969-12-31 17:00:00.000000000 -0700
+++ gcc/testsuite/gcc.target/s390/nobp-no-dwarf2-cfi.c 2018-04-12 10:09:11.139306554 -0600
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -march=z900 --save-temps -mfunction-return-reg=thunk -mindirect-branch-table -fno-dwarf2-cfi-asm" } */
+
+/* Make sure that we do not emit .cfi directives when -fno-dwarf2-cfi-asm is being used. */
+
+int
+main ()
+{
+ return 0;
+}
+
+/* 1 x main
+/* { dg-final { scan-assembler-times "jg\t__s390_indirect_jump" 1 } } */
+/* { dg-final { scan-assembler "ex\t" } } */
+
+/* { dg-final { scan-assembler-not "section\t.s390_indirect_jump" } } */
+/* { dg-final { scan-assembler-not "section\t.s390_indirect_call" } } */
+/* { dg-final { scan-assembler "section\t.s390_return_reg" } } */
+/* { dg-final { scan-assembler-not "section\t.s390_return_mem" } } */