[hellogcc] Re: how can I write a right V32QI Unpack Low Data insn pattern?

  • From: Liu <proljc@xxxxxxxxx>
  • To: Ian Lance Taylor <iant@xxxxxxxxxx>
  • Date: Thu, 3 Mar 2011 10:48:46 +0800

On Wed, Mar 2, 2011 at 11:14 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Dave Korn <dave.korn.cygwin@xxxxxxxxx> writes:
>
>> On 02/03/2011 07:56, Liu wrote:
>>
>>> The wrong code is :
>>>  L9284: ATTRIBUTE_UNUSED_LABEL
>>>   x3 = XEXP (x2, {);
>>>   if (x3 == const_int_rtx[MAX_SAVED_CONST_INT + (13)])
>>>     goto L9285;
>>>   goto ret0;
>>
>>   Well, that's coming from here:
>>
>>       else
>>       printf ("%sx%d = XEXP (x%d, %c);\n",
>>               indent, depth + 1, depth, newpos[depth]);
>>       ++depth;
>
> Interesting.  Looks you have a define_insn which has too many entries.
> It can only have 26 elements, but, annoyingly, genrecog doesn't check
> for that.
>
> It's a bit odd to have more than 26 elements.  Do you have any
> incredibly large define_insn patterns?
>
Yes, I have some 80 lines define_insn patterns, are they incredibly large?

>> in the MATCH_OPERAND case of the big switch in add_to_sequence().  Possibly
>> change_state needs to do something like
>>
>>       printf ("%sx%d = XEXP (x%d, %d);\n",
>>               indent, depth + 1, depth,
>>               newpos[depth] > 'a'
>>                 ? newpos[depth] - 'a'
>>                 : newpos[depth] - '0');
>
> No, change_state uses upper case and lower case letters to mean
> different things.  In this case it's meant to be a lower case letter but
> it has overrun.
>
> This patch should at least cause genrecog to crash for you rather than
> generating bogus output.  I've verified that this patch bootstraps on
> x86_64 and makes no difference in the generated insn-recog.c.  Can you
> see whether this gives you a crash?  Any opinion on whether I should
> commit this to mainline?
>
> Ian
>
>
I try your patch, but it get the same error still.



Dave Korn, thank you all the same.

Other related posts: