Hi all,

I am doing a port in GCC 4.4.0 for a 32 bit target. As a part of
scheduling framework i have to write the move patterns with more
clarity, so that i could control the scheduling with the help of
attributes. Re-writting the pattern resulted in movsi pattern with 41
alternatives :(  When i specify the attributes it seems that all the
alternatives above 31 are allocated with the default value of the
attribute. This is done in the generated file insn-attrtab.c. The
following is one such piece of code:


    case 2:  /* *movsi_internal */
      extract_constrain_insn_cached (insn);
      if (((1 << which_alternative) & 0xf))
        {
          return DELAY_SLOT_TYPE_CLOB_SR;
        }
      else if (((1 << which_alternative) & 0x30))
        {
          return DELAY_SLOT_TYPE_RW_SP;
        }
      else if (which_alternative == 6)
        {
          return DELAY_SLOT_TYPE_CLOB_SR;
        }
      else if (((1 << which_alternative) & 0x1fff80))
        {
          return DELAY_SLOT_TYPE_COMMON;
        }
      else if (((1 << which_alternative) & 0x1e00000))
        {
          return DELAY_SLOT_TYPE_RW_SP;
        }
      else if (which_alternative == 25)
        {
          return DELAY_SLOT_TYPE_READ_SR;
        }
      else if (which_alternative == 26)
        {
          return DELAY_SLOT_TYPE_READ_EMR;
        }
      else if (which_alternative == 27)
        {
          return DELAY_SLOT_TYPE_COMMON;
        }
      else if (which_alternative == 28)
        {
          return DELAY_SLOT_TYPE_WRITE_SR;
        }
      else
        {
          return DELAY_SLOT_TYPE_COMMON;
        }


As you can see from the above code all the alternatives which are more
that 31 will always get the default value of the attribute. This is
because GCC assumes that the target has only 31 alternatives. Even
changing the macro

#define MAX_RECOG_ALTERNATIVES 30

in the file recog.h there is no change in this assumption. (Which i
think should have affected the attribute calulation). I guess that if
i make need_64bit_hwint=yes , then this problem should go away. I
havent check this. But i dont want to do that, since this means that i
will have to change all the dependencies that are affected by this
change. Is there any other solution for my problem?

Any help is appreciated.

Regards,
Shafi

Reply via email to