From patchwork Mon Feb 2 04:51:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hurugalawadi, Naveen" X-Patchwork-Id: 435348 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 DCC51140290 for ; Mon, 2 Feb 2015 15:52:02 +1100 (AEDT) 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:content-type:mime-version; q=dns; s=default; b=dnaO/rWkv+FZXBT94ID8IEi7UYJdrtrAuuzFehMlHAP5qNCjZm f7dLBcLWEb5OEheBWpNBHKnS/Vl2JCznR9LikGHYrl2jqSOA/BBHFB0SHYOZoy5B tjTBuzlp8b3A2ow1hHetukwidBj2gSShI1HVm3vDbhf0nSP/J5UgZTI90= 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:content-type:mime-version; s= default; bh=KJ3158bNCZECaXqp//6RhgvTPpw=; b=fWtSZSDOfysbNC1ZYa1V PGWvFSWw81H2bjB2/YpOE2CcYMVbKWrL8bLmss/lCpxn22O9EvnfpKqOfdW5okry uK71sXcca3uSNOQ7CNhrj2cXyPEmJ0W96lwXwHAxNH957hVQjxxzx3lgTm880FTk e5GRTemzruu9U29FfOmp1MM= Received: (qmail 22540 invoked by alias); 2 Feb 2015 04:51:35 -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 22527 invoked by uid 89); 2 Feb 2015 04:51:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: na01-by2-obe.outbound.protection.outlook.com Received: from mail-by2on0072.outbound.protection.outlook.com (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.100.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Mon, 02 Feb 2015 04:51:32 +0000 Received: from SN2PR0701MB1024.namprd07.prod.outlook.com (25.160.57.150) by BY1PR0701MB1240.namprd07.prod.outlook.com (25.160.105.18) with Microsoft SMTP Server (TLS) id 15.1.65.19; Mon, 2 Feb 2015 04:51:27 +0000 Received: from SN2PR0701MB1024.namprd07.prod.outlook.com ([25.160.57.150]) by SN2PR0701MB1024.namprd07.prod.outlook.com ([25.160.57.150]) with mapi id 15.01.0075.002; Mon, 2 Feb 2015 04:51:27 +0000 From: "Hurugalawadi, Naveen" To: "gcc-patches@gcc.gnu.org" CC: "Pinski, Andrew" Subject: [PATCH, AArch64] Handle SYMBOL_SMALL_TPREL appropriately Date: Mon, 2 Feb 2015 04:51:27 +0000 Message-ID: <1422852769059.53654@caviumnetworks.com> authentication-results: caviumnetworks.com; dkim=none (message not signed) header.d=none; x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1240; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1240; x-forefront-prvs: 0475418F50 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(377424004)(164054003)(2351001)(99286002)(36756003)(40100003)(46102003)(102836002)(110136001)(62966003)(106116001)(77156002)(66066001)(229853001)(2656002)(92566002)(19580395003)(122556002)(54356999)(87936001)(99936001)(86362001)(2900100001)(50986999)(117636001)(19580405001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1240; H:SN2PR0701MB1024.namprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2015 04:51:27.1594 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1240 Hi, Please find attached the patch that handles the operations on SYMBOL_SMALL_TPREL appropriately. It fixes gcc.dg/tls/opt-11.c regression on ilp32. Please review the patch and let us know if its okay? Regression tested on aarch64-elf. Thanks, Naveen 2015-02-02 Andrew Pinski Naveen H.S * config/aarch64/aarch64.c (*aarch64_load_symref_appropriately): Check whether the destination of SYMBOL_SMALL_TPREL is Pmode. Index: gcc/config/aarch64/aarch64.c =================================================================== --- gcc/config/aarch64/aarch64.c (revision 220343) +++ gcc/config/aarch64/aarch64.c (working copy) @@ -956,6 +956,10 @@ case SYMBOL_SMALL_TPREL: { rtx tp = aarch64_load_tp (NULL); + + if (GET_MODE (dest) != Pmode) + tp = gen_lowpart (GET_MODE (dest), tp); + emit_insn (gen_tlsle_small (dest, tp, imm)); set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return;