From patchwork Thu May 23 21:15:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 1104455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-501575-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com 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 4592NM3F0jz9s9N for ; Fri, 24 May 2019 07:15:40 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:date:mime-version:message-id:content-type :content-transfer-encoding; q=dns; s=default; b=X/YTFwkiFacRuO17 HF4jG2ZWgsXHzFR1aJfOX5+lqYrSRO5Sq09W5Nc7yyPechboZvUcYxLBnhdj8wJt soaDPXWk3iaKG+xJv8jiOBLTcu4xYvGCSqXm4tt+38H495DqhVX8E2U2VQCb96s+ Vx8oFR8HCupAEVKsD5tHt9n0MpQ= 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:to:cc :from:subject:date:mime-version:message-id:content-type :content-transfer-encoding; s=default; bh=2jFFw3PTakQaFAA7hjX+t0 Qg9+w=; b=Ka9vDrfdExN7KhWiHXFcNI2YqLEcWnQRKY/6Yik7q5MitBqsbkBWsn UQL9ZYzHJaNUWVe6Aqs65TAVOeIuOFTGW5uPcf+MPptoSOJg/1nRJqFLrWqS5ay+ GDJZkQtIsJcyycNkzwy1SnT5ZaN+CL+9frDi4cH2DdYhWSA+Lq4sw= Received: (qmail 62657 invoked by alias); 23 May 2019 21:15:34 -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 62642 invoked by uid 89); 23 May 2019 21:15:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 May 2019 21:15:32 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4NKveDx173961 for ; Thu, 23 May 2019 17:15:30 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2sp1yqk8tg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 May 2019 17:15:29 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 May 2019 22:15:29 +0100 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 23 May 2019 22:15:28 +0100 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4NLFR4w30278134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 23 May 2019 21:15:27 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 08483124054; Thu, 23 May 2019 21:15:27 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B59A1124053; Thu, 23 May 2019 21:15:26 +0000 (GMT) Received: from BigMac.local (unknown [9.85.143.85]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 23 May 2019 21:15:26 +0000 (GMT) To: GCC Patches Cc: Segher Boessenkool From: Bill Schmidt Subject: [PATCH} rs6000: Enable PC-relative by default and test Date: Thu, 23 May 2019 16:15:26 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 x-cbid: 19052321-0060-0000-0000-000003471F89 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011151; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01207611; UDB=6.00634221; IPR=6.00988592; MB=3.00027023; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-23 21:15:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052321-0061-0000-0000-00004978F62B Message-Id: Hi, This is a short patch that enables PC-relative support by default, and provides a test case to ensure that the correct .localentry name,1 directive is produced iff PC-relative support is enabled. Bootstrapped and tested on powerpc64le-unknown-linux-gnu. Okay for trunk? Thanks, Bill [gcc] 2019-05-23 Bill Schmidt Michael Meissner * config/rs6000/rs6000-cpus.def (OTHER_FUTURES_MASK): New #define. [gcc/testsuite] 2019-05-23 Bill Schmidt * gcc.target/powerpc/pcrel-detect-1.c: New file. diff --git a/gcc/config/rs6000/rs6000-cpus.def b/gcc/config/rs6000/rs6000-cpus.def index 64292c923e6..5337382bdcf 100644 --- a/gcc/config/rs6000/rs6000-cpus.def +++ b/gcc/config/rs6000/rs6000-cpus.def @@ -77,6 +77,9 @@ | OPTION_MASK_FUTURE \ | OPTION_MASK_PCREL) +/* Flags that need to be turned off if -mno-future. */ +#define OTHER_FUTURE_MASKS (OPTION_MASK_PCREL) + /* Flags that need to be turned off if -mno-power9-vector. */ #define OTHER_P9_VECTOR_MASKS (OPTION_MASK_FLOAT128_HW \ | OPTION_MASK_P9_MINMAX) diff --git a/gcc/testsuite/gcc.target/powerpc/pcrel-detect-1.c b/gcc/testsuite/gcc.target/powerpc/pcrel-detect-1.c new file mode 100644 index 00000000000..8e0e9053dc7 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pcrel-detect-1.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-require-effective-target powerpc_elfv2 } */ +/* { dg-options "-O3 -mdejagnu-cpu=future" } */ + + +int localentry1 () { return 5; } + +#pragma GCC target ("cpu=power9") +int localentry2 () { return 5; } + +/* { dg-final { scan-assembler {\.localentry\tlocalentry1,1\M} } } */ +/* { dg-final { scan-assembler-not {\.localentry\tlocalentry2,1\M} } } */