This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: "Moore, Catherine" <Catherine_Moore at mentor dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Fri, 11 Apr 2014 20:07:29 +0000
- Subject: RE: [PATCH] [MIPS] Fix operands for microMIPS SW16, SH16 and SB16
- Authentication-results: sourceware.org; auth=none
- References: <FD3DCEAC5B03E9408544A1E416F1124201497ED8A4 at NA-MBX-04 dot mgc dot mentorg dot com>
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
>