RE: [PATCH v4][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-29 Thread Moore, Catherine
> -Original Message- > From: Petar Jovanovic [mailto:petar.jovano...@rt-rk.com] > Sent: Friday, April 24, 2015 10:51 AM > Subject: [PATCH v4][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > > gcc/ChangeLog: > > 2015-04-21 Petar Jovanovic > &

RE: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-24 Thread Petar Jovanovic
-Original Message- From: Maciej W. Rozycki [mailto:ma...@linux-mips.org] Sent: Thursday, April 23, 2015 4:55 PM To: Petar Jovanovic Cc: gcc-patches@gcc.gnu.org; catherine_mo...@mentor.com; Matthew Fortune Subject: RE: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > I hope you f

[PATCH v4][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-24 Thread Petar Jovanovic
:15:22 2015 +0100 [mips] fix CRT_CALL_STATIC_FUNCTION macro jal can not reach a target in different region, so replace it with la/jalr variant. New test has been added. It uses -Wl,--section-start=.init= and -Wl,--section-start=.text= to put the two sections in different 256

RE: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-23 Thread Maciej W. Rozycki
On Wed, 22 Apr 2015, Petar Jovanovic wrote: > > I think this will best be > > reduced to a link-only test on bare iron, hoping for a link failure. > > I am not sure how we can reduce the test to a link failure (today), if > ld will not report an error (today). Me neither, offhand; hopefully so

RE: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-22 Thread Petar Jovanovic
-Original Message- From: Maciej W. Rozycki [mailto:ma...@linux-mips.org] Sent: Tuesday, April 21, 2015 8:52 PM To: Petar Jovanovic Cc: gcc-patches@gcc.gnu.org; catherine_mo...@mentor.com; matthew.fort...@imgtec.com Subject: Re: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro >

Re: [PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-21 Thread Maciej W. Rozycki
On Tue, 21 Apr 2015, Petar Jovanovic wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/mips/call-from-init.c > @@ -0,0 +1,10 @@ > +/* Check that __do_global_ctors_aux can be reached from .init section that > + is in a different (256MB) region. */ > +/* { dg-do run } */ > +/* { dg-options "

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-21 Thread Petar Jovanovic
-Original Message- From: Moore, Catherine [mailto:catherine_mo...@mentor.com] Sent: Friday, April 17, 2015 8:36 PM To: Petar Jovanovic Cc: Maciej W. Rozycki; Matthew Fortune; gcc-patches@gcc.gnu.org Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > > Hi Petar, >

[PATCH v3][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-21 Thread Petar Jovanovic
: New test. * gcc.target/mips/mips.exp: Add section_start to mips_option_groups. commit 566564bd6d80fd6b5ebd6b8eccf09e3716246930 Author: Petar Jovanovic Date: Thu Jan 22 02:15:22 2015 +0100 [mips] fix CRT_CALL_STATIC_FUNCTION macro jal can not reach a target in different

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-17 Thread Maciej W. Rozycki
On Fri, 17 Apr 2015, Petar Jovanovic wrote: > This issue will not trigger a linker error (I believe it treats the > symbol referred by the relocation as a local symbol). This is a follow > up to GLIBC BZ #17601, the problem is seen only at runtime. So, I think > this brings back the need to run th

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-17 Thread Moore, Catherine
_CALL_STATIC_FUNCTION macro > > Resending the previous message in a plain text format. > > > Original Message ---- > > Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > > Date: Thursday, April 16, 2015 10:38 PM CEST > > From: &

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-17 Thread Petar Jovanovic
Resending the previous message in a plain text format. > Original Message > Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > Date: Thursday, April 16, 2015 10:38 PM CEST > From: "Moore, Catherine" > To: "Maciej W. Rozycki"

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-16 Thread Moore, Catherine
> -Original Message- > From: Maciej W. Rozycki [mailto:ma...@linux-mips.org] > Sent: Thursday, April 16, 2015 2:23 PM > To: Petar Jovanovic > Cc: Moore, Catherine; 'Matthew Fortune'; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATI

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-16 Thread Maciej W. Rozycki
On Thu, 16 Apr 2015, Petar Jovanovic wrote: > > There isn't any need to execute a large testcase. Instead, try adding a > short version of your test to the directory gcc/testsuite/gcc.target/mips. > > There are examples of other tests there they check for specific assembler > sequences by using s

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-04-16 Thread Petar Jovanovic
-Original Message- From: Moore, Catherine [mailto:catherine_mo...@mentor.com] Sent: Friday, February 13, 2015 2:37 AM To: Petar Jovanovic; 'Matthew Fortune'; gcc-patches@gcc.gnu.org; 'Maciej W. Rozycki' Cc: Moore, Catherine Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_S

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-12 Thread Moore, Catherine
> -Original Message- > From: Petar Jovanovic [mailto:petar.jovano...@rt-rk.com] > Sent: Thursday, February 12, 2015 7:28 PM > Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > > -Original Message- > From: Moore, Catherine [mailto:cathe

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-12 Thread Petar Jovanovic
-Original Message- From: Moore, Catherine [mailto:catherine_mo...@mentor.com] Sent: Friday, February 6, 2015 4:13 PM To: Matthew Fortune; Petar Jovanovic; gcc-patches@gcc.gnu.org; 'Maciej W. Rozycki' Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > Peta

Re: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Maciej W. Rozycki
On Fri, 6 Feb 2015, Mike Stump wrote: > Personally, the call form of bal in my book should be called call, and > the non-call form of it should be called bal, but, I realize it is > likely to late to do much about now. If one went down this path, then > even changing it away from bal is wrong.

Re: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Mike Stump
On Feb 6, 2015, at 9:41 AM, Matthew Fortune wrote: > Mike Stump writes: >> On Feb 6, 2015, at 4:23 AM, Maciej W. Rozycki >> wrote: >>> This consideration made me realise I've had a patch outstanding for >>> some >>> 10 years to convert all the `BAL x' instructions there to `BLTZAL $0, >> x'. >>>

Re: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Maciej W. Rozycki
On Fri, 6 Feb 2015, Mike Stump wrote: > > This consideration made me realise I've had a patch outstanding for some > > 10 years to convert all the `BAL x' instructions there to `BLTZAL $0, x'. > > This has always been a good idea in case implementations recognised the > > special case and avoi

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Matthew Fortune
Mike Stump writes: > On Feb 6, 2015, at 4:23 AM, Maciej W. Rozycki > wrote: > > This consideration made me realise I've had a patch outstanding for > > some > > 10 years to convert all the `BAL x' instructions there to `BLTZAL $0, > x'. > > This has always been a good idea in case implementations

Re: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Mike Stump
On Feb 6, 2015, at 4:23 AM, Maciej W. Rozycki wrote: > This consideration made me realise I've had a patch outstanding for some > 10 years to convert all the `BAL x' instructions there to `BLTZAL $0, x'. > This has always been a good idea in case implementations recognised the > special case a

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Moore, Catherine
> -Original Message- > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > Sent: Thursday, February 05, 2015 3:52 PM > Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > > > I've put your patch inline below and switched to plain text.

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Maciej W. Rozycki
On Fri, 6 Feb 2015, Matthew Fortune wrote: > > Native systems have for such ABI dependencies, including > > stuff to set up $gp. Perhaps we could reuse these bits, the licence I > > think allows us to. > > That's a good idea. Perhaps I should take that on as part of some cleanup > of the MIPS

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Matthew Fortune
Maciej W. Rozycki writes: > On Thu, 5 Feb 2015, Matthew Fortune wrote: > > > I'm OK with this change but I'd like Catherine to comment before > committing. > > It seems a shame to duplicate the block of code but it is probably just > as > > ugly to define a macro for the la/dla instruction. > >

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Maciej W. Rozycki
On Thu, 5 Feb 2015, Matthew Fortune wrote: > I'm OK with this change but I'd like Catherine to comment before committing. > It seems a shame to duplicate the block of code but it is probably just as > ugly to define a macro for the la/dla instruction. Native systems have for such ABI dependenci

RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-06 Thread Maciej W. Rozycki
On Thu, 5 Feb 2015, Petar Jovanovic wrote: > > > This is a follow-up to a change [1] in glibc. It fixes the issue [2] > > > when jal can not reach a target in different region. > > Is it not a problem that can be solved with rearranging the order of > sections in output? > > Is not this more cle

RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-05 Thread Matthew Fortune
m: Petar Jovanovic [mailto:petar.jovano...@rt-rk.com] > Sent: 05 February 2015 19:28 > To: gcc-patches@gcc.gnu.org; 'Maciej W. Rozycki'; Matthew Fortune > Subject: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > > v2: > - add ChangeLog entry > - use DLA instead of

RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-02-05 Thread Petar Jovanovic
> > This is a follow-up to a change [1] in glibc. It fixes the issue [2] > > when jal can not reach a target in different region. > Is it not a problem that can be solved with rearranging the order of sections in output? Is not this more clean solution to it? Otherwise we need to make sure that _

RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-01-26 Thread Maciej W. Rozycki
On Thu, 22 Jan 2015, Matthew Fortune wrote: > > This is a follow-up to a change [1] in glibc. It fixes the issue [2] > > when jal can not reach a target in different region. Is it not a problem that can be solved with rearranging the order of sections in output? > > It has been tested with Deja

RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-01-22 Thread Petar Jovanovic
...@imgtec.com] Sent: Thursday, January 22, 2015 9:36 AM To: Petar Jovanovic; gcc-patches@gcc.gnu.org Cc: Petar Jovanovic Subject: RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro > This is a follow-up to a change [1] in glibc. It fixes the issue [2] > when jal can not reach a target in dif

RE: [MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-01-22 Thread Matthew Fortune
> This is a follow-up to a change [1] in glibc. It fixes the issue [2] > when jal can not reach a target in different region. > > It has been tested with DejaGnu for mips32/o32, mips64/n32 and > mips64/n64. > > Let me know what you think. So to confirm, the issue is non-pic crt calling an init r

[MIPS] fix CRT_CALL_STATIC_FUNCTION macro

2015-01-21 Thread Petar Jovanovic
Hi everyone, This is a follow-up to a change [1] in glibc. It fixes the issue [2] when jal can not reach a target in different region. It has been tested with DejaGnu for mips32/o32, mips64/n32 and mips64/n64. Let me know what you think. Regards, Petar [1] https://sourceware.org/git/gitweb.cgi