From patchwork Tue May 16 08:40:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 94532 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp273827vqo; Tue, 16 May 2023 01:51:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ56oJ4f4n/KPdpVe0oPrfHofHZW7N7FSjLa1v3u3vP6IC1VVoN2o3veT07ebWBhFtazk8Zh X-Received: by 2002:a17:907:6090:b0:96a:4ea0:a1e7 with SMTP id ht16-20020a170907609000b0096a4ea0a1e7mr20418477ejc.50.1684227075528; Tue, 16 May 2023 01:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684227075; cv=none; d=google.com; s=arc-20160816; b=MVT+2aDxnhCg81jYMe/gqIK26l8QJiTFXwUr4L+8yU12vi2VnjwVL8LRhQSxbI137t 7SnFxR4rLOZ+0+Xhtr173WDOGwiXZtgCznA2v688rq60Bv24wgg3qnNy4gXtAYTugjNm yeC5r7i4olbPMUoB3yIpCP6RVL0ZYkoJfeAOViQYXMXB5h3ogchSrjKMJYj74V55t6T/ rE1yPdDE5jNTCKu5ZlJqheKfi1PN0fkajvJcaqNrPPBhdFA/kdUDTLifkQVzVgF1mwRr 5iPf/3cW+XTL2m27BGO8kAzOmLhrPVliTp1nq4kEBNpgc6XeeFnyrbgnkqjwhvL2rWwJ qQcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=PRLs/dP5R5Eky/Spp6J40JeziLWoBh7mBHhaY2B/GYw=; b=Qo4QUvH9BzKuC2K6PJkCeysudye9A7RL3M4xE29HMTxxzJhCLiSQf0O5rBPFH1Ye1P yk2THYLLcx5EYgyMSbhA/0PKodirtb6gTtnaj4Sa+bMuyWqaPeiay33u+P1ozNlYjSCl EtRNEd05s6gtC1R51M6M31YaxTkQV/XLdk4U8IsxnuWQPx3qkYU0CwdPjvVN4o9kPOum OtrVssaVYZQtd3Wtv6XJYYKqok9GjAlv0mNXP+95vAsPZ9qdFECm2EnLwWvuuMLS8xJ9 IUKmljHINkHXL2zres4G2tyeE5aFYUicrrI/ZKNr3B4ykFpkbcUeJrY1MiO3KBgaWXey WoTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BX9zj21m; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ft37-20020a170907802500b00962469ec9basi13707329ejc.329.2023.05.16.01.51.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BX9zj21m; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3FB13876886 for ; Tue, 16 May 2023 08:45:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3FB13876886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684226724; bh=PRLs/dP5R5Eky/Spp6J40JeziLWoBh7mBHhaY2B/GYw=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=BX9zj21moQ4efOcUWIyjTbYF2U8K/CrpjbNjQUXPTKRxGPxfIAOriEGhgpcSlFgLn hR4QSkVoIUMWC21oXJayos9LSZ8NLjFcKaa9ecOCy05UZkahYVD5uFlbyWeWAtXCiC 7rg0f+pfJpyzwNEnPLMJEX85BHByjTO/PzFH5Mk8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id F0E513856DD2 for ; Tue, 16 May 2023 08:40:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0E513856DD2 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-309382efe13so154256f8f.2 for ; Tue, 16 May 2023 01:40:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684226409; x=1686818409; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PRLs/dP5R5Eky/Spp6J40JeziLWoBh7mBHhaY2B/GYw=; b=XMU6XJQsy8SN4yKXQn5DgPSb2NhfrDG1EqMpcMkt+TqnfdcPmopsvPvy894PO6vy2q SIxZgBVI0iOux8f30Uf9ie7JjRAR0zEUH5YhOjrBaGZTBYKS+uwuKDsW3ixglqM+LJZr eN5zBblRgG/Wn3ykKHmFpzbFuXgea2xzhWXmcIwcZ6H491UpIvikk8U/jsCc9yiCGLCN iAaMKfGCc0XwpRP+0QGOc9f0PdzsurWbB5El0eSfif8CKv/gNKhwDn//Ne8lXSkHAIii te32kXcFlG1bnWMw8LoRb26xQ4cVp+AkOsQSxC7rjgz1Z6B9fbT+uy2Vmvrwfv9BHooS AOfA== X-Gm-Message-State: AC+VfDyn68rR0L2qq+VwOXO59UbYyzBj6IlWQ+Ub6X45BGrpSvN6GdEi LeAwhVyU/SJilXNZvQ07ZvQfYfTYQYxyIIcIoDSF+A== X-Received: by 2002:a5d:4446:0:b0:307:c7e5:dd84 with SMTP id x6-20020a5d4446000000b00307c7e5dd84mr11916477wrr.66.1684226408637; Tue, 16 May 2023 01:40:08 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id d17-20020a1c7311000000b003f4266965fbsm1562782wmb.5.2023.05.16.01.40.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:40:08 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Document examples of No_Dependence restriction for code generation Date: Tue, 16 May 2023 10:40:06 +0200 Message-Id: <20230516084006.1501276-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766040089699703110?= X-GMAIL-MSGID: =?utf-8?q?1766040089699703110?= From: Eric Botcazou gcc/ada/ * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst (No_Dependence): Give examples of new No_Dependence restrictions. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- ...nd_implementation_defined_restrictions.rst | 12 ++++++- gcc/ada/gnat_rm.texi | 33 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst index f8e2a58595f..275b46c3712 100644 --- a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst +++ b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst @@ -186,7 +186,17 @@ No_Dependence [RM 13.12.1] This restriction ensures at compile time that there are no dependences on a library unit. For GNAT, this includes implicit implementation dependences on units of the runtime library that are created by the compiler -to support specific constructs of the language. +to support specific constructs of the language. Here are some examples: + +* ``System.Arith_64``: 64-bit arithmetics for 32-bit platforms, +* ``System.Arith_128``: 128-bit arithmetics for 64-bit platforms, +* ``System.Memory``: heap memory allocation routines, +* ``System.Memory_Compare``: memory comparison routine (aka ``memcmp`` for C), +* ``System.Memory_Copy``: memory copy routine (aka ``memcpy`` for C), +* ``System.Memory_Move``: memoy move routine (aka ``memmove`` for C), +* ``System.Memory_Set``: memory set routine (aka ``memset`` for C), +* ``System.Stack_Checking[.Operations]``: stack checking without MMU, +* ``System.GCC``: support routines from the GCC library. No_Direct_Boolean_Operators --------------------------- diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 5e05287d6d8..3818f22414a 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -12727,7 +12727,38 @@ delay statements and no semantic dependences on package Calendar. [RM 13.12.1] This restriction ensures at compile time that there are no dependences on a library unit. For GNAT, this includes implicit implementation dependences on units of the runtime library that are created by the compiler -to support specific constructs of the language. +to support specific constructs of the language. Here are some examples: + + +@itemize * + +@item +@code{System.Arith_64}: 64-bit arithmetics for 32-bit platforms, + +@item +@code{System.Arith_128}: 128-bit arithmetics for 64-bit platforms, + +@item +@code{System.Memory}: heap memory allocation routines, + +@item +@code{System.Memory_Compare}: memory comparison routine (aka @code{memcmp} for C), + +@item +@code{System.Memory_Copy}: memory copy routine (aka @code{memcpy} for C), + +@item +@code{System.Memory_Move}: memoy move routine (aka @code{memmove} for C), + +@item +@code{System.Memory_Set}: memory set routine (aka @code{memset} for C), + +@item +@code{System.Stack_Checking[.Operations]}: stack checking without MMU, + +@item +@code{System.GCC}: support routines from the GCC library. +@end itemize @node No_Direct_Boolean_Operators,No_Dispatch,No_Dependence,Partition-Wide Restrictions @anchor{gnat_rm/standard_and_implementation_defined_restrictions no-direct-boolean-operators}@anchor{1ca}