From patchwork Tue Jul 25 12:13:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 793355 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-458891-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="rxRZ4uC9"; dkim-atps=neutral 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 3xGxwT3qxsz9s7M for ; Tue, 25 Jul 2017 22:13:29 +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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=FQ+2MiWce+Ya9Co7kqS5EOuLQV3rjZocHZ7UMrpgzRXOeNjEaxj5E wCLvfIsMon6XvcEHTHmkpw0khtaHwPE1gBBVlKXkKYL20wOH88NHmcF0g4as6aeF X/6ZhOa6BavMojrghscd2WDNvLww3VHj1AyQjuEw20u+gy35Jfw738= 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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=dj3ELyNDqBDq3Ke4WxhdHjwPDRc=; b=rxRZ4uC9CcqNEG82fSXvWw7jpKqD 8OmiP+ATacXOKUiNOrAaZ5En5wZNt7Abhpo2DC5OWDeRbhaPYd+jMnKHjCOHlMPD c4qOc6sESH4smz+RpQbJy7AGeEgUBQEpl17VwesDRW/0SAoXlhDdgYPCrOc/z3pP 8uWRAccL5hNWfdY= Received: (qmail 122503 invoked by alias); 25 Jul 2017 12:13:19 -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 119730 invoked by uid 89); 25 Jul 2017 12:13:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=commited, HX-HELO:sk:EUR02-A, Hx-spam-relays-external:15.01.1282.020, H*r:15.01.1282.020 X-HELO: EUR02-AM5-obe.outbound.protection.outlook.com Received: from mail-eopbgr00052.outbound.protection.outlook.com (HELO EUR02-AM5-obe.outbound.protection.outlook.com) (40.107.0.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Jul 2017 12:13:16 +0000 Received: from DB6PR0801MB2053.eurprd08.prod.outlook.com (10.168.86.22) by AM4PR08MB2660.eurprd08.prod.outlook.com (10.171.190.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10; Tue, 25 Jul 2017 12:13:11 +0000 Received: from DB6PR0801MB2053.eurprd08.prod.outlook.com ([fe80::cd9d:80f1:82d8:5181]) by DB6PR0801MB2053.eurprd08.prod.outlook.com ([fe80::cd9d:80f1:82d8:5181%18]) with mapi id 15.01.1282.020; Tue, 25 Jul 2017 12:13:11 +0000 From: Wilco Dijkstra To: James Greenhalgh CC: GCC Patches , nd , Yvan Roux Subject: Re: [COMMITED][AArch64] Fix PR79041 Date: Tue, 25 Jul 2017 12:13:11 +0000 Message-ID: References: , <20170724170520.GC14816@arm.com> In-Reply-To: <20170724170520.GC14816@arm.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR08MB2660; 7:Ji2BjRnsCjPiWyoEVgZzeqB7aNN3naqLlZUzvuXSd30RyXMCcebGMRARKS28IrhmKJfETZLL+QdN8WdFXT2I7k/cxTqx/6BPJOl5GCgNTpk++4lKmoloULKS2a2IVo7BZtOOt1pTTsBaHCeSqi3agz/N2MrZcZ1ZPm+t+PwcGJjULJyFo0iGGB8zU4J0kmwUygccCcMeXoybfgOdRkYCHER1pLq7NjfufnO2GHk7UF8iro3C+OChe9b4sJguZl1KJ1pzIqZJa91lesRW9T1XarXZA60jbOXBEJufuW/j3xPhPO/AZOAsdNUB5xUKs9d1CSpnQiHe+gwCwuYWPNEqCM+3591JKQavvmIoD7HMLVTIQdrRabgtD07uhgEOl48ue2R6FTQw0DcBv2o9fOqFcJiotBQyIMXnri9n791za3O8AF2CSDjQyqO1rnwX8KhV5oMr9gndjQ1qqmxVoDWckV6DC7lsGofeSekM0xnlCpYnBnzvfEcOcUjwHebKuUnyVIq73hU72t2iz/2KBEhNPThZlv15YBJWTVnEB6Saac+Df4ouHQy/qYgVJlBnAB5Rt0OK7Pox8ioCr+aF/MfkkUw6rgJv1dP+i+x1iu/6zPhIuu7cZ8i7Rj2A1yLQilkNlEsbmWyXAZTIFqD4krVE+TQPqzf9qG3y6Nw27JulebxkAoqc0L01gHI2N9x+S3919vd02REsR/TXNjhU9QO3KYYi9YJZYruoFQRNvhreKbc2Ili5xIQM0hnrHS6XXuQQ6XOskcAj2tU+RkVRHZq+gAAMXxi+fKzVY5PcS9fIWxo= x-ms-office365-filtering-correlation-id: 0fc9e935-ad19-4208-101b-08d4d35684e5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(48565401081)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:AM4PR08MB2660; x-ms-traffictypediagnostic: AM4PR08MB2660: nodisclaimer: True x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM4PR08MB2660; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM4PR08MB2660; x-forefront-prvs: 03793408BA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39410400002)(39850400002)(39860400002)(39450400003)(39840400002)(189002)(199003)(24454002)(9686003)(33656002)(102836003)(305945005)(38730400002)(6116002)(5660300001)(6246003)(110136004)(68736007)(54906002)(99286003)(86362001)(55016002)(3846002)(53936002)(6436002)(7736002)(5250100002)(4326008)(66066001)(7696004)(74316002)(189998001)(81156014)(97736004)(93886004)(81166006)(54356999)(76176999)(8676002)(72206003)(14454004)(6636002)(2906002)(8936002)(50986999)(229853002)(6862004)(25786009)(101416001)(478600001)(2950100002)(105586002)(3280700002)(106356001)(6506006)(2900100001)(3660700001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR08MB2660; H:DB6PR0801MB2053.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2017 12:13:11.5085 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2660 James Greenhalgh wrote: > > OK. Either like this, or with the conditions swapped around as Yvan > suggested to make backporting easier. I swapped the conditions around, not sure whether it helps... Also I needed an additional scan-assembler, this was committed to trunk and GCC7: diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index d7fab3775c06477365217e357b5754026d09752b..7713d543af788d47dcdf8ea89482a2d4f66a1344 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -10181,7 +10181,7 @@ aarch64_classify_symbol (rtx x, rtx offset) /* This is alright even in PIC code as the constant pool reference is always PC relative and within the same translation unit. */ - if (CONSTANT_POOL_ADDRESS_P (x)) + if (!aarch64_pcrelative_literal_loads && CONSTANT_POOL_ADDRESS_P (x)) return SYMBOL_SMALL_ABSOLUTE; else return SYMBOL_FORCE_TO_MEM; diff --git a/gcc/testsuite/gcc.target/aarch64/pr79041-2.c b/gcc/testsuite/gcc.target/aarch64/pr79041-2.c new file mode 100644 index 0000000000000000000000000000000000000000..cd34fbab85a92d00cba7091d4146deaaf3a862a9 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr79041-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mcmodel=large -mpc-relative-literal-loads" } */ + +__int128 +t (void) +{ + return (__int128)1 << 80; +} + +/* { dg-final { scan-assembler "adr" } } */ +/* { dg-final { scan-assembler-not "adrp" } } */