On Tue, 7 Apr 2020 at 12:31, Andre Vieira (lists) <andre.simoesdiasvie...@arm.com> 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