This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] [MIPS] Implement Errata for 24K and 24KE
- From: Nick Clifton <nickc at redhat dot com>
- To: Catherine Moore <clm at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 09 Apr 2009 14:15:15 +0100
- Subject: Re: [patch] [MIPS] Implement Errata for 24K and 24KE
- References: <49DD1319.7070108@codesourcery.com>
Hi Catherine,
Does this look okay to install?
You did not say which mips toolchains you tested with your patch,
although I assume that you have tested it.
2009-04-08 Catherine Moore <clm@codesourcery.com>
gas/
* config/tc-mips.c (mips_fix_24k): Declare.
(check_for_24k_errata): New.
(mips_cleanup): Call check_for_24k_errata.
(start_noreorder): Likewise.
(md_mips_end): Likewise.
(s_change_sec): Likewise.
(s_change_section): Likewise.
(append_insn): Call check_for_24k_errata. Prevent
ERET/DERET instructions from being moved into delay
slots.
(OPTION_FIX_24K): New.
(OPTION_NO_FIX_24k) New.
(md_longopts): Add "mfix-24k" and "mno-fix-24k".
(md_parse_option): Handle fix-24k options.
(md_show_usage): Display fix-24k options.
* doc/c-mips.texi: Document.
* testsuite/gas/mips/mips.exp: Run new tests.
* testsuite/gas/mips/eret.s: New test.
* testsuite/gas/mips/eret.d: New test output.
* testsuite/gas/mips/eret.l: New test output.
Approved - please apply.
Two, very minor, coding issues:
+ if (!insn)
+ {
+ if (history[eret_ndx].noreorder_p)
+ {
+ as_warn (_("ERET and DERET must be followed by a NOP on the 24K."));
+ return;
+ }
+ else
+ {
+ return;
+ }
+ }
Could be more cleanly written as:
+ if (!insn)
+ {
+ if (history[eret_ndx].noreorder_p)
+ as_warn (_("ERET and DERET must be followed by a NOP on the 24K."));
+ return;
+ }
And:
+ static void
+ check_for_24k_errata (struct mips_cl_insn *insn, int eret_ndx)
+ {
+ bfd_boolean next_insn_is_branch = FALSE;
+
[snip]
+
+ return;
+
+ }
There is no need for a return statement at the end of a void function.
Cheers
Nick