Got this patch submitted to upstream, and I've since backported it to 4.3.2. Tested on a cross-compiler, which builds fine, and built a kernel with it (although, the kernel has its own workarounds anyways). Option is implied by default if --march=r10000, else by specifying -mfix-r10000. Cannot be used with -march=mips1, since it relies on branch-likely instructions (beql, beqzl) being available, and those were introduced in the MIPS-II ISA specification. It was decided in the patch discussion on gcc-patches that we would not implement the workaround for MIPS-I binaries (which involves substituting in 28 nops after the branch), because most modern binaries that run on R10K processors are either n32 MIPS-IV (Irix 6.x) or o32 MIPS-II (Irix 5.x, Debian stable, and Gentoo) minimum. Start of discussion: http://gcc.gnu.org/ml/gcc-patches/2008-10/msg01332.html Final Patch committed to upstream: http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00707.html
Created attachment 172037 [details, diff] Add -mfix-r10000 support to gcc 4.3.x
Thanks. In the newest patchset.