From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27601 invoked by alias); 20 Oct 2014 19:59:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 27580 invoked by uid 89); 20 Oct 2014 19:59:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f173.google.com Received: from mail-ie0-f173.google.com (HELO mail-ie0-f173.google.com) (209.85.223.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 20 Oct 2014 19:59:43 +0000 Received: by mail-ie0-f173.google.com with SMTP id tp5so5459323ieb.4 for ; Mon, 20 Oct 2014 12:59:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=O3vqvpC47ySDvsgk+dP/iz5RfSj+v8ixGvyb4uuYaEQ=; b=Ai5r0Ir8YJrbzZdkYmdl7oBi1xToipB3Ory+fYl2FcOfEjJnsCuBfgTJV9qzsg2Oe8 5Ykjsld+B2kNjkhcCk9d3B9clFsYfrrpZtuUzpflb1WCAmy2GJoP3DD1j0+g4O9NgGsc aqMI+t8tPJYDdD7LUAdHocAZsTOI+O6oAuEsYCTFt+2aHEsNaABEc+iXaQB5k/IShUpN BiFByiJjx9g3gFcPwakZOZZu5hMfu1RpPNuqfrqcNkV6RG6sbvo9o+awsagBPAW5RYPL yNZP4G1m35bm5JBiqkFrn5XDY6KSJvP4OTl7DyAkoa0sVI9yTdP0oLEZhY5i5FtBaTLZ lOog== X-Gm-Message-State: ALoCoQkuzqScQQVdxWAS1yuv2V+mh0/QONH0RsBKDgdhHUBbnRazVG4NeAlgrQ/Th1F8TO1qpq9q MIME-Version: 1.0 X-Received: by 10.50.253.67 with SMTP id zy3mr21168968igc.45.1413835181739; Mon, 20 Oct 2014 12:59:41 -0700 (PDT) Received: by 10.107.165.143 with HTTP; Mon, 20 Oct 2014 12:59:41 -0700 (PDT) In-Reply-To: References: Date: Mon, 20 Oct 2014 20:10:00 -0000 Message-ID: Subject: Re: [Google/gcc-4_9][PATCH][target/x86_64] PR 63538 From: Xinliang David Li To: Sriraman Tallam Cc: Andrew Pinski , GCC Patches , Jan Hubicka , Cary Coutant , Paul Pluzhnikov Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg01964.txt.bz2 On Mon, Oct 20, 2014 at 11:59 AM, Sriraman Tallam wrote: > On Mon, Oct 20, 2014 at 10:51 AM, Andrew Pinski wrote: >> On Mon, Oct 20, 2014 at 10:46 AM, Sriraman Tallam wrote: >>> On Mon, Oct 20, 2014 at 10:42 AM, Xinliang David Li wrote: >>>> Why removing the tree_code check? >>> >>> The actual problem happens because STRING_CSTs (end up in .lrodata) >>> are not set a far address as they dont match the VAR_DECL check here. >>> Futher, "ix86_in_large_data_p" call has the TREE_CODE check to do the >>> right thing so this seems unnecessary & buggy here. >> >> I think he is asking because TREE_STATIC (decl) || DECL_EXTERNAL >> (decl) might be an issue for STRING_CSTs. > > TREE_STATIC is true for STRING_CSTs and DECL_EXTERNAL false, that looks ok. The values for STRING_CST make sense, but it is not documented in tree.h for use with STRING_CST. Maybe do this: if (((TREE_CODE (decl) == VAR_DECL&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl)) ||TREE_CODE (decl) == STRING_CST) && ix86_in_large_data_p (decl)) which can be simplified to: if ((TREE_CODE (decl) == VAR_DECL && is_global_var (decl) ||TREE_CODE (decl) == STRING_CST) && ix86_in_large_data_p (decl)) ... David > > Thanks > Sri > >> >> Thanks, >> Andrew >> >> >>> >>> Thanks >>> Sri >>> >>>> >>>> David >>>> >>>> On Mon, Oct 20, 2014 at 10:35 AM, Sriraman Tallam wrote: >>>>> Hi, >>>>> >>>>> This patch is under review for trunk GCC : >>>>> https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01638.html. >>>>> >>>>> In the mean time, is this ok for google/gcc-4_9 branch? Without >>>>> this, -mcmodel=medium is unusable if .lrodata goes beyond the 2G >>>>> boundary. >>>>> >>>>> Thanks >>>>> Sri