From patchwork Tue Jul 5 08:29:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1652339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=XNl7pCBB; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LcbVP2pGKz9s1l for ; Tue, 5 Jul 2022 18:31:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3852E383A31D for ; Tue, 5 Jul 2022 08:31:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3852E383A31D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1657009867; bh=OhrOHmj28wtr8Q0QwIzcGqAfpqLs29jXvKOMZRgcTF4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=XNl7pCBBuHThzGHfbbjakgAdra1syKqmrlNmotNnwCpZ0PtaqU8VGFPxfPQGBk1qr jcR2Fwq7qxe5/vprT5ZbQcv9Xhg/ewGjFnWoyMsf3HSEt9UUzoY0pOlCWEilLDTgkf lYM5uBFtWz23sfB9wVXd44whSxry4mhBU8i8XlTY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 824873854179 for ; Tue, 5 Jul 2022 08:29:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 824873854179 Received: by mail-wr1-x430.google.com with SMTP id v16so4997147wrd.13 for ; Tue, 05 Jul 2022 01:29:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=OhrOHmj28wtr8Q0QwIzcGqAfpqLs29jXvKOMZRgcTF4=; b=YcS7GUdUba1khg1PYbi/M7TDzCMxZV28CgsBwU5wqnDdHMINHCymbsaN/48MHxG7XM Rrz3iitC8j2k069siw5YKa0bnY5diVej9FDCDDo9e9+i5L82V0bWXJas4/VhWqA6ndya uI+L1Rab7jSZtLio0tqXm2ACS7L8opu3mcbK3xEatZIoScglIc4wJ3lmuASc83ldtlIZ xOFI+WwD4DCKnkB3OsxELFZ1IRMyeXZ4XsI71ABddKHB2x+hon5IBCUVJpEj+NuV1Xvj SR0YDlUTPXWuKUXO8uwUA6FezaVy22QfJH1HweEDClXwrJXOiU0tiZLi7nO+5FHsrFZe Bgsg== X-Gm-Message-State: AJIora+SMGONBoomrXV3W2aCRoOAND73Y7rI6wzPa9W+kxRNUrNFEaD5 fEhlAOeswmeQ0eU03EbgaQBc0qoL9AXqKg== X-Google-Smtp-Source: AGRyM1s+UzeTbKotIAaeCztMD8BFqSYCmusf+cGskUvvNsF8OurZ19dbAd/xYCO3EYfW6KPdC41XvA== X-Received: by 2002:a05:6000:2a9:b0:21d:7059:7156 with SMTP id l9-20020a05600002a900b0021d70597156mr3083436wry.90.1657009788234; Tue, 05 Jul 2022 01:29:48 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id o4-20020a05600c378400b003a2b708c26dsm1608424wmr.40.2022.07.05.01.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 01:29:47 -0700 (PDT) Date: Tue, 5 Jul 2022 08:29:47 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Combine system.ads files - vxworks6 constants. Message-ID: <20220705082947.GA3179108@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-13.3 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: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Doug Rupp Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Systemitize Word_Size and Memory_Size declarations rather than hard code with numerical values or OS specific Long_Integer size. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/system-vxworks-ppc-kernel.ads (Word_Size): Compute based on Standard'Word_Size. (Memory_Size): Compute based on Word_Size. * libgnat/system-vxworks-ppc-rtp-smp.ads: Likewise. * libgnat/system-vxworks-ppc-rtp.ads: Likewise. diff --git a/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads b/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads --- a/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads @@ -69,8 +69,8 @@ package System is Null_Address : constant Address; Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; + Word_Size : constant := Standard'Word_Size; + Memory_Size : constant := 2 ** Word_Size; -- Address comparison diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads @@ -71,8 +71,8 @@ package System is Null_Address : constant Address; Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; + Word_Size : constant := Standard'Word_Size; + Memory_Size : constant := 2 ** Word_Size; -- Address comparison diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads @@ -71,8 +71,8 @@ package System is Null_Address : constant Address; Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; + Word_Size : constant := Standard'Word_Size; + Memory_Size : constant := 2 ** Word_Size; -- Address comparison