From patchwork Fri Oct 18 13:18:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 176829 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp851516ill; Fri, 18 Oct 2019 06:19:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJ3x5XHWcUenxrVwRdUxOMOOc5IBvOw59CyNN+CBtzMtIhmR0LoQl3mDQujyOftvuEI6CR X-Received: by 2002:a17:906:3009:: with SMTP id 9mr8680731ejz.124.1571404748372; Fri, 18 Oct 2019 06:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571404748; cv=none; d=google.com; s=arc-20160816; b=PfsFWOaebLepTs5wYiCdw7hXdtbfDct/TvY461KDs/UJ31dUuo9Q6QVajin2ad43EU Srwrbi0C/fCGHXNLGOfUX6JJw2/sImlRASnZlMCicNnOzrdfgAU8bfRRXhxnE14i+ewI apSDsNXAAVtXis9lT7ItwsdVLxBCBGeGq5Ab/EkCvkxe3bQ2qMlHrpqzP44oz67kfS3M 25j4Q50930ks1uTLKmh3a1NxfR3IgamI1D85v/un1Zsq56LF/VNdmU/TXnYdhMTvzXQ1 pJuOwryAGLr1aXO6PuMuLOZG6b1i6cAFjIwHLjDiEl/hbMw4KU0M+Rof6oBppdiZEoj/ 7Jdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=ONctbjCkTeVIN4ip99br5dbhEaQ05P0p8v2H/Cw0IW0=; b=tUzjshuieviTMU5LL7X32KQfAhzogtnVmvRAXo56kMXx5b84J4Ff0wEpgfEjoqocQl VweSbA9/G39RFBcKZb21Vgvx7IIKStNMBprNvPGcVA3+zq8yfToidJR71NG/CGK1CbrD 6DodQGpBP3Qk98r6K5TCOs9zdrU/GAuBda599bLUsd0MRvxJx351iruNKUGI6cRDWAhl 4NxcaYuH+YFUb8t2skalOrovRs1dl8aWZBpzYgtdv3pp3rXqhlGLPfnSVTlj36nvw/Tw M6NYJmqhQ+kEBPKXJZf1tBEy5L/0c2t2PQIb9iKDgMISQi3QjMflsIAEGFiWKJ6D0PZR N4/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ifEygrEZ; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=o53Wd2pP; spf=pass (google.com: domain of gcc-patches-return-511287-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511287-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id k8si3451942edx.450.2019.10.18.06.19.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2019 06:19:08 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-511287-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ifEygrEZ; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=o53Wd2pP; spf=pass (google.com: domain of gcc-patches-return-511287-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511287-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=RD/v7LVx+qGhQ1cBXbS40kpP6K0Y5VSP2PgfbLHncwsTHI O5cHJmSeqCi/8tYGowtcEjVRxu5k3VeOTHD85waf8AY7PzDJbSS6TJpq28dHef5p a6iXUcMqPevPBmOy8Rp2dOLUw1DIkjljVTLrQdJDMgtA+rhebYpqixAjMFKrU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=eFvTCqoK9aWzrtW+s+1KEykAt/g=; b=ifEygrEZaLEk5npJBRem jduOp4g55UoI0P23gufbq49JLcwyFWXglWoikLlKGlX0XW+0NLD/Ngms3r/+UFtS 2S7Y2W1CP7kl3/O6GR2CmNIZ6BMd7pjNQn1n6kIjgTBV4nIL7Fo/RlmuMOxYjRyp jwPb4m0dVvvj35UYd7uKx0U= Received: (qmail 17982 invoked by alias); 18 Oct 2019 13:18:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17916 invoked by uid 89); 18 Oct 2019 13:18:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=UD:ftest-armv7a-arm.c, conflicts, attr-crypto.c, pr52006c X-HELO: mail-lf1-f51.google.com Received: from mail-lf1-f51.google.com (HELO mail-lf1-f51.google.com) (209.85.167.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 13:18:36 +0000 Received: by mail-lf1-f51.google.com with SMTP id y127so4727734lfc.0 for ; Fri, 18 Oct 2019 06:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=7n2trXeSYImY/FBDYwQSbfbVCElN2Kcu0VJFU4kI86M=; b=o53Wd2pPphmX+0iOyWxi9WVSxhiHLJXVz84d/tR/LgmxjrXVToRmKg/E4T0yZRCf8v pa7v8Chnl1O7OrptINwvZMkahy94phOdsEXdkMc2hdTVCjjA8tf6TxaNWF0bCd7K2wD9 FiGiEsMyP6RuL/8prvDMKDzhrowtpX9qXyVB0q70HVeVNoHof4XJ9n2a/jAxG+kahWGh BRkaEAAGPnlcDoDt4wsUOi87weRhV+FmztXJ6ig6HX8pn93kUIWW2+OqC0kjmt0RwV5g VxtEBbXCnbvQBh6xH/41hXD6zDYACXxtLnaCRtJhdogDqi7YF5VPL54tz02+lsSSrHLW 8Ceg== MIME-Version: 1.0 From: Christophe Lyon Date: Fri, 18 Oct 2019 15:18:22 +0200 Message-ID: Subject: [PATCH 1/2] [ARM, testsuite] Skip tests incompatible with -mpure-code To: gcc Patches X-IsSubscribed: yes Hi, All these tests fail when using -mpure-code: * some force A or R profile * some use Neon * some use -fpic/-fPIC all of which are not supported by this option. OK? Thanks, Christophe 2019-10-18 Christophe Lyon gcc/testsuite/ * gcc.target/arm/attr-crypto.c: Skip if -mpure-code is used. * gcc.target/arm/attr-neon-fp16.c: Likewise. * gcc.target/arm/combine-cmp-shift.c: Likewise. * gcc.target/arm/data-rel-1.c: Likewise. * gcc.target/arm/data-rel-2.c: Likewise. * gcc.target/arm/data-rel-3.c: Likewise. * gcc.target/arm/ftest-armv7a-arm.c: Likewise. * gcc.target/arm/ftest-armv7a-thumb.c: Likewise. * gcc.target/arm/ftest-armv7r-arm.c: Likewise. * gcc.target/arm/ftest-armv7r-thumb.c: Likewise. * gcc.target/arm/ftest-armv7ve-arm.c: Likewise. * gcc.target/arm/ftest-armv7ve-thumb.c: Likewise. * gcc.target/arm/ftest-armv8a-arm.c: Likewise. * gcc.target/arm/ftest-armv8a-thumb.c: Likewise. * gcc.target/arm/lceil-vcvt_1.c: Likewise. * gcc.target/arm/lfloor-vcvt_1.c: Likewise. * gcc.target/arm/lround-vcvt_1.c: Likewise. * gcc.target/arm/memset-inline-10.c: Likewise. * gcc.target/arm/mod_2.c: Likewise. * gcc.target/arm/mod_256.c: Likewise. * gcc.target/arm/pr40657-1.c: Likewise. * gcc.target/arm/pr44788.c: Likewise. * gcc.target/arm/pr50305.c: Likewise. * gcc.target/arm/pr51835.c: Likewise. * gcc.target/arm/pr51915.c: Likewise. * gcc.target/arm/pr52006.c: Likewise. * gcc.target/arm/pr53187.c: Likewise. * gcc.target/arm/pr58784.c: Likewise. * gcc.target/arm/pr59575.c: Likewise. * gcc.target/arm/pr59923.c: Likewise. * gcc.target/arm/pr60650-2.c: Likewise. * gcc.target/arm/pr60657.c: Likewise. * gcc.target/arm/pr60663.c: Likewise. * gcc.target/arm/pr67439_1.c: Likewise. * gcc.target/arm/pr68620.c: Likewise. * gcc.target/arm/pr7676.c: Likewise. * gcc.target/arm/pr79239.c: Likewise. * gcc.target/arm/pr81863.c: Likewise. * gcc.target/arm/pragma_attribute.c: Likewise. * gcc.target/arm/pragma_cpp_fma.c: Likewise. * gcc.target/arm/require-pic-register-loc.c: Likewise. * gcc.target/arm/thumb-ltu.c: Likewise. * gcc.target/arm/thumb1-pic-high-reg.c: Likewise. * gcc.target/arm/thumb1-pic-single-base.c: Likewise. * gcc.target/arm/tlscall.c: Likewise. * gcc.target/arm/unsigned-float.c: Likewise. * gcc.target/arm/vrinta-ce.c: Likewise. >From 2ee4c65a4d308fa48c0bfff69e4670feeb649227 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Thu, 17 Oct 2019 11:11:48 +0200 Subject: [PATCH 1/2] [ARM,testsuite] Skip tests incompatible with -mpure-code. All these tests fail when using -mpure-code: * some force A or R profile * some use Neon * some use -fpic/-fPIC all of which are not supported by this option. 2019-10-18 Christophe Lyon gcc/testsuite/ * gcc.target/arm/attr-crypto.c: Skip if -mpure-code is used. * gcc.target/arm/attr-neon-fp16.c: Likewise. * gcc.target/arm/combine-cmp-shift.c: Likewise. * gcc.target/arm/data-rel-1.c: Likewise. * gcc.target/arm/data-rel-2.c: Likewise. * gcc.target/arm/data-rel-3.c: Likewise. * gcc.target/arm/ftest-armv7a-arm.c: Likewise. * gcc.target/arm/ftest-armv7a-thumb.c: Likewise. * gcc.target/arm/ftest-armv7r-arm.c: Likewise. * gcc.target/arm/ftest-armv7r-thumb.c: Likewise. * gcc.target/arm/ftest-armv7ve-arm.c: Likewise. * gcc.target/arm/ftest-armv7ve-thumb.c: Likewise. * gcc.target/arm/ftest-armv8a-arm.c: Likewise. * gcc.target/arm/ftest-armv8a-thumb.c: Likewise. * gcc.target/arm/lceil-vcvt_1.c: Likewise. * gcc.target/arm/lfloor-vcvt_1.c: Likewise. * gcc.target/arm/lround-vcvt_1.c: Likewise. * gcc.target/arm/memset-inline-10.c: Likewise. * gcc.target/arm/mod_2.c: Likewise. * gcc.target/arm/mod_256.c: Likewise. * gcc.target/arm/pr40657-1.c: Likewise. * gcc.target/arm/pr44788.c: Likewise. * gcc.target/arm/pr50305.c: Likewise. * gcc.target/arm/pr51835.c: Likewise. * gcc.target/arm/pr51915.c: Likewise. * gcc.target/arm/pr52006.c: Likewise. * gcc.target/arm/pr53187.c: Likewise. * gcc.target/arm/pr58784.c: Likewise. * gcc.target/arm/pr59575.c: Likewise. * gcc.target/arm/pr59923.c: Likewise. * gcc.target/arm/pr60650-2.c: Likewise. * gcc.target/arm/pr60657.c: Likewise. * gcc.target/arm/pr60663.c: Likewise. * gcc.target/arm/pr67439_1.c: Likewise. * gcc.target/arm/pr68620.c: Likewise. * gcc.target/arm/pr7676.c: Likewise. * gcc.target/arm/pr79239.c: Likewise. * gcc.target/arm/pr81863.c: Likewise. * gcc.target/arm/pragma_attribute.c: Likewise. * gcc.target/arm/pragma_cpp_fma.c: Likewise. * gcc.target/arm/require-pic-register-loc.c: Likewise. * gcc.target/arm/thumb-ltu.c: Likewise. * gcc.target/arm/thumb1-pic-high-reg.c: Likewise. * gcc.target/arm/thumb1-pic-single-base.c: Likewise. * gcc.target/arm/tlscall.c: Likewise. * gcc.target/arm/unsigned-float.c: Likewise. * gcc.target/arm/vrinta-ce.c: Likewise. Change-Id: Id4d66a68f426e98bbc5652f2c1cf516d78b335f9 --- gcc/testsuite/gcc.target/arm/attr-crypto.c | 1 + gcc/testsuite/gcc.target/arm/attr-neon-fp16.c | 1 + gcc/testsuite/gcc.target/arm/combine-cmp-shift.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-1.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-2.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-3.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c | 1 + gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c | 1 + gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c | 1 + gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c | 1 + gcc/testsuite/gcc.target/arm/lround-vcvt_1.c | 1 + gcc/testsuite/gcc.target/arm/memset-inline-10.c | 1 + gcc/testsuite/gcc.target/arm/mod_2.c | 1 + gcc/testsuite/gcc.target/arm/mod_256.c | 1 + gcc/testsuite/gcc.target/arm/pr40657-1.c | 1 + gcc/testsuite/gcc.target/arm/pr44788.c | 1 + gcc/testsuite/gcc.target/arm/pr50305.c | 1 + gcc/testsuite/gcc.target/arm/pr51835.c | 1 + gcc/testsuite/gcc.target/arm/pr51915.c | 1 + gcc/testsuite/gcc.target/arm/pr52006.c | 1 + gcc/testsuite/gcc.target/arm/pr53187.c | 1 + gcc/testsuite/gcc.target/arm/pr58784.c | 1 + gcc/testsuite/gcc.target/arm/pr59575.c | 1 + gcc/testsuite/gcc.target/arm/pr59923.c | 1 + gcc/testsuite/gcc.target/arm/pr60650-2.c | 1 + gcc/testsuite/gcc.target/arm/pr60657.c | 1 + gcc/testsuite/gcc.target/arm/pr60663.c | 1 + gcc/testsuite/gcc.target/arm/pr67439_1.c | 1 + gcc/testsuite/gcc.target/arm/pr68620.c | 1 + gcc/testsuite/gcc.target/arm/pr7676.c | 1 + gcc/testsuite/gcc.target/arm/pr79239.c | 1 + gcc/testsuite/gcc.target/arm/pr81863.c | 1 + gcc/testsuite/gcc.target/arm/pragma_attribute.c | 1 + gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c | 1 + gcc/testsuite/gcc.target/arm/require-pic-register-loc.c | 17 +++++++++-------- gcc/testsuite/gcc.target/arm/thumb-ltu.c | 1 + gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c | 1 + gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c | 1 + gcc/testsuite/gcc.target/arm/tlscall.c | 1 + gcc/testsuite/gcc.target/arm/unsigned-float.c | 1 + gcc/testsuite/gcc.target/arm/vrinta-ce.c | 1 + 47 files changed, 55 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/attr-crypto.c b/gcc/testsuite/gcc.target/arm/attr-crypto.c index af774cd..cbd13a7 100644 --- a/gcc/testsuite/gcc.target/arm/attr-crypto.c +++ b/gcc/testsuite/gcc.target/arm/attr-crypto.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* Make sure we can force fpu=vfp before switching using the pragma. */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-options "-O2 -march=armv8-a" } */ /* { dg-add-options arm_fp } */ diff --git a/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c b/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c index 984992f..d7b75645 100644 --- a/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c +++ b/gcc/testsuite/gcc.target/arm/attr-neon-fp16.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only and without Neon" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-options "-mfp16-format=ieee" } */ /* { dg-add-options arm_fp } */ diff --git a/gcc/testsuite/gcc.target/arm/combine-cmp-shift.c b/gcc/testsuite/gcc.target/arm/combine-cmp-shift.c index a64f20e..21d1478 100644 --- a/gcc/testsuite/gcc.target/arm/combine-cmp-shift.c +++ b/gcc/testsuite/gcc.target/arm/combine-cmp-shift.c @@ -1,4 +1,5 @@ /* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -mcpu=cortex-a8" } */ /* { dg-final { scan-assembler "cmp\tr\[0-9\]*, r\[0-9\]*, asr #31" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-1.c b/gcc/testsuite/gcc.target/arm/data-rel-1.c index d9d88f2..a09e235 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-1.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mno-pic-data-is-text-relative" } */ /* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-2.c b/gcc/testsuite/gcc.target/arm/data-rel-2.c index 7d37a8c..56a54e8 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-2.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-2.c @@ -1,4 +1,5 @@ /* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mno-pic-data-is-text-relative -mno-single-pic-base" } */ /* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-3.c b/gcc/testsuite/gcc.target/arm/data-rel-3.c index 534c6c4..4ce9048 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-3.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-3.c @@ -1,4 +1,5 @@ /* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mpic-data-is-text-relative" } */ /* { dg-final { scan-assembler "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c index c71a7cd..43f52fe 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-marm" } */ /* { dg-add-options arm_arch_v7a } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c index f1f789e..717f44c 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-mthumb" } */ /* { dg-add-options arm_arch_v7a } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c index 08c017f..24b93ea 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-marm" } */ /* { dg-add-options arm_arch_v7r } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c index 1b69dc0..a7c3772 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-mthumb" } */ /* { dg-add-options arm_arch_v7r } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c index 3cf987c..72c4c1f 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7ve" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-marm" } */ /* { dg-add-options arm_arch_v7ve } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c index 0d6b432..772405b 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7ve" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-mthumb" } */ /* { dg-add-options arm_arch_v7ve } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c index 7812c5c..feab5ee 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-marm" } */ /* { dg-add-options arm_arch_v8a } */ diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c index 605b173..28d54bf 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-mthumb" } */ /* { dg-add-options arm_arch_v8a } */ diff --git a/gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c b/gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c index bbe4271..a8afab1 100644 --- a/gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c +++ b/gcc/testsuite/gcc.target/arm/lceil-vcvt_1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_v8_vfp_ok } */ /* { dg-options "-O2 -march=armv8-a" } */ /* { dg-add-options arm_v8_vfp } */ diff --git a/gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c b/gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c index 88671d3..b8eb1b0 100644 --- a/gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c +++ b/gcc/testsuite/gcc.target/arm/lfloor-vcvt_1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_v8_vfp_ok } */ /* { dg-options "-O2 -march=armv8-a" } */ /* { dg-add-options arm_v8_vfp } */ diff --git a/gcc/testsuite/gcc.target/arm/lround-vcvt_1.c b/gcc/testsuite/gcc.target/arm/lround-vcvt_1.c index 8b1f6a7..4c52a83 100644 --- a/gcc/testsuite/gcc.target/arm/lround-vcvt_1.c +++ b/gcc/testsuite/gcc.target/arm/lround-vcvt_1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_v8_vfp_ok } */ /* { dg-options "-O2 -march=armv8-a -ffast-math" } */ /* { dg-add-options arm_v8_vfp } */ diff --git a/gcc/testsuite/gcc.target/arm/memset-inline-10.c b/gcc/testsuite/gcc.target/arm/memset-inline-10.c index ce51c1d..c2f8125 100644 --- a/gcc/testsuite/gcc.target/arm/memset-inline-10.c +++ b/gcc/testsuite/gcc.target/arm/memset-inline-10.c @@ -3,6 +3,7 @@ /* { dg-options "-march=armv7-a -mfloat-abi=hard -mfpu=neon -O2" } */ /* { dg-skip-if "need SIMD instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ /* { dg-skip-if "need SIMD instructions" { *-*-* } { "-mfpu=vfp*" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ #define BUF 100 long a[BUF]; diff --git a/gcc/testsuite/gcc.target/arm/mod_2.c b/gcc/testsuite/gcc.target/arm/mod_2.c index 93017a1..1143725 100644 --- a/gcc/testsuite/gcc.target/arm/mod_2.c +++ b/gcc/testsuite/gcc.target/arm/mod_2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm32 } */ /* { dg-options "-O2 -mcpu=cortex-a57 -save-temps" } */ diff --git a/gcc/testsuite/gcc.target/arm/mod_256.c b/gcc/testsuite/gcc.target/arm/mod_256.c index ccb7f3c..d8dca0f 100644 --- a/gcc/testsuite/gcc.target/arm/mod_256.c +++ b/gcc/testsuite/gcc.target/arm/mod_256.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm32 } */ /* { dg-options "-O2 -mcpu=cortex-a57 -save-temps" } */ diff --git a/gcc/testsuite/gcc.target/arm/pr40657-1.c b/gcc/testsuite/gcc.target/arm/pr40657-1.c index a6ac6c7..645f46b 100644 --- a/gcc/testsuite/gcc.target/arm/pr40657-1.c +++ b/gcc/testsuite/gcc.target/arm/pr40657-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-Os -march=armv5te -mthumb" } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-final { scan-assembler "pop.*r1.*pc" } } */ diff --git a/gcc/testsuite/gcc.target/arm/pr44788.c b/gcc/testsuite/gcc.target/arm/pr44788.c index 9ce44a8..e69bbc6 100644 --- a/gcc/testsuite/gcc.target/arm/pr44788.c +++ b/gcc/testsuite/gcc.target/arm/pr44788.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-Os -fno-strict-aliasing -fPIC -mthumb -march=armv7-a -mfpu=vfp3 -mfloat-abi=softfp" } */ diff --git a/gcc/testsuite/gcc.target/arm/pr50305.c b/gcc/testsuite/gcc.target/arm/pr50305.c index 2f6ad5c..f93df9f 100644 --- a/gcc/testsuite/gcc.target/arm/pr50305.c +++ b/gcc/testsuite/gcc.target/arm/pr50305.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv7-a" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -fno-omit-frame-pointer -marm -march=armv7-a -mfpu=vfp3" } */ struct event { diff --git a/gcc/testsuite/gcc.target/arm/pr51835.c b/gcc/testsuite/gcc.target/arm/pr51835.c index 128b9d5..157dcbf 100644 --- a/gcc/testsuite/gcc.target/arm/pr51835.c +++ b/gcc/testsuite/gcc.target/arm/pr51835.c @@ -2,6 +2,7 @@ /* { dg-skip-if "no support for hard-float VFP ABI" { arm_thumb1 } { "-march=*" } { "" } } */ /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */ /* { dg-skip-if "avoid conflicting -mfpu" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv4-sp-d16" "-mfpu=vfpv3xd" "-mfpu=vfpv3xd-fp16" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -march=armv7-a -mfloat-abi=hard -mfpu=fpv4-sp-d16" } */ int func1 (double d) diff --git a/gcc/testsuite/gcc.target/arm/pr51915.c b/gcc/testsuite/gcc.target/arm/pr51915.c index f9ed305..d79f9b3 100644 --- a/gcc/testsuite/gcc.target/arm/pr51915.c +++ b/gcc/testsuite/gcc.target/arm/pr51915.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-skip-if "no support for hard-float VFP ABI" { arm_thumb1 } { "-march=*" } { "" } } */ /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -O2" } */ struct S { int s1; void *s2; }; diff --git a/gcc/testsuite/gcc.target/arm/pr52006.c b/gcc/testsuite/gcc.target/arm/pr52006.c index dbbcfe0..136a39d 100644 --- a/gcc/testsuite/gcc.target/arm/pr52006.c +++ b/gcc/testsuite/gcc.target/arm/pr52006.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicts with multilib flags" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */ /* { dg-skip-if "no support for hard-float VFP ABI" { arm_thumb1 } { "-march=*" } { "" } } */ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -O2 -fPIC" } */ unsigned long a; diff --git a/gcc/testsuite/gcc.target/arm/pr53187.c b/gcc/testsuite/gcc.target/arm/pr53187.c index 5fbc52c..59ca27e 100644 --- a/gcc/testsuite/gcc.target/arm/pr53187.c +++ b/gcc/testsuite/gcc.target/arm/pr53187.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-skip-if "no support for hard-float VFP ABI" { arm_thumb1 } { "-march=*" } { "" } } */ /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -O2" } */ void bar (int); diff --git a/gcc/testsuite/gcc.target/arm/pr58784.c b/gcc/testsuite/gcc.target/arm/pr58784.c index 44528f34..5fdf116 100644 --- a/gcc/testsuite/gcc.target/arm/pr58784.c +++ b/gcc/testsuite/gcc.target/arm/pr58784.c @@ -2,6 +2,7 @@ /* { dg-skip-if "incompatible options" { arm_thumb1 } } */ /* { dg-options "-march=armv7-a -mfloat-abi=hard -mfpu=neon -marm -O2" } */ /* { dg-skip-if "need hardfp ABI" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* } { "-mpure-code" } } */ typedef struct __attribute__ ((__packed__)) diff --git a/gcc/testsuite/gcc.target/arm/pr59575.c b/gcc/testsuite/gcc.target/arm/pr59575.c index 13494f4..cc49be3 100644 --- a/gcc/testsuite/gcc.target/arm/pr59575.c +++ b/gcc/testsuite/gcc.target/arm/pr59575.c @@ -1,5 +1,6 @@ /* PR target/59575 */ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-Os -g -march=armv7-a" } */ void foo (int *); diff --git a/gcc/testsuite/gcc.target/arm/pr59923.c b/gcc/testsuite/gcc.target/arm/pr59923.c index 86a4e7d..7182810 100644 --- a/gcc/testsuite/gcc.target/arm/pr59923.c +++ b/gcc/testsuite/gcc.target/arm/pr59923.c @@ -1,5 +1,6 @@ /* PR target/59923 */ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-O2 -mcpu=cortex-a15 -fno-strict-aliasing -mthumb -g" } */ diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c index c8d4615..c44d7b5 100644 --- a/gcc/testsuite/gcc.target/arm/pr60650-2.c +++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */ int a, h, j; diff --git a/gcc/testsuite/gcc.target/arm/pr60657.c b/gcc/testsuite/gcc.target/arm/pr60657.c index 66355c3..ca12152 100644 --- a/gcc/testsuite/gcc.target/arm/pr60657.c +++ b/gcc/testsuite/gcc.target/arm/pr60657.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -march=armv7-a" } */ diff --git a/gcc/testsuite/gcc.target/arm/pr60663.c b/gcc/testsuite/gcc.target/arm/pr60663.c index b79b830..8d76d79 100644 --- a/gcc/testsuite/gcc.target/arm/pr60663.c +++ b/gcc/testsuite/gcc.target/arm/pr60663.c @@ -1,5 +1,6 @@ /* PR rtl-optimization/60663 */ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -march=armv7-a" } */ int diff --git a/gcc/testsuite/gcc.target/arm/pr67439_1.c b/gcc/testsuite/gcc.target/arm/pr67439_1.c index f7a6128..01a9ab6 100644 --- a/gcc/testsuite/gcc.target/arm/pr67439_1.c +++ b/gcc/testsuite/gcc.target/arm/pr67439_1.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-O1 -mfp16-format=ieee -march=armv7-a -mfpu=neon -mthumb -mrestrict-it" } */ diff --git a/gcc/testsuite/gcc.target/arm/pr68620.c b/gcc/testsuite/gcc.target/arm/pr68620.c index 984992f..9187843 100644 --- a/gcc/testsuite/gcc.target/arm/pr68620.c +++ b/gcc/testsuite/gcc.target/arm/pr68620.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-options "-mfp16-format=ieee" } */ /* { dg-add-options arm_fp } */ diff --git a/gcc/testsuite/gcc.target/arm/pr7676.c b/gcc/testsuite/gcc.target/arm/pr7676.c index 349d7a3..0e9095c 100644 --- a/gcc/testsuite/gcc.target/arm/pr7676.c +++ b/gcc/testsuite/gcc.target/arm/pr7676.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O1 -march=armv8-a -mfloat-abi=soft -mthumb" } */ /* { dg-skip-if "Do not combine float-abi= hard | soft | softfp" {*-*-*} {"-mfloat-abi=hard" -mfloat-abi=softfp } {""} } */ int a; diff --git a/gcc/testsuite/gcc.target/arm/pr79239.c b/gcc/testsuite/gcc.target/arm/pr79239.c index d1f1b28..5b40e2e 100644 --- a/gcc/testsuite/gcc.target/arm/pr79239.c +++ b/gcc/testsuite/gcc.target/arm/pr79239.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-add-options arm_fp } */ diff --git a/gcc/testsuite/gcc.target/arm/pr81863.c b/gcc/testsuite/gcc.target/arm/pr81863.c index 225a0c5..85bfab1 100644 --- a/gcc/testsuite/gcc.target/arm/pr81863.c +++ b/gcc/testsuite/gcc.target/arm/pr81863.c @@ -1,6 +1,7 @@ /* testsuite/gcc.target/arm/pr48183.c */ /* { dg-do compile } */ /* { dg-skip-if "-mslow-flash-data and -mword-relocations incompatible" { *-*-* } { "-mslow-flash-data" } } */ +/* { dg-skip-if "-mpure-code and -mword-relocations incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-O2 -mword-relocations -march=armv7-a -marm" } */ /* { dg-final { scan-assembler-not "\[\\t \]+movw" } } */ diff --git a/gcc/testsuite/gcc.target/arm/pragma_attribute.c b/gcc/testsuite/gcc.target/arm/pragma_attribute.c index 12afc97..a11a811 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_attribute.c +++ b/gcc/testsuite/gcc.target/arm/pragma_attribute.c @@ -1,6 +1,7 @@ /* Test for #prama target macros. */ /* { dg-do compile } */ /* { dg-require-effective-target arm_thumb1_ok } */ +/* { dg-require-effective-target arm_arm_ok } */ #pragma GCC target ("thumb") diff --git a/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c b/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c index c72ea8c..3b4720a 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c +++ b/gcc/testsuite/gcc.target/arm/pragma_cpp_fma.c @@ -1,6 +1,7 @@ /* Test that FMA macro is correctly undef. */ /* { dg-do compile } */ /* { dg-skip-if "Default no fma" { *-*-* } { "-mfpu=*vfpv4*" "-mfpu=*armv8"} } */ +/* { dg-skip-if "-mpure-code supports M-profile without Neon only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-add-options arm_fp } */ diff --git a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c index 268e9e4..9f089ee 100644 --- a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c +++ b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c @@ -1,14 +1,15 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-g -fPIC" } */ void *v; void a (void *x) { } void b (void) { } - /* line 7. */ -int /* line 8. */ -main (int argc) /* line 9. */ -{ /* line 10. */ - if (argc == 12345) /* line 11. */ + /* line 8. */ +int /* line 9. */ +main (int argc) /* line 10. */ +{ /* line 11. */ + if (argc == 12345) /* line 12. */ { a (v); return 1; @@ -18,12 +19,12 @@ main (int argc) /* line 9. */ return 0; } -/* { dg-final { scan-assembler-not "\.loc 1 7 \[0-9\]\+" } } */ /* { dg-final { scan-assembler-not "\.loc 1 8 \[0-9\]\+" } } */ /* { dg-final { scan-assembler-not "\.loc 1 9 \[0-9\]\+" } } */ +/* { dg-final { scan-assembler-not "\.loc 1 10 \[0-9\]\+" } } */ /* The loc at the start of the prologue. */ -/* { dg-final { scan-assembler-times "\.loc 1 10 \[0-9\]\+" 1 } } */ +/* { dg-final { scan-assembler-times "\.loc 1 11 \[0-9\]\+" 1 } } */ /* The loc at the end of the prologue, with the first user line. */ -/* { dg-final { scan-assembler-times "\.loc 1 11 \[0-9\]\+" 1 } } */ +/* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/thumb-ltu.c b/gcc/testsuite/gcc.target/arm/thumb-ltu.c index ae4ad5b..5ec321b 100644 --- a/gcc/testsuite/gcc.target/arm/thumb-ltu.c +++ b/gcc/testsuite/gcc.target/arm/thumb-ltu.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-mcpu=arm1136jf-s -mthumb -O2" } */ diff --git a/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c b/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c index df269fc..6cb14bb 100644 --- a/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c +++ b/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code and -fpic incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-mthumb -fpic -mpic-register=9" } */ diff --git a/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c b/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c index 6e9b257..b231466 100644 --- a/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c +++ b/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code and -fpic incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-mthumb -fpic -msingle-pic-base" } */ diff --git a/gcc/testsuite/gcc.target/arm/tlscall.c b/gcc/testsuite/gcc.target/arm/tlscall.c index 5f4d58b..71366ef 100644 --- a/gcc/testsuite/gcc.target/arm/tlscall.c +++ b/gcc/testsuite/gcc.target/arm/tlscall.c @@ -3,6 +3,7 @@ /* { dg-do assemble } */ /* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */ /* { dg-skip-if "FDPIC does not support gnu2 TLS dialect" { arm*-*-uclinuxfdpiceabi } "*" "" } */ +/* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ typedef struct _IO_FILE FILE; diff --git a/gcc/testsuite/gcc.target/arm/unsigned-float.c b/gcc/testsuite/gcc.target/arm/unsigned-float.c index e1cda0c..ad589d9 100644 --- a/gcc/testsuite/gcc.target/arm/unsigned-float.c +++ b/gcc/testsuite/gcc.target/arm/unsigned-float.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_fp_ok } */ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-march=armv7-a -O1" } */ /* { dg-add-options arm_fp } */ diff --git a/gcc/testsuite/gcc.target/arm/vrinta-ce.c b/gcc/testsuite/gcc.target/arm/vrinta-ce.c index 71c5b3b..092d914 100644 --- a/gcc/testsuite/gcc.target/arm/vrinta-ce.c +++ b/gcc/testsuite/gcc.target/arm/vrinta-ce.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_v8_vfp_ok } */ /* { dg-options "-O2 -marm -march=armv8-a" } */ /* { dg-add-options arm_v8_vfp } */ From patchwork Fri Oct 18 13:18:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 176828 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp851211ill; Fri, 18 Oct 2019 06:18:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqx00hrLy0YJE3MfuK6NcHPhX0wJ2hJ3JmKXvPk6qZHPy0lUQyKksKwDHBVwbXcH5i3aBZol X-Received: by 2002:a50:ed05:: with SMTP id j5mr9523980eds.251.1571404734945; Fri, 18 Oct 2019 06:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571404734; cv=none; d=google.com; s=arc-20160816; b=fe5lWE7zyNFxf4YZkiFXN0GBj96mCIOK9z8zDxGdRUF//O2ciB2Ya3NH4iJbp1OZgC 48CvZp0hiknM+VRh/q+b7DAa7Q4jDF72wI4vpfIEiiYAZVUBSB/EWE64GpBeM2MRwN9v hSEy+RZVGCwFnOE4B0maQCU3g9WQB2qI2dBL4pu/Rv3id7oTha1xumJeddtnjZJjTPBD +dQjfjmrUM9yKs7W2WjnJWdcvHfA8GxtWSJQlaWtZvv/DuRy+pwDvk0mo89hRFJpYxqA 3o/WmUHK6eWViGqWbK+bQKzJFVcWfUFr65rp5UfETWoig+EgJQZZJbSkvPZtc7wJnEbz WPcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=pd6xItyb+p53SjvGonpj4csiC5JWl9wvCUbP1RNH4jQ=; b=Ddhppvb5zcFWCVfjRbjmHtIhdfVn4iyqOJQ0VRKIuq5K/oN4tIxx9cQ3J8gkv3ogNL TOZUDojaadQLj0AVTb7d09Dxjpa1oSl0BnJpJWMI6P85o68Dl37NJVZADOQUbjnc3/LI KtLKt5rJFscrJltjqnSu44puVKBu0cZJe+SMgUMo0skqt6zzYFVxBMd3OBB4xcdUdy6r 1XRtCz8kHQY8i2fUn054klZG8YCQsfVvYG7gcnwvVX21S/aA1ztpNAf//YW8USnnghLs xjKjCwD6362CXvMlRzHeZiZb74mn/bUhktYmWEFDerIJl66QeyuTMikGcCdv5N4KMool +EEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="hLQ/gYs7"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qKqefavy; spf=pass (google.com: domain of gcc-patches-return-511286-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511286-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id b19si3304993ejj.83.2019.10.18.06.18.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2019 06:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-511286-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="hLQ/gYs7"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qKqefavy; spf=pass (google.com: domain of gcc-patches-return-511286-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511286-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=ykFM/3JcNtDcyXagXsXlNF6y9XYo7tcJ3Z6faj+DXdywnw Iid/K3RLKw7PK2CxIwR0PHypC22VcZkdUYBSuFsTlm8K7h/XLUBUZPojVU66awRF lSmOiI19qmWxLYs9FOOjgehH9wihoMzeoTdvtar5PIbW/p1wXybPmCwfXCh7Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=UYmeOwHyL8YjoiGJ7+f6nYE4scc=; b=hLQ/gYs7HNDfNB3YvPGg mL3JHtoJwICuOEIOKP9rR70XTJFDP8QsjFKI136kuippn5tb22AjxXflvmqectgk nN+HAO1iVnFlnc56vJFT5jrq25S7WtZT0/2cqdgadzGADMJi5fK1N96thx3mgKmr stAwGzstE7tpDvusllgmOV0= Received: (qmail 17760 invoked by alias); 18 Oct 2019 13:18:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 17599 invoked by uid 89); 18 Oct 2019 13:18:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=pedantic-errors, mpurecode, M-profile, Mprofile X-HELO: mail-lf1-f48.google.com Received: from mail-lf1-f48.google.com (HELO mail-lf1-f48.google.com) (209.85.167.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 13:18:37 +0000 Received: by mail-lf1-f48.google.com with SMTP id u16so4712517lfq.3 for ; Fri, 18 Oct 2019 06:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=+YDaYWGEVgiAhotUS9RSGwnF54j8cv6Q7eD7d5CtOxU=; b=qKqefavyM+zQ1aczGOXWRiI9ymsPBMVfHYy0h6q9fsxWNWAcWDipp/h/ZP35IL/z/L ot68cC9arNPtt87KH2vT24uSbkOUc8uoDe2Cm6gqMpgiaVegQDuywHNykuTS34cnuiVg aU9Id6LKG+WPCOqDrkcpce5wOMePa4XoMNuXGrycEM4/K+81KOutlQPKBbSi/WbW4TGO b23w4S/CQ/1nJW70Ag8WvhNQtc/yTg7hKsrIn4gA5DmEaOUFRQl3PKLmlykcBqGIbQXW Gn/aQnRKRT5tMOkpHUskkRZbNrP4YOgzcQiT9/zyqw+v+GOLN6Ksqy3igFzY7T5B4iMz 8gLQ== MIME-Version: 1.0 From: Christophe Lyon Date: Fri, 18 Oct 2019 15:18:23 +0200 Message-ID: Subject: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m) To: gcc Patches X-IsSubscribed: yes Hi, This patch extends support for -mpure-code to all thumb-1 processors, by removing the need for MOVT. Symbol addresses are built using upper8_15, upper0_7, lower8_15 and lower0_7 relocations, and constants are built using sequences of movs/adds and lsls instructions. The extension of the *thumb1_movhf pattern uses always the same size (6) although it can emit a shorter sequence when possible. This is similar to what *arm32_movhf already does. CASE_VECTOR_PC_RELATIVE is now false with -mpure-code, to avoid generating invalid assembly code with differences from symbols from two different sections (the difference cannot be computed by the assembler). Tests pr45701-[12].c needed a small adjustment to avoid matching upper8_15 when looking for the r8 register. Test no-literal-pool.c is augmented with __fp16, so it now uses -mfp16-format=ieee. Test thumb1-Os-mult.c generates an inline code sequence with -mpure-code and computes the multiplication by using a sequence of add/shift rather than using the multiply instruction, so we skip it in presence of -mpure-code. With -mcpu=cortex-m0, the pure-code/no-literal-pool.c fails because code like: static char *p = "Hello World"; char * testchar () { return p + 4; } generates 2 indirections (I removed non-essential directives/code) .section .rodata .LC0: .ascii "Hello World\000" .data p: .word .LC0 .section .rodata .LC2: .word p .section .text,"0x20000006",%progbits testchar: push {r7, lr} add r7, sp, #0 movs r3, #:upper8_15:#.LC2 lsls r3, #8 adds r3, #:upper0_7:#.LC2 lsls r3, #8 adds r3, #:lower8_15:#.LC2 lsls r3, #8 adds r3, #:lower0_7:#.LC2 ldr r3, [r3] ldr r3, [r3] adds r3, r3, #4 movs r0, r3 mov sp, r7 @ sp needed pop {r7, pc} By contrast, when using -mcpu=cortex-m4, the code looks like: .section .rodata .LC0: .ascii "Hello World\000" .data p: .word .LC0 testchar: push {r7} add r7, sp, #0 movw r3, #:lower16:p movt r3, #:upper16:p ldr r3, [r3] adds r3, r3, #4 mov r0, r3 mov sp, r7 pop {r7} bx lr I haven't found yet how to make code for cortex-m0 apply upper/lower relocations to "p" instead of .LC2. The current code looks functional, but could be improved. OK as-is? Thanks, Christophe >From 8c57d721ee94d813553a203bcca5ee31b7ad1a31 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Fri, 18 Oct 2019 12:15:12 +0000 Subject: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m) This patch extends support for -mpure-code to all thumb-1 processors, by removing the need for MOVT. Symbol addresses are built using upper8_15, upper0_7, lower8_15 and lower0_7 relocations, and constants are built using sequences of movs/adds and lsls instructions. The extension of the *thumb1_movhf pattern uses always the same size (6) although it can emit a shorter sequence when possible. This is similar to what *arm32_movhf already does. CASE_VECTOR_PC_RELATIVE is now false with -mpure-code, to avoid generating invalid assembly code with differences from symbols from two different sections (the difference cannot be computed by the assembler). Tests pr45701-[12].c needed a small adjustment to avoid matching upper8_15 when looking for the r8 register. Test no-literal-pool.c is augmented with __fp16, so it now uses -mfp16-format=ieee. Test thumb1-Os-mult.c generates an inline code sequence with -mpure-code and computes the multiplication by using a sequence of add/shift rather than using the multiply instruction, so we skip it in presence of -mpure-code. With -mcpu=cortex-m0, the pure-code/no-literal-pool.c fails because code like: static char *p = "Hello World"; char * testchar () { return p + 4; } generates 2 indirections (I removed non-essential directives/code) .section .rodata .LC0: .ascii "Hello World\000" .data p: .word .LC0 .section .rodata .LC2: .word p .section .text,"0x20000006",%progbits testchar: push {r7, lr} add r7, sp, #0 movs r3, #:upper8_15:#.LC2 lsls r3, #8 adds r3, #:upper0_7:#.LC2 lsls r3, #8 adds r3, #:lower8_15:#.LC2 lsls r3, #8 adds r3, #:lower0_7:#.LC2 ldr r3, [r3] ldr r3, [r3] adds r3, r3, #4 movs r0, r3 mov sp, r7 @ sp needed pop {r7, pc} By contrast, when using -mcpu=cortex-m4, the code looks like: .section .rodata .LC0: .ascii "Hello World\000" .data p: .word .LC0 testchar: push {r7} add r7, sp, #0 movw r3, #:lower16:p movt r3, #:upper16:p ldr r3, [r3] adds r3, r3, #4 mov r0, r3 mov sp, r7 pop {r7} bx lr I haven't found yet how to make code for cortex-m0 apply upper/lower relocations to "p" instead of .LC2. The current code looks functional, but could be improved. 2019-10-18 Christophe Lyon gcc/ * config/arm/arm-protos.h (thumb1_gen_const_int): Add new prototype. * config/arm/arm.c (arm_option_check_internal): Remove restriction on MOVT for -mpure-code. (thumb1_gen_const_int): New function. (thumb1_legitimate_address_p): Support -mpure-code. (thumb1_rtx_costs): Likewise. (thumb1_size_rtx_costs): Likewise. (arm_thumb1_mi_thunk): Likewise. * config/arm/arm.h (CASE_VECTOR_PC_RELATIVE): Likewise. * config/arm/thumb1.md (thumb1_movsi_symbol_ref): New. (*thumb1_movhf): Support -mpure-code. gcc/tests/ * gcc.target/arm/pr45701-1.c: Adjust for -mpure-code. * gcc.target/arm/pr45701-2.c: Likewise. * gcc.target/arm/pure-code/no-literal-pool.c: Add tests for __fp16. * gcc.target/arm/pure-code/pure-code.exp: Remove thumb2 and movt conditions. * gcc.target/arm/thumb1-Os-mult.c: Skip if -mpure-code is used. Change-Id: I79c5a5043e7ffec084c38b59a44d69214c0834cf --- gcc/config/arm/arm-protos.h | 1 + gcc/config/arm/arm.c | 89 +++++++++++++++++++--- gcc/config/arm/arm.h | 8 +- gcc/config/arm/thumb1.md | 69 +++++++++++++++-- gcc/testsuite/gcc.target/arm/pr45701-1.c | 2 +- gcc/testsuite/gcc.target/arm/pr45701-2.c | 2 +- .../gcc.target/arm/pure-code/no-literal-pool.c | 14 +++- .../gcc.target/arm/pure-code/pure-code.exp | 9 +-- gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c | 1 + 9 files changed, 167 insertions(+), 28 deletions(-) diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index f995974..beb8411 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -66,6 +66,7 @@ extern bool arm_small_register_classes_for_mode_p (machine_mode); extern int const_ok_for_arm (HOST_WIDE_INT); extern int const_ok_for_op (HOST_WIDE_INT, enum rtx_code); extern int const_ok_for_dimode_op (HOST_WIDE_INT, enum rtx_code); +extern void thumb1_gen_const_int (rtx, HOST_WIDE_INT); extern int arm_split_constant (RTX_CODE, machine_mode, rtx, HOST_WIDE_INT, rtx, rtx, int); extern int legitimate_pic_operand_p (rtx); diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 9f0975d..836f147 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2882,13 +2882,19 @@ arm_option_check_internal (struct gcc_options *opts) { const char *flag = (target_pure_code ? "-mpure-code" : "-mslow-flash-data"); + bool not_supported = arm_arch_notm || flag_pic || TARGET_NEON; - /* We only support -mpure-code and -mslow-flash-data on M-profile targets - with MOVT. */ - if (!TARGET_HAVE_MOVT || arm_arch_notm || flag_pic || TARGET_NEON) + /* We only support -mslow-flash-data on M-profile targets with + MOVT. */ + if (target_slow_flash_data && (!TARGET_HAVE_MOVT || not_supported)) error ("%s only supports non-pic code on M-profile targets with the " "MOVT instruction", flag); + /* We only support -mpure-code-flash-data on M-profile + targets. */ + if (target_pure_code && not_supported) + error ("%s only supports non-pic code on M-profile targets", flag); + /* Cannot load addresses: -mslow-flash-data forbids literal pool and -mword-relocations forbids relocation of MOVT/MOVW. */ if (target_word_relocations) @@ -4400,6 +4406,38 @@ const_ok_for_dimode_op (HOST_WIDE_INT i, enum rtx_code code) } } +/* Emit a sequence of movs/adds/shift to produce a 32-bit constant. + Avoid generating useless code when one of the bytes is zero. */ +void +thumb1_gen_const_int (rtx op0, HOST_WIDE_INT op1) +{ + bool mov_done_p = false; + int i; + + /* Emit upper 3 bytes if needed. */ + for (i = 0; i < 3; i++) + { + int byte = (op1 >> (8 * (3 - i))) & 0xff; + + if (byte) + { + emit_set_insn (op0, mov_done_p + ? gen_rtx_PLUS (SImode,op0, GEN_INT (byte)) + : GEN_INT (byte)); + mov_done_p = true; + } + + if (mov_done_p) + emit_set_insn (op0, gen_rtx_ASHIFT (SImode, op0, GEN_INT (8))); + } + + /* Emit lower byte if needed. */ + if (!mov_done_p) + emit_set_insn (op0, GEN_INT (op1 & 0xff)); + else if (op1 & 0xff) + emit_set_insn (op0, gen_rtx_PLUS (SImode, op0, GEN_INT (op1 & 0xff))); +} + /* Emit a sequence of insns to handle a large constant. CODE is the code of the operation required, it can be any of SET, PLUS, IOR, AND, XOR, MINUS; @@ -8530,7 +8568,8 @@ thumb1_legitimate_address_p (machine_mode mode, rtx x, int strict_p) /* This is PC relative data before arm_reorg runs. */ else if (GET_MODE_SIZE (mode) >= 4 && CONSTANT_P (x) && GET_CODE (x) == SYMBOL_REF - && CONSTANT_POOL_ADDRESS_P (x) && !flag_pic) + && CONSTANT_POOL_ADDRESS_P (x) && !flag_pic + && !arm_disable_literal_pool) return 1; /* This is PC relative data after arm_reorg runs. */ @@ -8598,6 +8637,7 @@ thumb1_legitimate_address_p (machine_mode mode, rtx x, int strict_p) && GET_MODE_SIZE (mode) == 4 && GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x) + && !arm_disable_literal_pool && ! (flag_pic && symbol_mentioned_p (get_pool_constant (x)) && ! pcrel_constant_p (get_pool_constant (x)))) @@ -9278,7 +9318,9 @@ thumb1_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer) return 0; if (thumb_shiftable_const (INTVAL (x))) return COSTS_N_INSNS (2); - return COSTS_N_INSNS (3); + return arm_disable_literal_pool + ? COSTS_N_INSNS (8) + : COSTS_N_INSNS (3); } else if ((outer == PLUS || outer == COMPARE) && INTVAL (x) < 256 && INTVAL (x) > -256) @@ -9435,7 +9477,9 @@ thumb1_size_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer) /* See split "TARGET_THUMB1 && satisfies_constraint_K". */ if (thumb_shiftable_const (INTVAL (x))) return COSTS_N_INSNS (2); - return COSTS_N_INSNS (3); + return arm_disable_literal_pool + ? COSTS_N_INSNS (8) + : COSTS_N_INSNS (3); } else if ((outer == PLUS || outer == COMPARE) && INTVAL (x) < 256 && INTVAL (x) > -256) @@ -27073,14 +27117,41 @@ arm_thumb1_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta, /* push r3 so we can use it as a temporary. */ /* TODO: Omit this save if r3 is not used. */ fputs ("\tpush {r3}\n", file); - fputs ("\tldr\tr3, ", file); + + /* With -mpure-code, we cannot load the address from the + constant pool: we build it explicitly. */ + if (target_pure_code) + { + fputs ("\tmovs\tr3, #:upper8_15:#", file); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + fputc ('\n', file); + fputs ("\tlsls r3, #8\n", file); + fputs ("\tadds\tr3, #:upper0_7:#", file); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + fputc ('\n', file); + fputs ("\tlsls r3, #8\n", file); + fputs ("\tadds\tr3, #:lower8_15:#", file); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + fputc ('\n', file); + fputs ("\tlsls r3, #8\n", file); + fputs ("\tadds\tr3, #:lower0_7:#", file); + assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); + fputc ('\n', file); + } + else + fputs ("\tldr\tr3, ", file); } else { fputs ("\tldr\tr12, ", file); } - assemble_name (file, label); - fputc ('\n', file); + + if (!target_pure_code) + { + assemble_name (file, label); + fputc ('\n', file); + } + if (flag_pic) { /* If we are generating PIC, the ldr instruction below loads diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 8b67c9c..d842448 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1850,9 +1850,11 @@ enum arm_auto_incmodes for the index in the tablejump instruction. */ #define CASE_VECTOR_MODE Pmode -#define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \ - || (TARGET_THUMB1 \ - && (optimize_size || flag_pic))) +#define CASE_VECTOR_PC_RELATIVE ((TARGET_THUMB2 \ + || (TARGET_THUMB1 \ + && (optimize_size || flag_pic))) \ + && (!target_pure_code)) + #define CASE_VECTOR_SHORTEN_MODE(min, max, body) \ (TARGET_THUMB1 \ diff --git a/gcc/config/arm/thumb1.md b/gcc/config/arm/thumb1.md index 5c70200..dd758eb 100644 --- a/gcc/config/arm/thumb1.md +++ b/gcc/config/arm/thumb1.md @@ -43,6 +43,41 @@ +(define_insn "thumb1_movsi_symbol_ref" + [(set (match_operand:SI 0 "register_operand" "=l") + (match_operand:SI 1 "general_operand" "")) + ] + "TARGET_THUMB1 + && arm_disable_literal_pool + && GET_CODE (operands[1]) == SYMBOL_REF" + "* + output_asm_insn (\"movs\\t%0, #:upper8_15:%1\", operands); + output_asm_insn (\"lsls\\t%0, #8\", operands); + output_asm_insn (\"adds\\t%0, #:upper0_7:%1\", operands); + output_asm_insn (\"lsls\\t%0, #8\", operands); + output_asm_insn (\"adds\\t%0, #:lower8_15:%1\", operands); + output_asm_insn (\"lsls\\t%0, #8\", operands); + output_asm_insn (\"adds\\t%0, #:lower0_7:%1\", operands); + return \"\"; + " + [(set_attr "length" "14") + (set_attr "conds" "clob")] +) + +(define_split + [(set (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "immediate_operand" ""))] + "TARGET_THUMB1 + && arm_disable_literal_pool + && GET_CODE (operands[1]) == CONST_INT + && !satisfies_constraint_I (operands[1])" + [(clobber (const_int 0))] + " + thumb1_gen_const_int (operands[0], INTVAL (operands[1])); + DONE; + " +) + (define_insn "*thumb1_adddi3" [(set (match_operand:DI 0 "register_operand" "=l") (plus:DI (match_operand:DI 1 "register_operand" "%0") @@ -829,8 +864,8 @@ (set_attr "conds" "clob,nocond,nocond,nocond,nocond,clob")]) (define_insn "*thumb1_movhf" - [(set (match_operand:HF 0 "nonimmediate_operand" "=l,l,m,*r,*h") - (match_operand:HF 1 "general_operand" "l,mF,l,*h,*r"))] + [(set (match_operand:HF 0 "nonimmediate_operand" "=l,l,l,m,*r,*h") + (match_operand:HF 1 "general_operand" "l, m,F,l,*h,*r"))] "TARGET_THUMB1 && ( s_register_operand (operands[0], HFmode) || s_register_operand (operands[1], HFmode))" @@ -855,14 +890,34 @@ } return \"ldrh\\t%0, %1\"; } - case 2: return \"strh\\t%1, %0\"; + case 2: + { + int bits; + int high; + rtx ops[3]; + + bits = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (operands[1]), + HFmode); + ops[0] = operands[0]; + high = (bits >> 8) & 0xff; + ops[1] = GEN_INT (high); + ops[2] = GEN_INT (bits & 0xff); + if (high != 0) + output_asm_insn (\"movs\\t%0, %1\;lsls\\t%0, #8\;adds\\t%0, %2\", ops); + else + output_asm_insn (\"movs\\t%0, %2\", ops); + + return \"\"; + } + case 3: return \"strh\\t%1, %0\"; default: return \"mov\\t%0, %1\"; } " - [(set_attr "length" "2") - (set_attr "type" "mov_reg,load_4,store_4,mov_reg,mov_reg") - (set_attr "pool_range" "*,1018,*,*,*") - (set_attr "conds" "clob,nocond,nocond,nocond,nocond")]) + [(set_attr "length" "2,2,6,2,2,2") + (set_attr "type" "mov_reg,load_4,mov_reg,store_4,mov_reg,mov_reg") + (set_attr "pool_range" "*,1018,*,*,*,*") + (set_attr "conds" "clob,nocond,nocond,nocond,nocond,nocond")]) + ;;; ??? This should have alternatives for constants. (define_insn "*thumb1_movsf_insn" [(set (match_operand:SF 0 "nonimmediate_operand" "=l,l,>,l, m,*r,*h") diff --git a/gcc/testsuite/gcc.target/arm/pr45701-1.c b/gcc/testsuite/gcc.target/arm/pr45701-1.c index b26011b..15913d8 100644 --- a/gcc/testsuite/gcc.target/arm/pr45701-1.c +++ b/gcc/testsuite/gcc.target/arm/pr45701-1.c @@ -2,7 +2,7 @@ /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ /* { dg-options "-mthumb -Os" } */ /* { dg-final { scan-assembler "push\t\{r3" { target { ! arm*-*-uclinuxfdpiceabi } } } } */ -/* { dg-final { scan-assembler-not "\[^\-\]r8" { target { ! arm*-*-uclinuxfdpiceabi } } } } */ +/* { dg-final { scan-assembler-not "\[^\-e\]r8" { target { ! arm*-*-uclinuxfdpiceabi } } } } */ extern int hist_verify; extern int a1; diff --git a/gcc/testsuite/gcc.target/arm/pr45701-2.c b/gcc/testsuite/gcc.target/arm/pr45701-2.c index 32eed4d..bb2d36e 100644 --- a/gcc/testsuite/gcc.target/arm/pr45701-2.c +++ b/gcc/testsuite/gcc.target/arm/pr45701-2.c @@ -2,7 +2,7 @@ /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */ /* { dg-options "-mthumb -Os" } */ /* { dg-final { scan-assembler "push\t\{r3" { target { ! arm*-*-uclinuxfdpiceabi } } } } */ -/* { dg-final { scan-assembler-not "\[^\-\]r8" { target { ! arm*-*-uclinuxfdpiceabi } } } } */ +/* { dg-final { scan-assembler-not "\[^\-e\]r8" { target { ! arm*-*-uclinuxfdpiceabi } } } } */ extern int hist_verify; extern int a1; diff --git a/gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool.c b/gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool.c index 4b893fd..3de1620 100644 --- a/gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool.c +++ b/gcc/testsuite/gcc.target/arm/pure-code/no-literal-pool.c @@ -1,12 +1,24 @@ /* { dg-do compile } */ -/* { dg-options "-mpure-code" } */ +/* { dg-options "-mpure-code -mfp16-format=ieee" } */ /* { dg-skip-if "" { *-*-* } { "-g" "-fpic" "-fPIC" } { "" } } */ +__fp16 hf; float sf; double df; long long l; static char *p = "Hello World"; +__fp16 +testsfp16 (__fp16 *p) +{ + hf = 1.3; + *p += hf; + if (*p > 1.1234f) + return 2.1234f; + else + return 3.1234f; +} + float testsf (float *p) { diff --git a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp index bf7e4ad..b05cfd6 100644 --- a/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp +++ b/gcc/testsuite/gcc.target/arm/pure-code/pure-code.exp @@ -25,11 +25,8 @@ if ![info exists DEFAULT_CFLAGS] then { set DEFAULT_CFLAGS " -ansi -pedantic-errors" } -# The -mpure-code option is only available for M-profile targets that support -# the MOVT instruction. -if {([check_effective_target_arm_thumb2_ok] - || [check_effective_target_arm_thumb1_movt_ok]) - && [check_effective_target_arm_cortex_m]} then { +# The -mpure-code option is only available for M-profile targets. +if {[check_effective_target_arm_cortex_m]} then { # Initialize `dg'. dg-init @@ -56,4 +53,4 @@ set LTO_TORTURE_OPTIONS ${saved-lto_torture_options} # All done. dg-finish -} +#} diff --git a/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c b/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c index b989c42..92772d4 100644 --- a/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c +++ b/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_thumb1_ok } */ /* { dg-options "-Os" } */ +/* { dg-skip-if "-mpure-code generates an inline multiplication code sequence" { *-*-* } { "-mpure-code" } } */ /* { dg-skip-if "" { ! { arm_thumb1 } } } */ int