Message ID | 1515106798.18339.7.camel@cavium.com |
---|---|
State | New |
Headers | show
Return-Path: <gcc-patches-return-470188-incoming=patchwork.ozlabs.org@gcc.gnu.org> 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-470188-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="RyikX4BC"; 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 3zCNYy2JB3z9s82 for <incoming@patchwork.ozlabs.org>; Fri, 5 Jan 2018 10:00:36 +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 :message-id:subject:from:reply-to:to:date:content-type :mime-version:content-transfer-encoding; q=dns; s=default; b=fUj mZnVvXxm9QOd7FrtAYhPeaZMTE38scwUlxrtkCKBqN+WHducEHd1UjnDEDn4MMdn 1rB6JQRMzlVBAnaPGv7ofcoZPYylMf3gb2JM4QozBPKmB6jIz1lzAf7UiwzeG4cy 5DLd1QUyQeeNY+rhdxnsPxzEDhan42fp5rg1unVU= 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 :message-id:subject:from:reply-to:to:date:content-type :mime-version:content-transfer-encoding; s=default; bh=eZhd8Mhlq ZZRb/N14EfDRKe3sFE=; b=RyikX4BCdgFDppGFfP/VtlydSmm4PDvaUTMAMgp8V eBXL/CEsd+oyHhNhRm9sXyXV75/fMqWnXoxx2CbDSMusbniyjDMr/MACh9UKAt5T qEOK9dAilAjSPjIV2k0EGmiH5KeKHrE9Q2ltLx0kEF1roNGzd6qy26u89rc2VSpW 34= Received: (qmail 95275 invoked by alias); 4 Jan 2018 23:00:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-patches.gcc.gnu.org> List-Unsubscribe: <mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-help@gcc.gnu.org> Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 95131 invoked by uid 89); 4 Jan 2018 23:00:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.9 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= X-HELO: NAM03-CO1-obe.outbound.protection.outlook.com Received: from mail-co1nam03on0061.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) (104.47.40.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Jan 2018 23:00:04 +0000 Received: from sellcey-dt.caveonetworks.com (50.233.148.156) by BY2PR0701MB2039.namprd07.prod.outlook.com (10.163.156.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Thu, 4 Jan 2018 23:00:01 +0000 Message-ID: <1515106798.18339.7.camel@cavium.com> Subject: [Patch][aarch64][PR target/83466] Fix SYMBOL_SMALL_TLSDESC address calculation in ILP32 mode From: Steve Ellcey <sellcey@cavium.com> Reply-To: sellcey@cavium.com To: gcc-patches <gcc-patches@gcc.gnu.org>, "james.greenhalgh" <james.greenhalgh@arm.com>, "richard.earnshaw" <richard.earnshaw@arm.com>, Marcus Shawcroft <Marcus.Shawcroft@arm.com>, Andreas Schwab <schwab@linux-m68k.org> Date: Thu, 04 Jan 2018 14:59:58 -0800 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: CY1PR07CA0018.namprd07.prod.outlook.com (10.166.202.28) To BY2PR0701MB2039.namprd07.prod.outlook.com (10.163.156.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6def2a76-a027-4ccf-f056-08d553c6e2bf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BY2PR0701MB2039; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2039; 3:iI4R3AHT9eTlg4QCrqe5bYg97YabCpWip51dwEu/DBumpK1lCs78IBTHGU1OMyXy+yugmEixnLFBtxBdTKw3KJKMGofmkxKQbsKfzoIGguDFgkPdDvjmykm7CILHv0cISRICiGjdJbFXqzgP3ReT4eWNa35Qf8K0lzS9H9xcgk7fuYyZ4XgBgC/ma4IUPpFSs1+QUqzRyl8DEI4uAZC2Ilyn4ZbalRcmgmorxVqWWuEiOADFI++7WegMz/0tEez0; 25:SfnuT3SX/5jfQbk/BOf3v3XKiLZF/m31XvYrxk5pXLqzpICASz2KSUJb9XmYGg4mIZqb7eH3VoHBUMajy48ba73vmRn3/rCnaOJTOB2ZYbm8bh6cAO/N7e8Rgc8qG845FeCxZZAL10h3NnejYlR5ULjm69ZFqz74Rp10uTsbXjsoqPeMFhC/k4DONQVbz0959bAzxSbjoSU7WeowxQ0Qg09DvP46SBAy//2u6o4xARcM6kkEZ217lbDIOk3NnVWc2qD3qzlfFLEpISZH92z82X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KXGNZEpG0P4obvIOuBGU2UoaScSCIAcxJInAfBcED3F7COY0WsDkfUKmqRc3UlGv1xv0JI0WqjMXrx750RcE+UVCAdPrlt9KK+RCuOt+ghw== X-Microsoft-Antispam-PRVS: <BY2PR0701MB2039828A7B472694C353B4B0F51F0@BY2PR0701MB2039.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(944501075)(3002001)(10201501046)(93006095)(93001095)(6041268)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:BY2PR0701MB2039; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0701MB2039; X-Forefront-PRVS: 054231DC40 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(396003)(39380400002)(376002)(377424004)(199004)(189003)(3846002)(25786009)(6116002)(66066001)(50466002)(7736002)(47776003)(305945005)(53936002)(316002)(8676002)(16526018)(53416004)(6486002)(386003)(59450400001)(72206003)(23676004)(6512007)(106356001)(81156014)(6506007)(6666003)(5660300001)(36756003)(81166006)(52116002)(97736004)(3450700001)(105586002)(110136005)(2870700001)(68736007)(8936002)(103116003)(2906002)(50226002)(43066004)(5820100001)(69596002)(478600001)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB2039; H:sellcey-dt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BBY2PR0701MB2039=3B23=3A1s?= =?utf-8?q?ydv7qZydidV1yFaC8jjw2TPJQ+yH3OpZsXf4rWa/aJLm5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YGxgOxfXIMC3xuOtyRYwYpHzyT3p6O3+v188rCG+QSyOfxkyR9Lsay1NT6ww65nDHP4LT2vpYhy6rt1R4gGU1wMTH3JPTd4efkOnBuJxfOBaGXZ0g9vVHnEYbdej0XJBf0CVs71KXbXJHU/N7zOg2j23miZ/VWAXC74OO+qjMYs5Ibdd80/We3fDh/ip4BSpnHzgdUb7Cmfoao SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2018 23:00:01.1121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6def2a76-a027-4ccf-f056-08d553c6e2bf X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0701MB2039 |
Series |
[aarch64,PR,target/83466] Fix SYMBOL_SMALL_TLSDESC address calculation in ILP32 mode
|
expand
|
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index a189605..e60fd1c 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -1540,7 +1540,7 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, case SYMBOL_SMALL_TLSDESC: { machine_mode mode = GET_MODE (dest); - rtx x0 = gen_rtx_REG (mode, R0_REGNUM); + rtx x0 = gen_rtx_REG (ptr_mode, R0_REGNUM); rtx tp; gcc_assert (mode == Pmode || mode == ptr_mode); @@ -1553,10 +1553,13 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, emit_insn (gen_tlsdesc_small_di (imm)); tp = aarch64_load_tp (NULL); - if (mode != Pmode) - tp = gen_lowpart (mode, tp); + if (GET_MODE (tp) != ptr_mode) + tp = gen_lowpart (ptr_mode, tp); + tp = gen_rtx_PLUS (ptr_mode, tp, x0); + if (mode != ptr_mode) + tp = gen_rtx_ZERO_EXTEND (mode, tp); + emit_insn (gen_rtx_SET (dest, tp)); - emit_insn (gen_rtx_SET (dest, gen_rtx_PLUS (mode, tp, x0))); if (REG_P (dest)) set_unique_reg_note (get_last_insn (), REG_EQUIV, imm); return;