From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6505 invoked by alias); 30 Jul 2013 18:36:19 -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 6478 invoked by uid 89); 30 Jul 2013 18:36:19 -0000 X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_50,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 18:36:18 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1V4EmI-0004mT-5n from Maciej_Rozycki@mentor.com ; Tue, 30 Jul 2013 11:36:10 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 30 Jul 2013 11:36:10 -0700 Received: from [172.30.64.204] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Tue, 30 Jul 2013 19:36:08 +0100 Date: Tue, 30 Jul 2013 18:44:00 -0000 From: "Maciej W. Rozycki" To: Richard Sandiford CC: Subject: Re: [PATCH] libgcc/MIPS: Fill in delay slots of (some) MIPS16 call stubs In-Reply-To: Message-ID: References: <87k3k9b2d9.fsf@talisman.default> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-07/txt/msg01493.txt.bz2 On Mon, 29 Jul 2013, Maciej W. Rozycki wrote: > > > These stubs are I believe not really covered in our testing, because they > > > require a mixed standard-MIPS/MIPS16 environment. > > > > What's the barrier to testing a mixed environment? The normal *-linux-gnu > > configurations have no MIPS16 multilibs, so you should be able to test it > > on a plain mips-linux-gnu configuration using --target_flags unix/-mips16. > > FWIW I've been using the mips64-linux-gnu equivalent > > (--target_flags unix/-mabi=32/-mips16) without problems. > > > > Or if you don't want to test on GNU/Linux, you should be able to use something > > like mips64-elf configured with whichever --with-arch= you like (and an > > appropriate simulator). Long time since I tried that though. I prefer > > testing on GNU/Linux because it also covers libgcc.so symbol visibility > > and has better libgfortran support. > > We don't have specific coverage, but something in the testsuite might > happen to pull one or more of these thunks indeed. It is as I feared, the coverage is sparse. The only call/return stubs pulled across the testsuite are: __mips16_call_stub_sf_5 __mips16_call_stub_sc_0 __mips16_call_stub_df_0 __mips16_call_stub_df_1 __mips16_call_stub_df_2 __mips16_call_stub_df_10 (there are some call stubs too and some PIC stubs, but they all use different code). Of these only the first suffers from the old GAS shortcoming: 00000000 <__mips16_call_stub_sf_5>: 0: 03e09021 move s2,ra 4: 44846000 mtc1 a0,$f12 8: 44857000 mtc1 a1,$f14 c: 0040f809 jalr v0 10: 0040c821 move t9,v0 14: 44020000 mfc1 v0,$f0 18: 02400008 jr s2 1c: 00000000 nop as only stubs that return a single float result are affected (ones that return a single complex or a double result are not, because they use more than one CP1 move in their epilogues and old GAS is capable enough to schedule the last move into the JR's delay slot itself). > > > libgcc/ > > > * config/mips/mips16.S (DELAYf): Alias to DELAYt for the MIPS IV > > > ISA and up. > > > > OK, thanks, but please do run it through the testsuite first. > > I'll see if I can do it -- the MIPS/Linux tree I used for recent MIPS32r2 > MADD.fmt testing has no MIPS16 multilibs configured, so it might happen to > just work with -mips16 passed as an extra option (otherwise MIPS16 libs > would be automagically picked instead). I'll check if binaries executeed > really pulled any of the thunks concerned. No regressions seen, applied now. Thanks for your review. Maciej