[PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16

Matthew Fortune Matthew.Fortune@imgtec.com
Fri Apr 11 20:07:00 GMT 2014


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-owner@gcc.gnu.org [mailto:gcc-patches-
> owner@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
> 



More information about the Gcc-patches mailing list