Matthew Fortune <matthew.fort...@imgtec.com> writes:
> Hi Catherine/Richard,
>
> I think there may be some impact on register move costs by introducing
> this class.

Yeah, I was worried about that too.  I'm going to do some code comparison
tests for SE and MIPS16 to see what happens.

> Is it worth having mips_canonicalize_move_class return M16_REGS for
> M16_STORE_REGS to reduce the effect on costings? Given the extra
> register is only $0 then this would seem mostly acceptable albeit
> slightly strange.

This will happen automatically, since M16_STORE_REGS is just M16_REGS
without $16.  (M16_STORE_REGS doesn't include $0, since that's handled
as a constant instead.)

However:

Index: config/mips/mips.c
===================================================================
--- config/mips/mips.c  (revision 209307)
+++ config/mips/mips.c  (working copy)
@@ -648,7 +648,7 @@ static mips_one_only_stub *mips16_set_fcsr_stub;
 
 /* Index R is the smallest register class that contains register R.  */
 const enum reg_class mips_regno_to_class[FIRST_PSEUDO_REGISTER] = {
-  LEA_REGS,    LEA_REGS,       M16_REGS,       V1_REG,
+  M16_STORE_REGS, LEA_REGS,    M16_REGS,       V1_REG,
   M16_REGS,    M16_REGS,       M16_REGS,       M16_REGS,
   LEA_REGS,    LEA_REGS,       LEA_REGS,       LEA_REGS,
   LEA_REGS,    LEA_REGS,       LEA_REGS,       LEA_REGS,

this bit isn't right.  We should leave entry 0 alone and change the
M16_REGS entries for every register except $16.

Thanks,
Richard

Reply via email to