From patchwork Tue Mar 26 06:48:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Walter Lee X-Patchwork-Id: 231093 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 018712C008D for ; Tue, 26 Mar 2013 17:49:15 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject:reply-to:mime-version:content-type; q=dns; s=default; b=IxHuk26wRe+dJ137QhRyuS0JhOC2cpo4B2T88cIAsTm w5SCpxIBUv0aiUiYEvQl58BZDIpsSvw3ZVr06Kq0OsTrkUE7d4xVC75iaodtSrYS Q7aK/6lPpdYK19/3aB4WTuIftaelPfPLCtS2tjR43li3GzVou+NFEbAjiacRU/NY = 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:date :message-id:from:to:subject:reply-to:mime-version:content-type; s=default; bh=JXxqhS1QF8vw9vZPBM1XFx8iuHs=; b=v1SCPMuRzQ/YBQUta yhlOmM7uql4KJRhkhTwsGAnsXvQuIYa0jLWHG5tNMjwgb/o3I2kzkSW1UERejBf1 vgG0CJiXruPP3OPBbwzHv5DV7VVbKta9sS9Mgm8WRZWHS6mqe1rmCiGDiQkPZIEy N3klT1OWNdnRW04q01DXkouwzc= Received: (qmail 27878 invoked by alias); 26 Mar 2013 06:49:05 -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 27843 invoked by uid 89); 26 Mar 2013 06:48:55 -0000 X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_EG autolearn=ham version=3.3.1 Received: from usmamail.tilera.com (HELO USMAMAIL.TILERA.COM) (12.216.194.151) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 26 Mar 2013 06:48:53 +0000 Received: from farm-0001.internal.tilera.com (10.2.0.31) by USMAEXCH2.tad.internal.tilera.com (10.3.0.33) with Microsoft SMTP Server (TLS) id 14.0.722.0; Tue, 26 Mar 2013 02:48:50 -0400 Received: (from walt@localhost) by farm-0001.internal.tilera.com (8.14.4/8.12.11/Submit) id r2Q6mopY016535; Tue, 26 Mar 2013 02:48:50 -0400 Date: Tue, 26 Mar 2013 02:48:50 -0400 Message-ID: <201303260648.r2Q6mopY016535@farm-0001.internal.tilera.com> From: Walter Lee To: Subject: [committed] TILE-Gx/TILEPro: use pc relative/indirect encoding in eh data Reply-To: Walter Lee MIME-Version: 1.0 This patch switches eh data to always use pc relative/indirect encoding, to avoid relocations of unaligned words. Backported to 4.7 and 4.8. * config/tilegx/tilegx.c (tilegx_asm_preferred_eh_data_format): Use indirect/pcrel encoding. * config/tilepro/tilepro.c (tilepro_asm_preferred_eh_data_format): Ditto. Index: gcc/config/tilegx/tilegx.c =================================================================== --- gcc/config/tilegx/tilegx.c (revision 197072) +++ gcc/config/tilegx/tilegx.c (working copy) @@ -4786,13 +4786,8 @@ tilegx_reorg (void) int tilegx_asm_preferred_eh_data_format (int code ATTRIBUTE_UNUSED, int global) { - if (flag_pic) - { - int type = TARGET_32BIT ? DW_EH_PE_sdata4 : DW_EH_PE_sdata8; - return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type; - } - else - return DW_EH_PE_absptr; + int type = TARGET_32BIT ? DW_EH_PE_sdata4 : DW_EH_PE_sdata8; + return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type; } Index: gcc/config/tilepro/tilepro.c =================================================================== --- gcc/config/tilepro/tilepro.c (revision 197072) +++ gcc/config/tilepro/tilepro.c (working copy) @@ -4338,10 +4338,7 @@ tilepro_reorg (void) int tilepro_asm_preferred_eh_data_format (int code ATTRIBUTE_UNUSED, int global) { - if (flag_pic) - return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4; - else - return DW_EH_PE_absptr; + return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4; }