From patchwork Fri May 31 15:40:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Shawcroft X-Patchwork-Id: 247976 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 7F2752C0090 for ; Sat, 1 Jun 2013 01:40:31 +1000 (EST) 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:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=tc++5rJyZeZVuAPdTogjuCGdDPW/xMw+H4DPXlrrqiXWD2 H12fuarlD5IzzsbTE4IOw6Dx50A0MswuOFTpIFpe3k+81dcfqm/YR4A3Q5BroG9z QaKs5anhry9P/Fg1hIo9ORNIklu92f/6YwCcwKWvWW0QOmgjVCn3sXvAskR40= 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:date:from:mime-version:to:subject:content-type; s= default; bh=hhiseZtOP3NNuXLf5a+aXyZJ2Cs=; b=KVrhbDgW3GIS3L95REjl tXJ/arS8MylySm6nR68GZ9iRWNz7B+WZK9Y34Km0zGkV+0tPbxkiAEEBze+KqE5+ j91HKZYikxyngBNrs2as5fCgfbuRVQnvmtAIxKlZu1UqQ4EFI07e4BQZERWvCRFf oJqLcfo+O6gW2cPsHelEohs= Received: (qmail 18039 invoked by alias); 31 May 2013 15:40:25 -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 18019 invoked by uid 89); 31 May 2013 15:40:21 -0000 X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.1 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 31 May 2013 15:40:20 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 31 May 2013 16:40:17 +0100 Received: from [10.1.207.36] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 31 May 2013 16:40:16 +0100 Message-ID: <51A8C460.2090906@arm.com> Date: Fri, 31 May 2013 16:40:16 +0100 From: Marcus Shawcroft User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [PATCH, AArch64] -mcmodel=tiny -fPIC use tiny absolute for non binds local. X-MC-Unique: 113053116401709701 X-Virus-Found: No This change allows -mcmodel=tiny -fPIC to use tiny addressing instead of small for none GOT accesses. Regressed for aarch64-none-elf with -mcmodel=tiny and -mcmodel=tiny -fPIC Applied. /Marcus 2013-05-31 Marcus Shawcroft * config/aarch64/aarch64.c (aarch64_classify_symbol): Use SYMBOL_TINY_ABSOLUTE for AARCH64_CMODEL_TINY_PIC. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index a9e754c..7d975fd 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -5073,6 +5073,10 @@ aarch64_classify_symbol (rtx x, return SYMBOL_SMALL_ABSOLUTE; case AARCH64_CMODEL_TINY_PIC: + if (!aarch64_symbol_binds_local_p (x)) + return SYMBOL_SMALL_GOT; + return SYMBOL_TINY_ABSOLUTE; + case AARCH64_CMODEL_SMALL_PIC: if (!aarch64_symbol_binds_local_p (x)) return SYMBOL_SMALL_GOT;