From patchwork Tue Nov 26 01:50:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Zadeck X-Patchwork-Id: 294163 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CBE7A2C00B1 for ; Tue, 26 Nov 2013 12:50:58 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=Om402JG8mtYt3GsEiSewvCuBFBkI3/SmX+QBzHSeSzwURdryPcY5F Q8qIybxhRUDM7en5kyu9/bzhyUqwz+3xDjhm40PNPVKDK1dtGyAp7PDFJIVfXBWm LAx6jbtLUoGt0QYF04oA2bHCu4z17jH7fnOn8Nyxi5BkyNKzY765jY= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=default; bh=YE2yTLJ3R4tqvyHQpd1T0jIvaTA=; b=Co2keRls2U/lx9G0f+SxJVTLc61n zmxropWEB0NtTs26y4VuVSeZ62PpXNgJzepaPPhVmH1kQKoRMr0sPKrcbwOXRyZK 5ikfJoFrlbBXdyrscm65pQMZCdlFKNzodMkgABl/gh12W4O60s5/5tSyNuihR0HJ gmj0LACV+ZbF4rQ= Received: (qmail 6154 invoked by alias); 26 Nov 2013 01:50:28 -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 6092 invoked by uid 89); 26 Nov 2013 01:50:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL, BAYES_50, RDNS_NONE autolearn=no version=3.3.2 X-HELO: mail-qe0-f47.google.com Received: from Unknown (HELO mail-qe0-f47.google.com) (209.85.128.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 26 Nov 2013 01:50:27 +0000 Received: by mail-qe0-f47.google.com with SMTP id t7so4980669qeb.34 for ; Mon, 25 Nov 2013 17:50:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=0N3j16hSCC7IWDaVT3mIPVuYnckrdIDxGCQZJiR3Hq0=; b=G2UNuLDMdRSiDWfl/UoNNRAq6kCSLIDGHpnKuY81m1Yhn51lnLO1ShsT0zVmKXWfi7 rMSi6pn2SWwrJsnHTLbuaQ/aiaBuzDAQBVx6cjMtuIPF+yNWLWw9AcsMPfJR86XR9H0X h5DUIaf9Hw5ofMDJPKgeXDS0tHIJvMLs6xRsporKU8cN9WWFbBaHYDc8wzaNzHapLvVq BrKx6eiG+/HcPmHrgCFeNikICdDuY4zuCU+cL7/4iuhRK3LPyNcpt7vX+NJk1OheCY1K 5DmYkSzVnkiiz0JPA17sfICsFiAzD40EqhSXDbqgqDd7u7iyJpDjOF2M8YtvMOEowFU2 kzdA== X-Gm-Message-State: ALoCoQmF7osRIJzPJYoQYbmHayC5flHOlXNWERTgIUakkjlCXjoI9fFj/hHb076LtLjLeAhr9Gwv X-Received: by 10.224.136.10 with SMTP id p10mr51620806qat.37.1385430619294; Mon, 25 Nov 2013 17:50:19 -0800 (PST) Received: from [192.168.1.12] (pool-98-113-157-168.nycmny.fios.verizon.net. [98.113.157.168]) by mx.google.com with ESMTPSA id u17sm45060851qeb.4.2013.11.25.17.50.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Nov 2013 17:50:18 -0800 (PST) Message-ID: <5293FE59.6090801@naturalbridge.com> Date: Mon, 25 Nov 2013 20:50:17 -0500 From: Kenneth Zadeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Eric Botcazou , Mike Stump CC: gcc-patches@gcc.gnu.org Subject: Re: wide-int, ada References: <0075C6DB-B432-4E6F-8A48-3AE0C4D842FE@comcast.net> <1464599.QpNUskFgRu@polaris> In-Reply-To: <1464599.QpNUskFgRu@polaris> On 11/25/2013 03:46 AM, Eric Botcazou wrote: >> Richi has asked the we break the wide-int patch so that the individual port >> and front end maintainers can review their parts without have to go through >> the entire patch. This patch covers the ada front-end. > I don't think that the mechanical change in UI_From_gnu is correct, see the > comment just above. The annotate_value change is very likely correct, but > please double check and, upon positive outcome, remove the last sentence of > the comment just above. The rest looks good, thanks. > Eric, you are correct - this was an incorrect change. I believe that the patch below would be correct, but it is impossible to test it because (i believe) that gcc no longer works if the host_bits_per_wide_int is 32. I could be wrong about this but if i am correct, what do you want me to do? Kenny Index: gcc/ada/gcc-interface/cuintp.c =================================================================== --- gcc/ada/gcc-interface/cuintp.c (revision 205374) +++ gcc/ada/gcc-interface/cuintp.c (working copy) @@ -167,7 +167,7 @@ UI_From_gnu (tree Input) in a signed 64-bit integer. */ if (tree_fits_shwi_p (Input)) return UI_From_Int (tree_to_shwi (Input)); - else if (wi::lts_p (Input, 0) && TYPE_UNSIGNED (gnu_type)) + else if (wi::gtu_p (wi::lrshift (Input, 63), 0) && TYPE_UNSIGNED (gnu_type)) return No_Uint; #endif