REGNO_REG_CLASS is defined as:

#define REGNO_REG_CLASS(REGNO) ALL_REGS

For the vax port and in a similar manner on the spu port.


Note how it doesn't use the REGNO argument. This causes problems for the new noop set code:

/* Detect noop sets and remove them before processing side effects. */
      if (set && REG_P (SET_DEST (set)) && REG_P (SET_SRC (set)))
        {
          unsigned int regno = REGNO (SET_SRC (set));
          rtx r1 = find_oldest_value_reg (REGNO_REG_CLASS (regno),
                                          SET_DEST (set), vd);
          rtx r2 = find_oldest_value_reg (REGNO_REG_CLASS (regno),
                                          SET_SRC (set), vd);
if (rtx_equal_p (r1 ? r1 : SET_DEST (set), r2 ? r2 : SET_SRC (set)))
            {
              bool last = insn == BB_END (bb);
              delete_insn (insn);
              if (last)
                break;
              continue;
            }
        }

"regno" will not be used on the vax port because of the definition of REGNO_REG_CLASS, triggering a build failure using config-list.mk.

I'd originally hacked in a fix in regcprop.c. But then realized it's probably cleaner to just twiddle REGNO_REG_CLASS to reference its argument. The PTX port already works in this manner.

Installing on the trunk.

Jeff
diff --git a/gcc/config/spu/spu.h b/gcc/config/spu/spu.h
index c2c31e7..7b6bad1 100644
--- a/gcc/config/spu/spu.h
+++ b/gcc/config/spu/spu.h
@@ -205,7 +205,8 @@ enum reg_class {
     {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3}, /* general regs */ \
     {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0x3}} /* all regs */
 
-#define REGNO_REG_CLASS(REGNO) (GENERAL_REGS)
+#define REGNO_REG_CLASS(REGNO) ((void)(REGNO), GENERAL_REGS)
+
 
 #define BASE_REG_CLASS GENERAL_REGS
 
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index 427c352..dc77aa9 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -226,7 +226,7 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
    reg number REGNO.  This could be a conditional expression
    or could index an array.  */
 
-#define REGNO_REG_CLASS(REGNO) ALL_REGS
+#define REGNO_REG_CLASS(REGNO) ((void)(REGNO), ALL_REGS)
 
 /* The class value for index registers, and the one for base regs.  */
 

Reply via email to