From patchwork Tue May 28 07:21:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1106109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-501746-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="iVMlOsvJ"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45CldY38vYz9s4V for ; Tue, 28 May 2019 17:21:30 +1000 (AEST) 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=MEcN+l0QwUFTsnJz h61/fr+s/7d1S+9lbajOqu74e+gBkkKZH5k9JyTgHOlBTlt1rqldXZdSkREfskyR jyvtGLR4TRNj3TQdW1Z/iZzKxPsKImPL19H2bOJzK0FnkozzR4zf4nMrjpcYth2M 7ZvAm/twH8y1ugskGscINk3XL6s= 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=H8tPG6nRT3Ta2OkM0k/Ort I5FBo=; b=iVMlOsvJmtzQAECJpvzXyq1wtOhYssqzYcAjDvslQlWGweJhKN9WCD Np6pCAoqGmiTI+ECaxKnMVIARsgDTRDbhJ2XI+wpb2c/lJHckwaLSFqCgWmYOGTC QhWkpZZLQZMUn/PV3pKQmbqSLg431XdldzIx2ttcKrTN9xsXJFCyY= Received: (qmail 49914 invoked by alias); 28 May 2019 07:21:23 -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 49902 invoked by uid 89); 28 May 2019 07:21:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=shorter X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 May 2019 07:21:21 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 24A5581386 for ; Tue, 28 May 2019 09:21:19 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FFHlsNJ4vXdy for ; Tue, 28 May 2019 09:21:19 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 0142681385 for ; Tue, 28 May 2019 09:21:18 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Add support for __builtin_prefetch Date: Tue, 28 May 2019 09:21:16 +0200 Message-ID: <31820185.k8ba9VVp70@polaris> MIME-Version: 1.0 This adds support for __builtin_prefetch in Ada. Tested on x86_64-suse-linux, applied on the mainline. 2019-05-28 Eric Botcazou * gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return false if the internal builtin uses a variable list. 2019-05-28 Eric Botcazou * gnat.dg/prefetch1.ad[sb]: New test. Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 271528) +++ gcc-interface/decl.c (working copy) @@ -9174,9 +9174,9 @@ intrin_arglists_compatible_p (intrin_bin if (!ada_type && !btin_type) break; - /* If one list is shorter than the other, they fail to match. */ - if (!ada_type || !btin_type) - return false; + /* If the internal builtin uses a variable list, accept anything. */ + if (!btin_type) + break; /* If we're done with the Ada args and not with the internal builtin args, or the other way around, complain. */