From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 10E9E385DC3E for ; Wed, 8 Apr 2020 09:48:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 10E9E385DC3E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=richard.sandiford@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B87D431B; Wed, 8 Apr 2020 02:47:59 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 44E5D3F73D; Wed, 8 Apr 2020 02:47:59 -0700 (PDT) From: Richard Sandiford To: Christophe Lyon via Gcc-patches Mail-Followup-To: Christophe Lyon via Gcc-patches , Christophe Lyon , richard.sandiford@arm.com Subject: Re: [testsuite][arm] Fix cmse-15.c expected output References: Date: Wed, 08 Apr 2020 10:47:58 +0100 In-Reply-To: (Christophe Lyon via Gcc-patches's message of "Mon, 6 Apr 2020 17:12:22 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, 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: Wed, 08 Apr 2020 09:48:01 -0000 Christophe Lyon via Gcc-patches writes: > 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). FWIW, an alternative is to give multiple versions with the same prefix and use { target ... } to select between them. E.g.: /* ** foo: { target a } ** ... */ /* ** foo: { target { ! a } } ** ... */ Thanks, Richard