This is the mail archive of the
mailing list for the GCC project.
Re: head: MIPS: Complete the R4000 multiply/shift errata workaround
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Cc: gcc-patches at gcc dot gnu dot org, echristo at redhat dot com
- Date: Mon, 01 Mar 2004 16:47:32 +0000
- Subject: Re: head: MIPS: Complete the R4000 multiply/shift errata workaround
- References: <Pine.LNX.email@example.com><firstname.lastname@example.org><Pine.LNX.email@example.com><firstname.lastname@example.org> <email@example.com><Pine.LNX.firstname.lastname@example.org><email@example.com><Pine.LNX.firstname.lastname@example.org><email@example.com><Pine.LNX.firstname.lastname@example.org>
"Maciej W. Rozycki" <email@example.com> 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.