From patchwork Wed May 4 05:28:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 618252 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r066Y5PWqz9t3v for ; Wed, 4 May 2016 15:29:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=m9zgJGMr; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=RdHFYxIrvpzYYtDydBT01trfRqtCE6Q8/Oo5Ya1TchjmiMv3+h 2QgBmEcnLBqGt+h4cUjWxeSrbPGnykTVzUxlqj5Hj6FLIHjXbYFjx+FAg3U8nOPB xYcFCtElcy3jU8cyAlFq/vp7xKgbpANDtrVlWoTD/j4Md6DthGe3oxVl8= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=ztZ9+KLyBTctSPb8YXv7iw8SG1E=; b=m9zgJGMrx6QTGrXv9cXP PpZl2aACgQU7D2qHIOQlgA7VwTbLje//oTMoWAJCNtWMO7Yaaiih/7aFkAC77ka6 tqiXrp+QQM6rWe/2beCw1jdF8AmZXIxXgudoiAOW/cabZygNHrsnVRnd00czUXPk c9SyhJ9uu7LDOeMXFcv8Gqc= Received: (qmail 110062 invoked by alias); 4 May 2016 05:28:54 -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 110048 invoked by uid 89); 4 May 2016 05:28:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=sysv4h, UD:sysv4.h, sysv4.h, Hx-languages-length:1169 X-HELO: mail-pa0-f43.google.com Received: from mail-pa0-f43.google.com (HELO mail-pa0-f43.google.com) (209.85.220.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 04 May 2016 05:28:52 +0000 Received: by mail-pa0-f43.google.com with SMTP id xk12so19927957pac.0 for ; Tue, 03 May 2016 22:28:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=f9OelbEdAwEjUKfyXvj8jhB0U3tSLBrWKG2hNQXU2KA=; b=WpexOX4TyaxhHYsxqKt4fHd43pilumimyDPgBushNCywwVedN5WZWSETjJqxjEN9cX SPj/mti1XCP+KQMhqK/9bUc3yqh5Mg+2vgytXl2WvxZhPtehCkR/0jjuklSINysH+HGJ kjjPvbTZ7BqmcE77rNmmykHNGcBydi4aKxpVlkVHlt5kJfCPsIgnGl5fsSGObnVVaYFv nhUPgS8lEjC9XDbmbg+rfRLGlnV6AL8NJieW2F2zalL7xuguFBCkovsrq7AFllTgIwZH 48PBa4tms6U+eFpPoSqFKg1zybbjo40EaiwefmD6CGvpmqsW2DuuQC/pSbjTN+9QTGDe x2FQ== X-Gm-Message-State: AOPr4FXxGoVFDHcbuLnP6UP8WaNT9lnntZr7kWjFokbvRiQrb6D6i2CDUXSb+FmMk9FxkQ== X-Received: by 10.66.81.70 with SMTP id y6mr9355219pax.121.1462339730935; Tue, 03 May 2016 22:28:50 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-146-233.sa.bigpond.net.au. [58.160.146.233]) by smtp.gmail.com with ESMTPSA id 1sm2352671pah.7.2016.05.03.22.28.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 22:28:49 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 1B928EA0153; Wed, 4 May 2016 14:58:46 +0930 (ACST) Date: Wed, 4 May 2016 14:58:46 +0930 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool , David Edelsohn Subject: [RS6000] Simplify sysv4.h TARGET_TOC Message-ID: <20160504052845.GV18915@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes We can use the TARGET_* defines here. There isn't any reason to use the underlying variable and masks. (The only reason I'm aware of to use them is when a target config file redefines some TARGET_* macro, say to 0 or 1, but you need to report an error in override_options if a user selects a command line option that attempts to change the value.) Also, TARGET_RELOCATABLE implies TARGET_MINIMAL_TOC, so there is no need to test TARGET_RELOCATABLE. Bootstrapped and regression tested powerpc64le-linux and powerpc64-linux. OK to apply? * config/rs6000/sysv4.h (TARGET_TOC): Simplify. diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index a4009c3..46d2b4b 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -40,10 +40,8 @@ #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mppc" -#define TARGET_TOC ((rs6000_isa_flags & OPTION_MASK_64BIT) \ - || ((rs6000_isa_flags \ - & (OPTION_MASK_RELOCATABLE \ - | OPTION_MASK_MINIMAL_TOC)) \ +#define TARGET_TOC (TARGET_64BIT \ + || (TARGET_MINIMAL_TOC \ && flag_pic > 1) \ || DEFAULT_ABI != ABI_V4)