Re: [PATCH 1/5] s390: Use proper read-only data section for literals.

2016-01-21 Thread Mike Stump
On Jan 20, 2016, at 10:56 PM, Marcin Kościelnicki  wrote:
>> This is ok if bootstrap and regression tests are clean. Thanks!

> The bootstrap and regression tests are indeed clean for this patch and #2.  I 
> don't have commit access to gcc repo, how do I get this pushed?

Just ask someone to apply it for you.

Re: [PATCH 1/5] s390: Use proper read-only data section for literals.

2016-01-21 Thread Andreas Krebbel
On 01/21/2016 07:56 AM, Marcin Kościelnicki wrote:
>>> +2016-01-02  Marcin Kościelnicki  
>>> +
>>> +   * config/s390/s390.md (pool_section_start): Use switch_to_section
>>> +   to select proper read-only data section instead of hardcoding .rodata.
>>> +   (pool_section_end): Use switch_to_section to match the above.
>>> +
>>
>> This is ok if bootstrap and regression tests are clean. Thanks!
>>
>> -Andreas-
>>
>>
> 
> The bootstrap and regression tests are indeed clean for this patch and 
> #2.  I don't have commit access to gcc repo, how do I get this pushed?

Committed to mainline. Thanks!

-Andreas-




Re: [PATCH 1/5] s390: Use proper read-only data section for literals.

2016-01-20 Thread Marcin Kościelnicki

On 20/01/16 14:11, Andreas Krebbel wrote:

On 01/02/2016 08:16 PM, Marcin Kościelnicki wrote:

Previously, .rodata was hardcoded.  For C++ vague linkage functions,
this resulted in needlessly duplicated literals.  With the new split
stack support, this resulted in link errors, due to .rodata containing
relocations to the discarded text sections.

gcc/ChangeLog:

* config/s390/s390.md (pool_section_start): Use switch_to_section
to select proper read-only data section instead of hardcoding .rodata.
(pool_section_end): Use switch_to_section to match the above.
---
  gcc/ChangeLog   |  6 ++
  gcc/config/s390/s390.md | 11 +--
  2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 23ce209..2c572a7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-02  Marcin Kościelnicki  
+
+   * config/s390/s390.md (pool_section_start): Use switch_to_section
+   to select proper read-only data section instead of hardcoding .rodata.
+   (pool_section_end): Use switch_to_section to match the above.
+


This is ok if bootstrap and regression tests are clean. Thanks!

-Andreas-




The bootstrap and regression tests are indeed clean for this patch and 
#2.  I don't have commit access to gcc repo, how do I get this pushed?


Marcin Kościelnicki


Re: [PATCH 1/5] s390: Use proper read-only data section for literals.

2016-01-20 Thread Andreas Krebbel
On 01/02/2016 08:16 PM, Marcin Kościelnicki wrote:
> Previously, .rodata was hardcoded.  For C++ vague linkage functions,
> this resulted in needlessly duplicated literals.  With the new split
> stack support, this resulted in link errors, due to .rodata containing
> relocations to the discarded text sections.
> 
> gcc/ChangeLog:
> 
>   * config/s390/s390.md (pool_section_start): Use switch_to_section
>   to select proper read-only data section instead of hardcoding .rodata.
>   (pool_section_end): Use switch_to_section to match the above.
> ---
>  gcc/ChangeLog   |  6 ++
>  gcc/config/s390/s390.md | 11 +--
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 23ce209..2c572a7 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,9 @@
> +2016-01-02  Marcin Kościelnicki  
> +
> + * config/s390/s390.md (pool_section_start): Use switch_to_section
> + to select proper read-only data section instead of hardcoding .rodata.
> + (pool_section_end): Use switch_to_section to match the above.
> +

This is ok if bootstrap and regression tests are clean. Thanks!

-Andreas-




[PATCH 1/5] s390: Use proper read-only data section for literals.

2016-01-02 Thread Marcin Kościelnicki
Previously, .rodata was hardcoded.  For C++ vague linkage functions,
this resulted in needlessly duplicated literals.  With the new split
stack support, this resulted in link errors, due to .rodata containing
relocations to the discarded text sections.

gcc/ChangeLog:

* config/s390/s390.md (pool_section_start): Use switch_to_section
to select proper read-only data section instead of hardcoding .rodata.
(pool_section_end): Use switch_to_section to match the above.
---
 gcc/ChangeLog   |  6 ++
 gcc/config/s390/s390.md | 11 +--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 23ce209..2c572a7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-02  Marcin Kościelnicki  
+
+   * config/s390/s390.md (pool_section_start): Use switch_to_section
+   to select proper read-only data section instead of hardcoding .rodata.
+   (pool_section_end): Use switch_to_section to match the above.
+
 2016-01-01  Sandra Loosemore  
 
PR 1078
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index a1fc96a..0ebefd6 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -10247,13 +10247,20 @@
 (define_insn "pool_section_start"
   [(unspec_volatile [(const_int 1)] UNSPECV_POOL_SECTION)]
   ""
-  ".section\t.rodata"
+{
+  switch_to_section (targetm.asm_out.function_rodata_section
+(current_function_decl));
+  return "";
+}
   [(set_attr "length" "0")])
 
 (define_insn "pool_section_end"
   [(unspec_volatile [(const_int 0)] UNSPECV_POOL_SECTION)]
   ""
-  ".previous"
+{
+  switch_to_section (current_function_section ());
+  return "";
+}
   [(set_attr "length" "0")])
 
 (define_insn "main_base_31_small"
-- 
2.6.4