From patchwork Tue Jul 28 20:37:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 501470 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 012A6140D2E for ; Wed, 29 Jul 2015 06:37:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=DI78yAq+; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=oJYtm0HVQ4YhNBG+ P30dVau7O2YqR/8FQUtohHU+yPFHJ19nnEsjHYz3yPTFaoxTWaQWajzk2un77CWq u0YDyV/R97QWqPG+pebymHR3mDwhUMX10iCfE0rR0Aqn3nqlM9JYPji/hqBw+myt rqFvUshMgCHnTa0/AVQtiVgxRTo= 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:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=rBxzN5OVm9utXBuCyOt2c7 kM2Mk=; b=DI78yAq+joKuTw/uySF+iDIyU8fcSegsZklbgKOdk+ooK8TeXuCgPZ iKankM7hZ+J/YGWl1uYaxjS9V8JigNVFyPm3vJXKXgONz/Uq5bvWmN47JFkF06V7 mxkkv4QxH+uxkTtVKoMTDfHPLDHR/Q7Su7TyIbEpNtqR554SkxhRc= Received: (qmail 336 invoked by alias); 28 Jul 2015 20:37:28 -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 323 invoked by uid 89); 28 Jul 2015 20:37:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=no version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Jul 2015 20:37:26 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-36-iPRax8YKSHiRqKNB9uDZpw-1; Tue, 28 Jul 2015 21:37:22 +0100 Received: from localhost ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 28 Jul 2015 21:37:21 +0100 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [committed] Use target-insns.def for reload_load_address Date: Tue, 28 Jul 2015 21:37:22 +0100 Message-ID: <87mvygm325.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-MC-Unique: iPRax8YKSHiRqKNB9uDZpw-1 Bootstrapped & regression-tested on x86_64-linux-gnu and aarch64-linux-gnu. Also tested via config-list.mk. Committed as preapproved. Thanks, Richard gcc/ * target-insns.def (reload_load_address): New targetm instruction pattern. * reload1.c (gen_reload): Use it instead of HAVE_*/gen_* interface. Index: gcc/target-insns.def =================================================================== --- gcc/target-insns.def 2015-06-28 12:29:34.245633312 +0100 +++ gcc/target-insns.def 2015-06-28 12:30:58.298088971 +0100 @@ -61,6 +61,7 @@ DEF_TARGET_INSN (probe_stack, (rtx x0)) DEF_TARGET_INSN (probe_stack_address, (rtx x0)) DEF_TARGET_INSN (prologue, (void)) DEF_TARGET_INSN (ptr_extend, (rtx x0, rtx x1)) +DEF_TARGET_INSN (reload_load_address, (rtx x0, rtx x1)) DEF_TARGET_INSN (restore_stack_block, (rtx x0, rtx x1)) DEF_TARGET_INSN (restore_stack_function, (rtx x0, rtx x1)) DEF_TARGET_INSN (restore_stack_nonlocal, (rtx x0, rtx x1)) Index: gcc/reload1.c =================================================================== --- gcc/reload1.c 2015-06-27 17:11:38.224086135 +0100 +++ gcc/reload1.c 2015-06-28 12:29:34.245633312 +0100 @@ -8813,10 +8813,8 @@ gen_reload (rtx out, rtx in, int opnum, mark_jump_label (in, tem, 0); } -#ifdef HAVE_reload_load_address - else if (HAVE_reload_load_address) - emit_insn (gen_reload_load_address (out, in)); -#endif + else if (targetm.have_reload_load_address ()) + emit_insn (targetm.gen_reload_load_address (out, in)); /* Otherwise, just write (set OUT IN) and hope for the best. */ else