S/390: Fix missing .size directives.
authorMarcin Kościelnicki <koriakin@0x04.net>
Thu, 21 Jan 2016 09:55:38 +0000 (09:55 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Thu, 21 Jan 2016 09:55:38 +0000 (09:55 +0000)
It seems at some point the .size hook was hijacked to emit some
machine-specific directives, and the actual .size directive was
forgotten.  This caused problems for split-stack support, since
linker couldn't scan the function body for non-split-stack calls.

gcc/ChangeLog:

* config/s390/s390.c (s390_asm_declare_function_size): Add code
to actually emit the .size directive.

From-SVN: r232669

gcc/ChangeLog
gcc/config/s390/s390.c

index a17a403b91ab5493d61a28a990d6206439584e4e..0237f576e92f0290a20bde3822228403ddb1392a 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-21  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * config/s390/s390.c (s390_asm_declare_function_size): Add code
+       to actually emit the .size directive.
+
 2016-01-21   Stefan Sørensen  <stefan.sorensen@spectralink.com>
             Jakub Jelinek  <jakub@redhat.com>
 
index 21a568767b7d826772680102859fda56a1bd0890..3be64de3570e15bd3b7ece74693bf060794d8a24 100644 (file)
@@ -6834,8 +6834,10 @@ s390_asm_output_function_prefix (FILE *asm_out_file,
 
 void
 s390_asm_declare_function_size (FILE *asm_out_file,
-                               const char *fnname ATTRIBUTE_UNUSED, tree decl)
+                               const char *fnname, tree decl)
 {
+  if (!flag_inhibit_size_directive)
+    ASM_OUTPUT_MEASURED_SIZE (asm_out_file, fnname);
   if (DECL_FUNCTION_SPECIFIC_TARGET (decl) == NULL)
     return;
   fprintf (asm_out_file, "\t.machine pop\n");