From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2693 invoked by alias); 6 Feb 2015 12:23:20 -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 2683 invoked by uid 89); 6 Feb 2015 12:23:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: cvs.linux-mips.org Received: from eddie.linux-mips.org (HELO cvs.linux-mips.org) (148.251.95.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Feb 2015 12:23:17 +0000 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S27012316AbbBFMXMa0wOS (ORCPT ); Fri, 6 Feb 2015 13:23:12 +0100 Date: Fri, 06 Feb 2015 12:23:00 -0000 From: "Maciej W. Rozycki" To: Matthew Fortune cc: Petar Jovanovic , "gcc-patches@gcc.gnu.org" , "Moore, Catherine (Catherine_Moore@mentor.com)" Subject: RE: [PATCH v2][MIPS] fix CRT_CALL_STATIC_FUNCTION macro In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235320FCAD06@LEMAIL01.le.imgtec.org> Message-ID: References: <003e01d04179$ccc38bc0$664aa340$@rt-rk.com> <6D39441BF12EF246A7ABCE6654B0235320FCA3F1@LEMAIL01.le.imgtec.org> <6D39441BF12EF246A7ABCE6654B0235320FCAD06@LEMAIL01.le.imgtec.org> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00396.txt.bz2 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 backend in the next stage1. I'm looking to rework how the > ISA_HAS logic works so perhaps there would be value in doing this mostly in > a header that can also be used for assembly programmers. That would naturally > mean we get all the other nice assembly macros available in the backend of > GCC too. 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 avoided involving branch prediction, and I believe it has become even more apparent with r6 calling it NAL. I'll see if I can submit it to glibc soon -- as you may have been aware 10 years ago wasn't exactly the most friendly period in glibc maintenance and hence I wasn't very prompt with patch submissions. Maciej