Re: Multiply by a constant --> shift-and-adds algorithm?

n8tm@aol.com (N8TM)
11 Nov 1997 13:35:57 -0500

          From comp.compilers

Related articles
Multiply by a constant --> shift-and-adds algorithm? Vincent.Lefevre@ens-lyon.fr (Vincent Lefevre) (1997-11-07)
Re: Multiply by a constant --> shift-and-adds algorithm? rweaver@ix.netcom.com (1997-11-09)
Re: Multiply by a constant --> shift-and-adds algorithm? preston@cs.rice.edu (1997-11-09)
Re: Multiply by a constant --> shift-and-adds algorithm? ssolyanik@icdc.com (Sergey Solyanik) (1997-11-09)
Multiply by a constant --> shift-and-adds algorithm? txr@alumni.caltech.edu (Tim Rentsch) (1997-11-09)
Re: Multiply by a constant --> shift-and-adds algorithm? n8tm@aol.com (1997-11-11)
Re: Multiply by a constant --> shift-and-adds algorithm? dube@brachio.IRO.UMontreal.CA (Danny Dube) (1997-11-11)
Re: Multiply by a constant --> shift-and-adds algorithm? cdg@nullstone.com (Christopher Glaeser) (1997-11-13)
Re: Multiply by a constant --> shift-and-adds algorithm? ssolyanik@icdc.com (Sergey Solyanik) (1997-11-14)
Re: Multiply by a constant --> shift-and-adds algorithm? shankar@powertelglobal.com (Shankar Unni) (1997-11-15)
Multiply by a constant --> shift-and-adds algorithm? preston@tera.tera.com (1997-11-16)
Re: Multiply by a constant --> shift-and-adds algorithm? cdg@nullstone.com (Christopher Glaeser) (1997-11-18)
| List of all articles for this month |

From: n8tm@aol.com (N8TM)
Newsgroups: comp.compilers
Date: 11 Nov 1997 13:35:57 -0500
Organization: AOL http://www.aol.com
References: 97-11-051
Keywords: arithmetic, optimize

Don't most of the compilers attempt to minimize the use of additional
registers and additional analysis by just recording the steps which
would be taken in a software multiplication? We're only trying to
develop the short sequences which would be faster than the
multiplication instruction which most processors have nowadays. If I
want to generate more compact code, I'll compile for a PPC604 even
though I'm running on a 603, in which case gcc/g77 use shifts
sparingly. I haven't checked lately, but gcc used to perform strength
reduction more often when shift-add sequences were avoided.


Tim
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.