diff mbox

PATCH RFA: Call default_file_start from s390_asm_file_start

Message ID 20160823195834.GA1182@linux.vnet.ibm.com
State New
Headers show

Commit Message

Dominik Vogt Aug. 23, 2016, 7:58 p.m. UTC
On Tue, Aug 23, 2016 at 11:57:01AM -0700, Ian Lance Taylor wrote:
> The root cause of https://golang.org/issue/16780 is that GCC on s390
> GNU/Linux does not emit a .file directive.  This is because the
> function s390_asm_file_start does not call default_file_start, unlike
> most other TARGET_ASM_FILE_START hooks.  This patch should fix the
> problem.  Since I don't have an s390 handy, it would be great if
> somebody could test this for me.  Thanks.

I've run a regression test "light" with the patch, i.e. only s390x
and Gcc only built with the C language, and it works fine except
that one test case fails that because a "scan-assembler-not" now
matches the ".file" line at the beginning of the file.  See
attached patch with that change added.

Additional ChangeLog for the test:

gcc/testsuite/ChangeLog

        * gcc.target/s390/nolrl-1.c: Don't match the filename.

Ciao

Dominik ^_^  ^_^

Comments

Ian Lance Taylor Aug. 23, 2016, 8:43 p.m. UTC | #1
On Tue, Aug 23, 2016 at 12:58 PM, Dominik Vogt <vogt@linux.vnet.ibm.com> wrote:
> On Tue, Aug 23, 2016 at 11:57:01AM -0700, Ian Lance Taylor wrote:
>> The root cause of https://golang.org/issue/16780 is that GCC on s390
>> GNU/Linux does not emit a .file directive.  This is because the
>> function s390_asm_file_start does not call default_file_start, unlike
>> most other TARGET_ASM_FILE_START hooks.  This patch should fix the
>> problem.  Since I don't have an s390 handy, it would be great if
>> somebody could test this for me.  Thanks.
>
> I've run a regression test "light" with the patch, i.e. only s390x
> and Gcc only built with the C language, and it works fine except
> that one test case fails that because a "scan-assembler-not" now
> matches the ".file" line at the beginning of the file.  See
> attached patch with that change added.
>
> Additional ChangeLog for the test:
>
> gcc/testsuite/ChangeLog
>
>         * gcc.target/s390/nolrl-1.c: Don't match the filename.

Thanks.  Committed to mainline.

Ian
diff mbox

Patch

diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 1abb30b..0a457fc 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -14972,6 +14972,7 @@  s390_vector_alignment (const_tree type)
 static void
 s390_asm_file_start (void)
 {
+  default_file_start ();
   s390_asm_output_machine_for_arch (asm_out_file);
 }
 #endif
diff --git a/gcc/testsuite/gcc.target/s390/nolrl-1.c b/gcc/testsuite/gcc.target/s390/nolrl-1.c
index e0d1213..c162958 100644
--- a/gcc/testsuite/gcc.target/s390/nolrl-1.c
+++ b/gcc/testsuite/gcc.target/s390/nolrl-1.c
@@ -16,4 +16,4 @@  bar ()
     foo (z);
 }
 
-/* { dg-final { scan-assembler-not "lrl" } } */
+/* { dg-final { scan-assembler-not "\tlrl" } } */