This is the mail archive of the gcc@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: New RTL instruction for my port


On Mon, Dec 14, 2009 at 5:04 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Mon, Dec 14, 2009 at 04:46:59PM -0500, Jean Christophe Beyler wrote:
>> My current solution:
>>
>> - Define a new rtl in rtl.def
>
> Just use an unspec or unspec_volatile. ?You don't need a new RTL
> operation.

I thought of that but then how do I add the cost ? I also have another
problem: there is a second instruction that would have the exact same
signature if I use an unspec.

Is there a solution for that and how do I handle the cost then ?
   - Just say that an unspec has a higher cost?


>
>> - Add the new rtl in the MD file and the generated assembly instruction
>>
>> However, the solution seems to work, except in O0, where I get this error:
>
> This means whatever is calling gen_newrtl to create the insn is not
> checking operand predicates first. ?That's probably code you wrote
> too.

You are probably right, I'll move it into a register first before
generating my instruction.


Thanks a lot,
Jc


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