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: CRIS: Add hardware support for __builtin_ctz


On Wed, Sep 05, 2007 at 11:40:31AM +0200, Jesper Nilsson wrote:
> On Tue, Sep 04, 2007 at 09:28:13PM +0200, Rask Ingemann Lambertsen wrote:
>
> > What is the ICE, btw? 
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x082f2a4c in copy_rtx (orig=0xd2) at ../../gcc.clz/gcc/rtl.c:232
> 232       switch (code)

   I guess this is something which would be caught with RTL checking enabled.

> >    Note that (match_operand "register_operand") won't match a (scratch ...)
> > expression. Thus you probably wouldn't get far even without the ICE in
> > copy_rtx.
> 
> I'm not quite sure I understand the problem, could you please elaborate?

   Your expander would emit

(set (scratch:SI) (reg:SI foo))

but the "*movsi_internal" pattern has

(set (match_operand:SI 0 "nonimmdiate_operand" ...)
     (match_operand:SI 1 "general_operand" ...))

and (scratch:SI) isn't accepted by nonimmediate_operand(). You'd run into
the same problem with the other two insns emitted by the expander.

-- 
Rask Ingemann Lambertsen


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