From patchwork Fri Jun 17 22:24:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 637319 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 3rWZYq0YXQz9syB for ; Sat, 18 Jun 2016 08:24:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=UIXuPZWn; 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:date :message-id:from:to:subject; q=dns; s=default; b=hcUsm43W/YHhAIy ruh67xIG8IVudcFsoSQlgyT5trSRiHSCdKO/lxXvP3ZwSXp9v7rp5FrJFqEG0AvU 9E0LVcpEY1sn7129hYEPuKDxtnPIsqeJwgspAjuRhVUJZ5IvoSffso7jjZs6r+Ul 7/hwuHWA4wWdy25QHVzalCY4DOKI= 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; s=default; bh=BT5Cvk8C54qp6ojcZi1Ks p/Uwxw=; b=UIXuPZWnIRmGrV0UrpsOxpgtvHGDO1MP6QSBVPzlPub+OP8FarKHq /kEguwZc4Uq2efGu/3qXgXTQoUomaINADM243hiQy6BaqxqV6AX6yDUorFPPOaS6 4lbnjMEabw+0C1MeaZYIbgBXeJugrktKaamDBenxSmldDckhXX7mR8= Received: (qmail 120470 invoked by alias); 17 Jun 2016 22:24:40 -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 120459 invoked by uid 89); 17 Jun 2016 22:24:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=aa, AA, ni X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 17 Jun 2016 22:24:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A8EF81117 for ; Fri, 17 Jun 2016 22:24:27 +0000 (UTC) Received: from greed.delorie.com (ovpn-116-34.phx2.redhat.com [10.3.116.34]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5HMOQNT012544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 17 Jun 2016 18:24:27 -0400 Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.14.7/8.14.7) with ESMTP id u5HMOQvF022115 for ; Fri, 17 Jun 2016 18:24:26 -0400 Date: Fri, 17 Jun 2016 18:24:26 -0400 Message-Id: From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: [target/71338]: enable mulu for RL78/G10 X-IsSubscribed: yes Reverts https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01538.html - G10 supports MULU but not other multiplication methods. Committed. PR target/71338 * config/rl78/rl78-expand.c (umulqihi3): Enable for G10. * config/rl78/rl78-virtual.c (umulhi3_shift_virt): Likewise. (umulqihi3_virt): Likewise. * config/rl78/rl78-real.c (umulhi3_shift_real): Likewise. (umulqihi3_real): Likewise. Index: gcc/config/rl78/rl78-expand.md =================================================================== --- gcc/config/rl78/rl78-expand.md (revision 237565) +++ gcc/config/rl78/rl78-expand.md (working copy) @@ -156,13 +156,13 @@ ) (define_expand "umulqihi3" [(set (match_operand:HI 0 "register_operand") (mult:HI (zero_extend:HI (match_operand:QI 1 "register_operand")) (zero_extend:HI (match_operand:QI 2 "register_operand"))))] - "!TARGET_G10" + "" "" ) (define_expand "andqi3" [(set (match_operand:QI 0 "rl78_nonimmediate_operand") (and:QI (match_operand:QI 1 "rl78_general_operand") Index: gcc/config/rl78/rl78-real.md =================================================================== --- gcc/config/rl78/rl78-real.md (revision 237565) +++ gcc/config/rl78/rl78-real.md (working copy) @@ -176,23 +176,23 @@ ) (define_insn "*umulhi3_shift_real" [(set (match_operand:HI 0 "register_operand" "=A,A") (mult:HI (match_operand:HI 1 "rl78_nonfar_operand" "0,0") (match_operand:HI 2 "rl78_24_operand" "N,i")))] - "rl78_real_insns_ok () && !TARGET_G10" + "rl78_real_insns_ok ()" "@ shlw\t%0, 1 shlw\t%0, 2" ) (define_insn "*umulqihi3_real" [(set (match_operand:HI 0 "nonimmediate_operand" "=A") (mult:HI (zero_extend:HI (match_operand:QI 1 "general_operand" "%a")) (zero_extend:HI (match_operand:QI 2 "general_operand" "x"))))] - "rl78_real_insns_ok () && !TARGET_G10" + "rl78_real_insns_ok ()" "mulu\t%2" ) (define_insn "*andqi3_real" [(set (match_operand:QI 0 "rl78_nonimmediate_operand" "=WsfWsaWhlWab,A,R,vWsa") (and:QI (match_operand:QI 1 "rl78_general_operand" "%0,0,0,0") Index: gcc/config/rl78/rl78-virt.md =================================================================== --- gcc/config/rl78/rl78-virt.md (revision 237565) +++ gcc/config/rl78/rl78-virt.md (working copy) @@ -113,22 +113,22 @@ ) (define_insn "*umulhi3_shift_virt" [(set (match_operand:HI 0 "register_operand" "=v") (mult:HI (match_operand:HI 1 "rl78_nonfar_operand" "%vim") (match_operand:HI 2 "rl78_24_operand" "Ni")))] - "rl78_virt_insns_ok () && !TARGET_G10" + "rl78_virt_insns_ok ()" "v.mulu\t%0, %1, %2" [(set_attr "valloc" "umul")] ) (define_insn "*umulqihi3_virt" [(set (match_operand:HI 0 "register_operand" "=v") (mult:HI (zero_extend:HI (match_operand:QI 1 "rl78_nonfar_operand" "%vim")) (zero_extend:HI (match_operand:QI 2 "general_operand" "vim"))))] - "rl78_virt_insns_ok () && !TARGET_G10" + "rl78_virt_insns_ok ()" "v.mulu\t%0, %2" [(set_attr "valloc" "umul")] ) (define_insn "*andqi3_virt" [(set (match_operand:QI 0 "rl78_nonimmediate_operand" "=vm, *Wfr, vY")