From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-309382efe13so154256f8f.2 for ; Tue, 16 May 2023 01:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1684226409; x=1686818409; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PRLs/dP5R5Eky/Spp6J40JeziLWoBh7mBHhaY2B/GYw=; b=OXENQiOd6e0v/s6x+J5V/Od0wteKPqS/JQ113BEdC5loWXrytFUm8fHqaNKVWJZ36b YWf9KYIfZ1qGt7bdusCpJC42hsaM+6Et2lNHymYpllzkpmqlQguUG9Aq26BN65RKC1b/ Rn3Ws6PffAHI2Umj/i4M7+ishMCDsyh2FMRmVx+P1Zy5gYp5lzj6epVzM14Vv8Ub4zOe hr4cpErwKUJhYksRwNF93zbAicv/cS5TFOrxbhggI4ZK2AOAW3c4jiYtOHGEQElGD9F/ 6n7h9fLxjpB4ngA1es0NT7EklRsohLLEE1ZycId3gwL9s1eE3gx8M/Vpat/igPVGRuj7 LpZQ== 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-Google-Smtp-Source: ACHHUZ54XpKnR42aDpxtsFcBRD/GCy0N7CKKctt4EOIZ6u+1TPoCOThGn/tGHbhIPX834G0ubV27tA== 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) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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} -- 2.40.0