From patchwork Wed Aug 1 20:36:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174597 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]) by ozlabs.org (Postfix) with SMTP id B36CF2C007C for ; Thu, 2 Aug 2012 06:36:31 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1344458192; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:Message-Id:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=ad76aS4rAxEE+wchV8XeK29GGLs=; b=phWiHQ+y0aVcue7 3mmtL42aXG0OLfrmlKo25KdQKbnUNd+rNcWyaYpfyyhnQx9EaDePn1LgTWzwcLY6 BaYIS0lqISvLwmZdqVi9KOBA4mDwUYhAH/BhjEyjEc1fGo02dI61GnlUeM2Uds02 t+qiN9IyNgU2tMoh/8xhiipObHlQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:Message-Id:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=dYC+Z+YllR7ZHI4zOyRuglC+4tDrpX9bJAWBrUJ9+A3D+HoLHdZ6iKXBa91oBB GIQTFO/yyNj1KylQCPj4nDU2IM/YxK4FqdIlz+4HkcOLMTywwDTpcQanIyFOZFRi 0n3fcePPGj+SHP9l14tu+m9xs0GwGtrXTZgw7CUrUC9eg=; Received: (qmail 6320 invoked by alias); 1 Aug 2012 20:36:25 -0000 Received: (qmail 6192 invoked by uid 22791); 1 Aug 2012 20:36:24 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Aug 2012 20:36:10 +0000 Received: by pbbrq2 with SMTP id rq2so1587851pbb.20 for ; Wed, 01 Aug 2012 13:36:10 -0700 (PDT) Received: by 10.68.234.6 with SMTP id ua6mr55184959pbc.117.1343853370066; Wed, 01 Aug 2012 13:36:10 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id oy8sm3226485pbc.52.2012.08.01.13.36.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Aug 2012 13:36:09 -0700 (PDT) From: Richard Henderson To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] m32c: Don't use set_optab_handler Date: Wed, 1 Aug 2012 13:36:00 -0700 Message-Id: <1343853361-21574-1-git-send-email-rth@redhat.com> X-IsSubscribed: yes 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 Committed after a build completed. r~ * config/m32c/m32c.c (TARGET_INIT_LIBFUNCS): Remove. (m32c_init_libfuncs): Remove. * config/m32c/cond.md (cstore4_16): Rename from cstore4. (cstore4): New expander. diff --git a/gcc/config/m32c/cond.md b/gcc/config/m32c/cond.md index c751070..5886a7d 100644 --- a/gcc/config/m32c/cond.md +++ b/gcc/config/m32c/cond.md @@ -152,14 +152,31 @@ ;; These are the pre-split patterns for the conditional sets. -(define_insn_and_split "cstore4" +(define_expand "cstore4" + [(set (match_operand:QI 0 "register_operand") + (match_operator:QI 1 "ordered_comparison_operator" + [(match_operand:QHPSI 2 "mra_operand") + (match_operand:QHPSI 3 "mrai_operand")]))] + "" +{ + if (TARGET_A24) + { + rtx o = gen_reg_rtx (HImode); + emit_insn (gen_cstore4_24 (o, operands[1], + operands[2], operands[3])); + emit_move_insn (operands[0], gen_lowpart (QImode, o)); + DONE; + } +}) + +(define_insn_and_split "*cstore4_16" [(set (match_operand:QI 0 "register_operand" "=Rqi") (match_operator:QI 1 "ordered_comparison_operator" [(match_operand:QHPSI 2 "mra_operand" "RraSd") (match_operand:QHPSI 3 "mrai_operand" "RraSdi")]))] "TARGET_A16" "#" - "reload_completed" + "&& reload_completed" [(set (reg:CC FLG_REGNO) (compare (match_dup 2) (match_dup 3))) @@ -176,7 +193,7 @@ (match_operand:QHPSI 3 "mrai_operand" "RraSdi")]))] "TARGET_A24" "#" - "reload_completed" + "&& reload_completed" [(set (reg:CC FLG_REGNO) (compare (match_dup 2) (match_dup 3))) diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 79b03fa..878be09 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -1857,25 +1857,6 @@ m32c_trampoline_init (rtx m_tramp, tree fndecl, rtx chainval) #undef A0 } -/* Implicit Calls to Library Routines */ - -#undef TARGET_INIT_LIBFUNCS -#define TARGET_INIT_LIBFUNCS m32c_init_libfuncs -static void -m32c_init_libfuncs (void) -{ - /* We do this because the M32C has an HImode operand, but the - M16C has an 8-bit operand. Since gcc looks at the match data - and not the expanded rtl, we have to reset the optab so that - the right modes are found. */ - if (TARGET_A24) - { - set_optab_handler (cstore_optab, QImode, CODE_FOR_cstoreqi4_24); - set_optab_handler (cstore_optab, HImode, CODE_FOR_cstorehi4_24); - set_optab_handler (cstore_optab, PSImode, CODE_FOR_cstorepsi4_24); - } -} - /* Addressing Modes */ /* The r8c/m32c family supports a wide range of non-orthogonal