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: [RS6000 PATCH] Improved popcount/parity intrinsics for Power6


Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> On Tue, Feb 06, 2007 at 10:59:16PM -0800, Ian Lance Taylor wrote:
>> Personally I prefer meaningful constraints in define_expand, as a
>> comment, but I don't feel very strongly about it.  If we prefer to not
>> use the constraint strings with define_expand, then perhaps we should
>> change the gen* programs to not require them.
>
>    AFAIK no gen* programs require constraint strings, not even empty ones,
> in define_expand. I'm getting away with this:
>
> (define_expand "mov<mode>"
>   [(set (match_operand:LE16 0 "nonimmediate_operand")
> 	(match_operand:LE16 1 "general_operand"))]
>   ""
> {
>   if (MEM_P (operands[0]) && MEM_P (operands[1]))
>     operands[1] = force_reg (<MODE>mode, operands[1]);
> })

FWIW, that's the style I converted the MIPS port to as well,
and was the initial motivation behind making the constraint
string optional.

I've no strong opinion in general, but I think:

> +   [(use (match_operand:GPR 0 "gpc_reg_operand" "=r"))

is outright confusing.  A (use ...) rtx with a write-only value? ;)
I think it's better to either drop the (use ...) wrapper or drop
the constraints.

Richard


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