From patchwork Fri Jul 27 09:37:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 143022 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp599666ljj; Fri, 27 Jul 2018 02:40:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcg/MubPwapsHSgQltvEB2C0RCQGIe0INsTR2PGZhbne+1F0ZdvCJ3cewuoXU+HAFnvANoT X-Received: by 2002:a63:551e:: with SMTP id j30-v6mr5249255pgb.92.1532684409062; Fri, 27 Jul 2018 02:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532684409; cv=none; d=google.com; s=arc-20160816; b=rOxMATFnmR860kanTMaoX3+DcjVQwNPO9waZ/MUDTqXMxPvTOXwUWvIdEKkFvda/pg vCRsKdM9+55Tb/lmUhhC1zfWEUPJbvd5ILbrzLcLYAQmKxdQSW5oDHXqkKhZZ8pHMesX GhWrhepPC8ZyK6j/y5tCLzA1+Fde5yFdX2aPHcCZMZchd5yqEYuWjswwuZR98/ioQeXA Ey8oAJN98DNAWALDrrEtED3vjTmR/Wuq3/uo/BRK6q5HEGdhyUtQDZiZTSQfctuTgsDZ WRLl66MjQYWMm3feMA+9vQ7gCS6mAttsXELqan1rBAdQDbMA19INLcUnIPFVzfzAcjAu ikRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=cvguss93BFeJqzAM7MmEMeLFuGRrrK9cCgTuHopjN0I=; b=0dp/VzH97csQAf8RlKPQxQxEecu5SRl8cypcc4hvu3DDCtFF6ijLiuM84Pph8SELuk OPm3zFGeqyjiTt+Do7nDbp3DGn8OuseAVtY5R4Zk6taRjYAJ3ZLI+Bg/05SzLR2pODJ+ 58fL3j8hKrNWNcH6ZVQmsCcS8nZye3pt/kLRJbxoDCC4OTYfGgw6M8QCP+XCGLZxyf+T 0QRfBciJVO7wcbxYSwlJEn/WqqMJInmge/0wjSnJkxmp6SwC+AkG4BMbI9nyt/r6Q+gj i747kWGk2C9PRkBuS+QdSIvHrypb8uObODCc0k+0+OHq4ULe1T0oTL1XbxpvA54QYr4f M8/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=DyVV0qGW; spf=pass (google.com: domain of gcc-patches-return-482508-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-482508-patch=linaro.org@gcc.gnu.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id v129-v6si3733092pfv.278.2018.07.27.02.40.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 02:40:09 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-482508-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=DyVV0qGW; spf=pass (google.com: domain of gcc-patches-return-482508-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-482508-patch=linaro.org@gcc.gnu.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=KfE70SBqI54QLpiQ nGfQI/dmyyP3sBHrC24aXo/H/NZwiaMJysCUm1UEk81MUcIxnhM1CUE15KKSgtx8 J36s966fkqTmeqhiKnSNODSyqDo3EJf8HLYEZhU4CPHu1jiiH3ExvkGh9jWhynz7 /z8wILeDYZGxLOaBbDKtHlNd7hs= 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:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=A5EADpu8VqgRJY0MXvy7pi dvmVQ=; b=DyVV0qGWWy13SzcMIj0TaWp/XEDsOhWD5pNpqpdkJD6S/kIP99LEv2 f0R7ilEMD85eyFRTfBzv3w6xixz7H3ybatXfcbrmQZrfXhCzY8XtuYm9S5fhy+ec nBGYc/W2Xkwkzkv6hBiwO+xRYC1OwJU746syCiF9c2iI3bP+wt2QU= Received: (qmail 48002 invoked by alias); 27 Jul 2018 09:38:39 -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 47885 invoked by uid 89); 27 Jul 2018 09:38:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_FAIL autolearn=ham version=3.3.2 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Jul 2018 09:38:36 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fizCi-0006Eg-2E for gcc-patches@gcc.gnu.org; Fri, 27 Jul 2018 05:38:34 -0400 Received: from foss.arm.com ([217.140.101.70]:47238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fizCh-0006CH-QG for gcc-patches@gcc.gnu.org; Fri, 27 Jul 2018 05:38:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 91CAF1682; Fri, 27 Jul 2018 02:38:31 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.207.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CAF1C3F575; Fri, 27 Jul 2018 02:38:30 -0700 (PDT) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org, ni1d@arrl.net Cc: Richard Earnshaw Subject: [PATCH 09/11] pdp11 - example of a port not needing a speculation barrier Date: Fri, 27 Jul 2018 10:37:53 +0100 Message-Id: <1532684275-13041-10-git-send-email-Richard.Earnshaw@arm.com> In-Reply-To: <1532684275-13041-1-git-send-email-Richard.Earnshaw@arm.com> References: <1531154299-28349-1-git-send-email-Richard.Earnshaw@arm.com> <1532684275-13041-1-git-send-email-Richard.Earnshaw@arm.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.140.101.70 This patch is intended as an example of all that is needed if the target system doesn't support CPUs that have speculative execution. I've chosen the pdp11 port on the basis that it's old enough that this is likely to be true for all existing implementations and that there is also little chance of that changing in future! * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine to speculation_safe_value_not_needed. --- gcc/config/pdp11/pdp11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index 1bcdaed..62c653f 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -291,6 +291,9 @@ static bool pdp11_scalar_mode_supported_p (scalar_mode); #undef TARGET_INVALID_WITHIN_DOLOOP #define TARGET_INVALID_WITHIN_DOLOOP hook_constcharptr_const_rtx_insn_null + +#undef TARGET_HAVE_SPECULATION_SAFE_VALUE +#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed /* A helper function to determine if REGNO should be saved in the current function's stack frame. */