Re: [PATCH v2] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-27 Thread Maciej W. Rozycki
On Fri, 9 Nov 2018, Fredrik Noring wrote: > gcc/ > * config/mips/mips.c (mips_reorg_process_insns) > (mips_option_override): Handle `-mfix-r5900'. > * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and > `mno-fix-r5900'. > * config/mips/mips.opt (mfix-r5900): N

[PATCH v2] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-09 Thread Fredrik Noring
The short loop bug under certain conditions causes loops to execute only once or twice, due to a hardware bug in the R5900 chip. `-march=r5900' already enables the R5900 short loop workaround. However, the R5900 ISA and most other MIPS ISAs are mutually exclusive since R5900-specific instructions