From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7290 invoked by alias); 22 Apr 2002 14:34:42 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7244 invoked from network); 22 Apr 2002 14:34:39 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 22 Apr 2002 14:34:39 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16zetk-0000z8-00; Mon, 22 Apr 2002 10:34:32 -0400 Date: Mon, 22 Apr 2002 07:38:00 -0000 From: Daniel Jacobowitz To: Daniel Glastonbury Cc: gcc@gcc.gnu.org Subject: Re: Teaching GCC about fmadd variant Message-ID: <20020422103432.A3593@nevyn.them.org> Mail-Followup-To: Daniel Glastonbury , gcc@gcc.gnu.org References: <082e01c1e9d6$197bc720$7d00a8c0@dang2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <082e01c1e9d6$197bc720$7d00a8c0@dang2> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-04/txt/msg01086.txt.bz2 On Mon, Apr 22, 2002 at 05:47:10PM +0930, Daniel Glastonbury wrote: > Hi, > I'm looking for some help in teaching gcc how to use the fmadd variants > that my mips has. Unlike the mips IV madd instruction, this mips has a > variant that goes something like this: > > mula fs, ft : ACC <- fs*ft > madda fs, ft : ACC <- ACC + fs*ft > madd fd, fs, ft: fd <- ACC + fs*ft > > The problem is there is no general way to move to/from the ACC register. (Over my head, but) do you still get reasonable benefit from this if you define simple-minded patterns to move from/to the accumulator? i.e.: load fs into ACC: load 1.0 into ft; mula fs, ft load ACC into fd: load 0.0 into ft; madd fd, ft, ft On the other hand, this won't help if you were actually seeing it use the ACC unnecessarily. I believe that would need to be worked around with costs. You're going to have problems with combine (discussed on one GCC list, probably this one, a few weeks ago) getting fmadd to work well, also. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer