head: MIPS: Complete the R4000 multiply/shift errata workaround

Maciej W. Rozycki macro@ds2.pg.gda.pl
Mon Mar 1 16:14:00 GMT 2004


On Sat, 28 Feb 2004, Richard Sandiford wrote:

> I adjusted this for the new macro names.  Bootstrapped & regression
> tested on mips-sgi-irix6.5, applied to trunk.

 I've noticed that when multiplying by a constant when mulsidi3/umulsidi3
would be used for a 64-bit target without the workaround, muldi3 is not
used and a series of shifts, additions and subtractions is used.  While
for constants with few bits set it's typically faster than an equivalent
multiplication instruction, it's a loss for more complicated cases as the
execution time becomes close to or even longer and the increased size of
code and the resulting cache consumption has to be taken into account.

 Thus I'd like to get back to this issue in the future and perhaps revive 
the use of multiplication instructions in one fashion or another here.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



More information about the Gcc-patches mailing list