From patchwork Sat Sep 20 17:52:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 391535 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 AE0A514012C for ; Sun, 21 Sep 2014 03:52:24 +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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=m4WDT6XdxRN+TQI6nu za2tAr56VoGnUzdFMdXJG6I7ArIMyWftvA4d/SNwHINRAnJm8vAg4v0MRfenh+9i eoValV9mACv+0YXPlQyk4vRj8XoF926aO35inTgCxTUQu/26Xk/Id3uG6X9YMv7B WwmS1DnKkfc8y5RMBQ2ACd270= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=/08URi+LTmZbW4JjbgBcPDyY HZU=; b=HJv7bCvNFSOYAYFIDk9s+aLjMI7J8kToSBtGchebT7WH38AypONjrOOZ A1/jr3K+Qio509woB79Pzg2zLR+eMgSnwrs7RNb6EvvseqWNod40khhevXdG9Wyo UV31uyrcd3jak2H1fwQG/l+FPvKl7vMXWlK1wFxvYocw9mkMG8Q= Received: (qmail 28167 invoked by alias); 20 Sep 2014 17:52:17 -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 28154 invoked by uid 89); 20 Sep 2014 17:52:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f179.google.com Received: from mail-we0-f179.google.com (HELO mail-we0-f179.google.com) (74.125.82.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 20 Sep 2014 17:52:14 +0000 Received: by mail-we0-f179.google.com with SMTP id u56so1094159wes.10 for ; Sat, 20 Sep 2014 10:52:11 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.93.99 with SMTP id ct3mr4655400wib.0.1411235531172; Sat, 20 Sep 2014 10:52:11 -0700 (PDT) Received: by 10.27.175.134 with HTTP; Sat, 20 Sep 2014 10:52:11 -0700 (PDT) In-Reply-To: References: <1478265243.5697739.1400792508558.JavaMail.zimbra@redhat.com> <20140915004309.GA29543@gate.crashing.org> <95EF5F55-098D-49F3-B6E6-79C1316D5148@comcast.net> <541708CF.2000708@redhat.com> <52368B3D-91AD-44CC-B451-9BEC03189625@gmail.com> <99F31408-76FF-4A10-8223-1BDE6EA981BB@gmail.com> Date: Sat, 20 Sep 2014 19:52:11 +0200 Message-ID: Subject: Re: [patch i386]: Sibcall tail-call improvement and partial fix PR/60104 From: Kai Tietz To: FX Cc: Jeff Law , Iain Sandoe , Mike Stump , Kai Tietz , GCC Patches , Richard Henderson , Jan Hubicka , Uros Bizjak X-IsSubscribed: yes Hi FX, I missed that op points still on the memory here. So corrected patch is inlined below. Kai Index: predicates.md =================================================================== --- predicates.md (Revision 215364) +++ predicates.md (Arbeitskopie) @@ -73,9 +73,18 @@ ;; Return true if OP is a memory operands that can be used in sibcalls. (define_predicate "sibcall_memory_operand" - (and (match_operand 0 "memory_operand") - (match_test "CONSTANT_P (XEXP (op, 0))"))) + (match_operand 0 "memory_operand") +{ + op = XEXP (op, 0); + if (TARGET_MACHO && TARGET_64BIT + && GET_CODE (op) == CONST + && GET_CODE (XEXP (op, 0)) == UNSPEC + && XINT (XEXP (op, 0), 1) == UNSPEC_GOTPCREL) + return false; + return CONSTANT_P (op); +}) + ;; Match an SI or HImode register for a zero_extract. (define_special_predicate "ext_register_operand" (match_operand 0 "register_operand")