Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247129 - Add support to gcc to work around R10K errata
Summary: Add support to gcc to work around R10K errata
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-17 01:48 UTC by Joshua Kinard
Modified: 2008-11-23 18:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add -mfix-r10000 support to gcc 4.3.x (77_all_mips-r10k-support-for-atomic-memory-fixes.patch,23.28 KB, patch)
2008-11-17 01:48 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2008-11-17 01:48:14 UTC
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
Comment 1 Joshua Kinard gentoo-dev 2008-11-17 01:48:42 UTC
Created attachment 172037 [details, diff]
Add -mfix-r10000 support to gcc 4.3.x
Comment 2 Mark Loeser (RETIRED) gentoo-dev 2008-11-23 18:26:24 UTC
Thanks.  In the newest patchset.