This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


"Maciej W. Rozycki" <macro@ds2.pg.gda.pl> writes:
>  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.

The decision about whether to use multiplication or shifts is
controlled by mips_rtx_costs.  It sounds like we might need an
R4000 clause there.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]