From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 293D5385BF83 for ; Tue, 7 Apr 2020 10:54:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 293D5385BF83 Received: by mail-ot1-x330.google.com with SMTP id g23so2625465otq.4 for ; Tue, 07 Apr 2020 03:54:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A/1jgWQPkbbBxmBwMt12CscPylgQLtYJgUWt3aaTnUc=; b=XvvVngHtLQXPVevpM8aobHU6DzM7iYJ68/ci7RlNLWt8IqXFu+lXWgPhiyx14DUL+s D5imbq0cMtNV2L36tTQOjN0W1TO0p0HuZHSnDs3tBaOeXORct85Xr8OmJZ1pHcke+7eT kAu7PUXI1Y1YoFfn+W3tLGZI5HuyFomanCXaqfBhrmkpm57btAGFoFeDPItgEb78OlAA 1tTok8V+BLQwA2/76voUOSYxgMjUc7jP3xvVKbQWr0t1XdzT79Lfp66WIJuSU6attmKy 3RUZ2QwK+NgThUojJzM58SBN1XMvEMGaSpDr9FaIyjzjP4RUqFE1MUm03HDz79LRaAQ6 whuw== X-Gm-Message-State: AGi0PuaqbGz4QogIKmyUfkfz0uJdB7kp5SWeCnJMdgAmpjbatyMgQdsv owMlbVbK9RKk95BIVdnDP442colWvJp79M9Hj2z6cA== X-Google-Smtp-Source: APiQypIhyAEh7wrRXw+S5+CIg4xzOJcAGgoRrk7FHVfd30upsaBtXx2QgmR9kvLpW+pB4iH3lYUtoNThPSGQASIFRxY= X-Received: by 2002:a9d:7397:: with SMTP id j23mr937703otk.269.1586256865350; Tue, 07 Apr 2020 03:54:25 -0700 (PDT) MIME-Version: 1.0 References: <7b9ce0a5-b20b-ce05-9d0e-aca082cdef05@arm.com> In-Reply-To: <7b9ce0a5-b20b-ce05-9d0e-aca082cdef05@arm.com> From: Christophe Lyon Date: Tue, 7 Apr 2020 12:54:14 +0200 Message-ID: Subject: Re: [testsuite][arm] Fix cmse-15.c expected output To: "Andre Vieira (lists)" Cc: gcc Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 10:54:27 -0000 On Tue, 7 Apr 2020 at 12:31, Andre Vieira (lists) wrote: > > On 06/04/2020 16:12, Christophe Lyon via Gcc-patches wrote: > > Hi, > > > > While checking Martin's fix for PR ipa/94445, he made me realize that > > the cmse-15.c testcase still fails at -Os because ICF means that we > > generate > > nonsecure2: > > b nonsecure0 > > > > which is OK, but does not match the currently expected > > nonsecure2: > > ... > > bl __gnu_cmse_nonsecure_call > > > > (see https://gcc.gnu.org/pipermail/gcc-patches/2020-April/543190.html) > > > > The test has already different expectations for v8-M and v8.1-M. > > > > I've decided to try to use check-function-bodies to account for the > > different possibilities: > > - v8-M vs v8.1-M via two different prefixes > > - code generation variants (-0?) via multiple regexps > > > > I've tested that the test now passes with --target-board=-march=armv8-m.main > > and --target-board=-march=armv8.1-m.main. > > > > I feel this a bit too much of a burden for the purpose, maybe there's > > a better way of handling all these alternatives (in particular, > > there's a lot of duplication since the expected code for the secure* > > functions is the same for v8-M and v8.1-M). > > > > OK? > > > > Thanks, > > > > Christophe > Hi Christophe, > > This check-function-bodies functionality is pretty sweet, I assume the ( > A | B ) checks for either of them? Yes. > If so that looks like a good improvement. Ideally we'd also check the > clearing for the v8.1-M cases, but that wasn't there before either and > they would need again splitting for -mfloat-abi=soft+softfp and > -mfloat-abi=hard. > Not sure what you mean? The only nonsecure test with the (A|B) construct is: +*Clear nonsecure2: +*Clear ... +*Clear ( +*Clear blxns r[0-3] +*Clear | +*Clear b nonsecure0 +*Clear ) So it does check the clearing (blxns), and 'b nonsecure0' is as valid as the result of the test for nonsecure0. > > So yeah this LGTM but you need approval from a port/global maintainer. > Thanks > Cheers, > Andre