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: [PATCH, MIPS] Generate DMUL in widening multiplications


Adam Nemet <anemet@caviumnetworks.com> writes:
> Richard Sandiford writes:
>> 
>>   - CODE_FOR_*s
>>   - using the new function in the define_insns too, and
>>   - passing the code directly, without the ==
>
> I had to limit the information in my email somewhere so I didn't mention one
> additional problem with the combination of CODE_FOR and using
> mips_mulsidi3_gen_fn in the condition of the define_insns.  I.e.:
>
> (define_insn "<u>mulsidi3_64bit"
>   [(set (match_operand:DI 0 "register_operand" "=d")
> 	(mult:DI (any_extend:DI (match_operand:SI 1 "register_operand" "d"))
> 		 (any_extend:DI (match_operand:SI 2 "register_operand" "d"))))
>    (clobber (match_scratch:TI 3 "=x"))
>    (clobber (match_scratch:DI 4 "=d"))]
>   "mips_mulsidi3_icode (<CODE>) == CODE_FOR_<u>mulsidi3_64bit"
>   "#"
>
> This fails to compile because gencondmd.c does not currently include
> insn-codes.h.  In fact, very few modules include insn-codes.h.  If we want the
> above construct we would have to change genconditions.c to also include
> insn-codes.h into gencondmd.c.  Let me know if you still want to take this
> route or use function pointers instead.

I think it'd be cleaner, but that sort of target-independent change isn't
suitable at this stage.  OK, let's go with the function pointers then.

Richard


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