From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2787 invoked by alias); 6 Feb 2015 15:12:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2769 invoked by uid 89); 6 Feb 2015 15:12:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Feb 2015 15:12:48 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1YJkaJ-0007Rm-N8 from Catherine_Moore@mentor.com ; Fri, 06 Feb 2015 07:12:43 -0800 Received: from NA-MBX-04.mgc.mentorg.com ([169.254.4.117]) by SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) with mapi id 14.03.0224.002; Fri, 6 Feb 2015 07:12:43 -0800 From: "Moore, Catherine" To: Matthew Fortune , Petar Jovanovic , "gcc-patches@gcc.gnu.org" , "'Maciej W. Rozycki'" Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro Date: Fri, 06 Feb 2015 15:12:00 -0000 Message-ID: References: <003e01d04179$ccc38bc0$664aa340$@rt-rk.com> <6D39441BF12EF246A7ABCE6654B0235320FCA3F1@LEMAIL01.le.imgtec.org> In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235320FCA3F1@LEMAIL01.le.imgtec.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00407.txt.bz2 > -----Original Message----- > From: Matthew Fortune [mailto:Matthew.Fortune@imgtec.com] > Sent: Thursday, February 05, 2015 3:52 PM > Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro > >=20 > I've put your patch inline below and switched to plain text. I suspect yo= ur > post was bounced by gcc-patches. >=20 > I'm OK with this change but I'd like Catherine to comment before committi= ng. > It seems a shame to duplicate the block of code but it is probably just a= s ugly > to define a macro for the la/dla instruction. The patch itself is OK, although I agree with other's comments about the un= fortunate duplication of code. Petar, would you please add your testcase to the gcc testsuite and repost = the patch. Thanks, Catherine >=20 > For future reference, it is best not to include changelog content in a pa= tch > but instead just paste into the email. Also the ChangeLog you need for th= is > change is gcc/ChangeLog (as confusing as that may be at first). >=20 > Thanks, > Matthew >=20 > > From: Petar Jovanovic [mailto:petar.jovanovic@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 LA for n64 > > > > PTAL. Thanks. > > > > Regards, > > Petar >=20 > --- > ChangeLog | 5 +++++ > gcc/config/mips/mips.h | 23 +++++++++++++++++++---- > 2 files changed, 24 insertions(+), 4 deletions(-) >=20 > diff --git a/ChangeLog b/ChangeLog > index 5c61c66..3a15f4a 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,8 @@ > +2015-02-05 Petar Jovanovic > + > + * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro > to use > + la/jalr instead of jal. > + > 2015-02-02 Janis Johnson >=20 > * MAINTAINERS (Various Maintainers: testsuite): Remove myself. > diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index > ec69ed5..4bd83f5 100644 > --- a/gcc/config/mips/mips.h > +++ b/gcc/config/mips/mips.h > @@ -3034,11 +3034,11 @@ while (0) > nop\n\ > 1: .cpload $31\n\ > .set reorder\n\ > - jal " USER_LABEL_PREFIX #FUNC "\n\ > + la $25, " USER_LABEL_PREFIX #FUNC "\n\ > + jalr $25\n\ > .set pop\n\ > " TEXT_SECTION_ASM_OP); > -#elif ((defined _ABIN32 && _MIPS_SIM =3D=3D _ABIN32) \ > - || (defined _ABI64 && _MIPS_SIM =3D=3D _ABI64)) > +#elif (defined _ABIN32 && _MIPS_SIM =3D=3D _ABIN32) > #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ > asm (SECTION_OP "\n\ > .set push\n\ > @@ -3048,7 +3048,22 @@ while (0) > nop\n\ > 1: .set reorder\n\ > .cpsetup $31, $2, 1b\n\ > - jal " USER_LABEL_PREFIX #FUNC "\n\ > + la $25, " USER_LABEL_PREFIX #FUNC "\n\ > + jalr $25\n\ > + .set pop\n\ > + " TEXT_SECTION_ASM_OP); > +#elif (defined _ABI64 && _MIPS_SIM =3D=3D _ABI64) > +#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ > + asm (SECTION_OP "\n\ > + .set push\n\ > + .set nomips16\n\ > + .set noreorder\n\ > + bal 1f\n\ > + nop\n\ > +1: .set reorder\n\ > + .cpsetup $31, $2, 1b\n\ > + dla $25, " USER_LABEL_PREFIX #FUNC "\n\ > + jalr $25\n\ > .set pop\n\ > " TEXT_SECTION_ASM_OP); > #endif > -- > 1.8.2.1