From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29401 invoked by alias); 16 Mar 2007 23:23:49 -0000 Received: (qmail 29385 invoked by uid 22791); 16 Mar 2007 23:23:48 -0000 X-Spam-Check-By: sourceware.org Received: from hiauly1.hia.nrc.ca (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Mar 2007 23:23:44 +0000 Received: from hiauly1.hia.nrc.ca (hiauly1.hia.nrc.ca [127.0.0.1] (may be forged)) by hiauly1.hia.nrc.ca (8.13.7/8.13.7) with ESMTP id l2GNNfED026718; Fri, 16 Mar 2007 18:23:41 -0500 (EST) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.13.7/8.13.7/Submit) id l2GNNeau026717; Fri, 16 Mar 2007 19:23:40 -0400 (EDT) Message-Id: <200703162323.l2GNNeau026717@hiauly1.hia.nrc.ca> Subject: Re: [committed] Fix long local calls on PA HP-UX SOM target To: dave@hiauly1.hia.nrc.ca (John David Anglin) Date: Sat, 17 Mar 2007 00:31:00 -0000 From: "John David Anglin" Cc: gcc-patches@gcc.gnu.org In-Reply-To: from "John David Anglin" at Mar 9, 2007 08:58:55 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg01156.txt.bz2 > To fix this, we need to use the "LONG_PIC_SDIFF" sequence which uses > a difference of labels. GAS does handle this correctly. Sigh, I messed up on this one. GAS does *not* handle local calls using this sequence. Tested on hppa2.0w-hp-hpux11.11 and hppa-unknown-linux-gnu. Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) 2007-03-16 John David Anglin * pa.c (attr_length_call): Partially revert change of 2007-03-09. (output_call): Likewise. Index: config/pa/pa.c =================================================================== --- config/pa/pa.c (revision 122960) +++ config/pa/pa.c (working copy) @@ -7271,7 +7271,7 @@ length += 12; /* long pc-relative branch sequence. */ - else if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call)) + else if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) || (TARGET_64BIT && !TARGET_GAS) || (TARGET_GAS && !TARGET_SOM && (TARGET_LONG_PIC_PCREL_CALL || local_call))) @@ -7384,7 +7384,7 @@ of increasing length and complexity. In most cases, they don't allow an instruction in the delay slot. */ if (!((TARGET_LONG_ABS_CALL || local_call) && !flag_pic) - && !(TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call)) + && !(TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) && !(TARGET_GAS && !TARGET_SOM && (TARGET_LONG_PIC_PCREL_CALL || local_call)) && !TARGET_64BIT) @@ -7432,7 +7432,7 @@ } else { - if ((TARGET_SOM && (TARGET_LONG_PIC_SDIFF_CALL || local_call)) + if ((TARGET_SOM && TARGET_LONG_PIC_SDIFF_CALL) || (TARGET_64BIT && !TARGET_GAS)) { /* The HP assembler and linker can handle relocations