Hi Catherine/Richard, I think there may be some impact on register move costs by introducing this class. 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. What do you think?
regards, Matthew > -----Original Message----- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Moore, Catherine > Sent: 11 April 2014 19:25 > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford > Subject: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16 > > Hi Richard, > > This patch fixes a problem with the SW16, SH16 and SB16 microMIPS > instructions. GCC is incorrectly calculating the length of these > instructions if $16 is used as the source operand. The incorrect length > calculation can cause a 32-bit instruction to be placed in a short delay > slot. The assembler does detect this and issues a warning. > > This patch changes the allowable registers for the short store > instructions to $0, $2-$7, and $17. > > Okay to install? Okay to install for 4.9? > > Thanks, > Catherine >