public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately
@ 2015-02-02  4:51 Hurugalawadi, Naveen
  2015-02-08  5:34 ` Andrew Pinski
  2015-02-17 10:40 ` Marcus Shawcroft
  0 siblings, 2 replies; 7+ messages in thread
From: Hurugalawadi, Naveen @ 2015-02-02  4:51 UTC (permalink / raw)
  To: gcc-patches; +Cc: Pinski, Andrew

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

Hi,

Please find attached the patch that handles the operations on
SYMBOL_SMALL_TPREL appropriately.
It fixes gcc.dg/tls/opt-11.c regression on ilp32.

Please review the patch and let us know if its okay?
Regression tested on aarch64-elf.

Thanks,
Naveen

2015-02-02  Andrew Pinski  <apinski@cavium.com>
                    Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

        * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately):
        Check whether the destination of SYMBOL_SMALL_TPREL is Pmode.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64_tprel.patch --]
[-- Type: text/x-patch; name="aarch64_tprel.patch", Size: 494 bytes --]

Index: gcc/config/aarch64/aarch64.c
===================================================================
--- gcc/config/aarch64/aarch64.c	(revision 220343)
+++ gcc/config/aarch64/aarch64.c	(working copy)
@@ -956,6 +956,10 @@
     case SYMBOL_SMALL_TPREL:
       {
 	rtx tp = aarch64_load_tp (NULL);
+	
+	if (GET_MODE (dest) != Pmode)
+	  tp = gen_lowpart (GET_MODE (dest), tp);
+
 	emit_insn (gen_tlsle_small (dest, tp, imm));
 	set_unique_reg_note (get_last_insn (), REG_EQUIV, imm);
 	return;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately
  2015-02-02  4:51 [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately Hurugalawadi, Naveen
@ 2015-02-08  5:34 ` Andrew Pinski
  2015-02-17 10:40 ` Marcus Shawcroft
  1 sibling, 0 replies; 7+ messages in thread
From: Andrew Pinski @ 2015-02-08  5:34 UTC (permalink / raw)
  To: Hurugalawadi, Naveen; +Cc: gcc-patches

On Sun, Feb 1, 2015 at 8:51 PM, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> Hi,
>
> Please find attached the patch that handles the operations on
> SYMBOL_SMALL_TPREL appropriately.
> It fixes gcc.dg/tls/opt-11.c regression on ilp32.
>
> Please review the patch and let us know if its okay?
> Regression tested on aarch64-elf.

Also bootstrapped and tested on aarch64-linux-gnu with no regressions
(and many testcases in libgomp passing now).

Thanks,
Andrew Pinski

>
> Thanks,
> Naveen
>
> 2015-02-02  Andrew Pinski  <apinski@cavium.com>
>                     Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
>
>         * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately):
>         Check whether the destination of SYMBOL_SMALL_TPREL is Pmode.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately
  2015-02-02  4:51 [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately Hurugalawadi, Naveen
  2015-02-08  5:34 ` Andrew Pinski
@ 2015-02-17 10:40 ` Marcus Shawcroft
  2015-02-18  4:45   ` Hurugalawadi, Naveen
  1 sibling, 1 reply; 7+ messages in thread
From: Marcus Shawcroft @ 2015-02-17 10:40 UTC (permalink / raw)
  To: Hurugalawadi, Naveen; +Cc: gcc-patches, Pinski, Andrew

On 2 February 2015 at 04:51, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> Hi,
>
> Please find attached the patch that handles the operations on
> SYMBOL_SMALL_TPREL appropriately.
> It fixes gcc.dg/tls/opt-11.c regression on ilp32.
>
> Please review the patch and let us know if its okay?
> Regression tested on aarch64-elf.
>
> Thanks,
> Naveen
>
> 2015-02-02  Andrew Pinski  <apinski@cavium.com>
>                     Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
>
>         * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately):
>         Check whether the destination of SYMBOL_SMALL_TPREL is Pmode.

OK, but fix the trailing white spacein the patch.  Can you prepare a
backport into 4.9 please? /Marcus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately
  2015-02-17 10:40 ` Marcus Shawcroft
@ 2015-02-18  4:45   ` Hurugalawadi, Naveen
  2015-02-18  8:11     ` Marcus Shawcroft
  0 siblings, 1 reply; 7+ messages in thread
From: Hurugalawadi, Naveen @ 2015-02-18  4:45 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: gcc-patches, Pinski, Andrew

Hi Marcus,

Thanks for the review.

>> OK, but fix the trailing white space in the patch

Done. Committed with the modification.

>>  Can you prepare a backport into 4.9

ILP32 support is not completely added in 4.9 and hence the patch
is not needed.

Thanks,
Naveen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately
  2015-02-18  4:45   ` Hurugalawadi, Naveen
@ 2015-02-18  8:11     ` Marcus Shawcroft
  2015-02-20  5:16       ` [PATCH, AArch64] [4.9] " Hurugalawadi, Naveen
  0 siblings, 1 reply; 7+ messages in thread
From: Marcus Shawcroft @ 2015-02-18  8:11 UTC (permalink / raw)
  To: Hurugalawadi, Naveen; +Cc: gcc-patches, Pinski, Andrew

On 18 February 2015 at 04:45, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> Hi Marcus,
>
> Thanks for the review.
>
>>> OK, but fix the trailing white space in the patch
>
> Done. Committed with the modification.
>
>>>  Can you prepare a backport into 4.9
>
> ILP32 support is not completely added in 4.9 and hence the patch
> is not needed.

The handling of SYMBOL_SMALL_TPREL is present in 4.9 and very clearly
has exactly the same issue.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, AArch64] [4.9] Handle SYMBOL_SMALL_TPREL appropriately
  2015-02-18  8:11     ` Marcus Shawcroft
@ 2015-02-20  5:16       ` Hurugalawadi, Naveen
  2015-02-27 10:18         ` Richard Earnshaw
  0 siblings, 1 reply; 7+ messages in thread
From: Hurugalawadi, Naveen @ 2015-02-20  5:16 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: gcc-patches, Pinski, Andrew

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

Hi Marcus,

>> The handling of SYMBOL_SMALL_TPREL is present in 4.9 and very clearly
>> has exactly the same issue.

Please find attached the patch ported for gcc-4.9.

Please review the patch and let us know if its okay?
Regression tested on aarch64-elf.

Thanks,
Naveen


2015-02-20  Andrew Pinski  <apinski@cavium.com>
                    Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

        * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately):
        Check whether the destination of SYMBOL_SMALL_TPREL is Pmode.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: symbolref_ilp32.patch --]
[-- Type: text/x-patch; name="symbolref_ilp32.patch", Size: 493 bytes --]

Index: gcc/config/aarch64/aarch64.c
===================================================================
--- gcc/config/aarch64/aarch64.c	(revision 220806)
+++ gcc/config/aarch64/aarch64.c	(working copy)
@@ -659,6 +659,10 @@
     case SYMBOL_SMALL_TPREL:
       {
 	rtx tp = aarch64_load_tp (NULL);
+
+	if (GET_MODE (dest) != Pmode)
+	  tp = gen_lowpart (GET_MODE (dest), tp);
+
 	emit_insn (gen_tlsle_small (dest, tp, imm));
 	set_unique_reg_note (get_last_insn (), REG_EQUIV, imm);
 	return;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, AArch64] [4.9] Handle SYMBOL_SMALL_TPREL appropriately
  2015-02-20  5:16       ` [PATCH, AArch64] [4.9] " Hurugalawadi, Naveen
@ 2015-02-27 10:18         ` Richard Earnshaw
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Earnshaw @ 2015-02-27 10:18 UTC (permalink / raw)
  To: Hurugalawadi, Naveen, Marcus Shawcroft; +Cc: gcc-patches, Pinski, Andrew

On 20/02/15 04:14, Hurugalawadi, Naveen wrote:
> Hi Marcus,
> 
>>> The handling of SYMBOL_SMALL_TPREL is present in 4.9 and very clearly
>>> has exactly the same issue.
> 
> Please find attached the patch ported for gcc-4.9.
> 
> Please review the patch and let us know if its okay?
> Regression tested on aarch64-elf.
> 
> Thanks,
> Naveen
> 
> 
> 2015-02-20  Andrew Pinski  <apinski@cavium.com>
>                     Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
> 
>         * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately):
>         Check whether the destination of SYMBOL_SMALL_TPREL is Pmode.
> 

OK.

R.

> 
> symbolref_ilp32.patch
> 
> 
> Index: gcc/config/aarch64/aarch64.c
> ===================================================================
> --- gcc/config/aarch64/aarch64.c	(revision 220806)
> +++ gcc/config/aarch64/aarch64.c	(working copy)
> @@ -659,6 +659,10 @@
>      case SYMBOL_SMALL_TPREL:
>        {
>  	rtx tp = aarch64_load_tp (NULL);
> +
> +	if (GET_MODE (dest) != Pmode)
> +	  tp = gen_lowpart (GET_MODE (dest), tp);
> +
>  	emit_insn (gen_tlsle_small (dest, tp, imm));
>  	set_unique_reg_note (get_last_insn (), REG_EQUIV, imm);
>  	return;
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-27  9:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02  4:51 [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately Hurugalawadi, Naveen
2015-02-08  5:34 ` Andrew Pinski
2015-02-17 10:40 ` Marcus Shawcroft
2015-02-18  4:45   ` Hurugalawadi, Naveen
2015-02-18  8:11     ` Marcus Shawcroft
2015-02-20  5:16       ` [PATCH, AArch64] [4.9] " Hurugalawadi, Naveen
2015-02-27 10:18         ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).