This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SH] AND/OR/XOR costs calculation
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: oleg dot endo at t-online dot de
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Sep 2011 12:30:45 +0900 (JST)
- Subject: Re: [SH] AND/OR/XOR costs calculation
- References: <1316567224.1874.138.camel@yam-132-YW-E178-FTW>
Oleg Endo <oleg.endo@t-online.de> wrote:
> the attached patch corrects the costs calculation for AND / OR / XOR
> operations that could be done with an 8 bit immediate value and R0.
> The change doesn't seem to have an impact on the generated code but will
> be (probably) required to fix PR 49263.
A few minor nits:
> * config/sh/sh.c (andcosts): Renamed to and_xor_ior_costs.
> Added AND special case. Adapted comments.
> (sh_rtx_costs): Added XOR and IOR case.
Please use a tab instead of 8 spaces for ChangeLog entry.
Use two spaces between the period and the next sentence.
>- /* Anding with a register is a single cycle and instruction. */
>+ /* register x register is a single cycle instruction. */
s/register x register/A logical operation with a register/
would be better.
>+ /* Constants that can be used in an instruction with an immediate are a single
> cycle, but this requires r0, so make it a little more expensive. */
The line should be wrapped so it is less than ~75 characters on a line.
OK with those changes.
BTW, have you done your paper work with FSF?
Regards,
kaz