From patchwork Fri Nov 12 03:06:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 70918 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 CA48CB7144 for ; Fri, 12 Nov 2010 14:07:11 +1100 (EST) Received: (qmail 29987 invoked by alias); 12 Nov 2010 03:07:07 -0000 Received: (qmail 29978 invoked by uid 22791); 12 Nov 2010 03:07:06 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Nov 2010 03:07:02 +0000 Received: from are.twiddle.net (are.twiddle.net [75.101.38.216]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id oAC3701u007754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Nov 2010 19:07:00 -0800 Received: from are.twiddle.net (localhost [127.0.0.1]) by are.twiddle.net (8.14.4/8.14.4) with ESMTP id oAC36xxS014828; Thu, 11 Nov 2010 19:06:59 -0800 Received: (from rth@localhost) by are.twiddle.net (8.14.4/8.14.4/Submit) id oAC36xiQ014826; Thu, 11 Nov 2010 19:06:59 -0800 Date: Thu, 11 Nov 2010 19:06:59 -0800 From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: aoliva@redhat.com, nickc@redhat.com Subject: [patch 10/N][am33] convert to fma Message-ID: <20101112030659.GA14773@twiddle.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 The mn10300 documentation that I have does not contain these instructions, so please double-check the definition of the fnmadd instruction. r~ diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index 9f2fc9f..1028357 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -2866,11 +2866,11 @@ ] ) -(define_insn "fmaddsf4" - [(set (match_operand:SF 0 "register_operand" "=A") - (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "%f") - (match_operand:SF 2 "register_operand" "f")) - (match_operand:SF 3 "register_operand" "f"))) +(define_insn "fmasf4" + [(set (match_operand:SF 0 "register_operand" "=A") + (fma:SF (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f") + (match_operand:SF 3 "register_operand" "f"))) (clobber (reg:CC_FLOAT CC_REG)) ] "TARGET_AM33_2" @@ -2879,11 +2879,11 @@ (const_int 17) (const_int 24)))] ) -(define_insn "fmsubsf4" - [(set (match_operand:SF 0 "register_operand" "=A") - (minus:SF (mult:SF (match_operand:SF 1 "register_operand" "%f") - (match_operand:SF 2 "register_operand" "f")) - (match_operand:SF 3 "register_operand" "f"))) +(define_insn "fmssf4" + [(set (match_operand:SF 0 "register_operand" "=A") + (fma:SF (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f") + (neg:SF (match_operand:SF 3 "register_operand" "f")))) (clobber (reg:CC_FLOAT CC_REG)) ] "TARGET_AM33_2" @@ -2892,11 +2892,11 @@ (const_int 17) (const_int 24)))] ) -(define_insn "fnmaddsf4" - [(set (match_operand:SF 0 "register_operand" "=A") - (minus:SF (match_operand:SF 3 "register_operand" "f") - (mult:SF (match_operand:SF 1 "register_operand" "%f") - (match_operand:SF 2 "register_operand" "f")))) +(define_insn "fnmasf4" + [(set (match_operand:SF 0 "register_operand" "=A") + (fma:SF (neg:SF (match_operand:SF 1 "register_operand" "f")) + (match_operand:SF 2 "register_operand" "f") + (match_operand:SF 3 "register_operand" "f"))) (clobber (reg:CC_FLOAT CC_REG)) ] "TARGET_AM33_2" @@ -2905,11 +2905,11 @@ (const_int 17) (const_int 24)))] ) -(define_insn "fnmsubsf4" - [(set (match_operand:SF 0 "register_operand" "=A") - (minus:SF (neg:SF (mult:SF (match_operand:SF 1 "register_operand" "%f") - (match_operand:SF 2 "register_operand" "f"))) - (match_operand:SF 3 "register_operand" "f"))) +(define_insn "fnmssf4" + [(set (match_operand:SF 0 "register_operand" "=A") + (fma:SF (neg:SF (match_operand:SF 1 "register_operand" "f")) + (match_operand:SF 2 "register_operand" "f") + (neg:SF (match_operand:SF 3 "register_operand" "f")))) (clobber (reg:CC_FLOAT CC_REG)) ] "TARGET_AM33_2"