This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] MIPS: Missing documentation bits for -mfix-r4x00
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Mar 2004 16:47:32 +0100 (CET)
- Subject: [patch] MIPS: Missing documentation bits for -mfix-r4x00
- Organization: Technical University of Gdansk
Hello,
A few documentation bits have been lost during works on the R4000 and
R4400 errata workarounds. Here's a patch to add the bits. It includes an
indentation fix for the related code as well.
2004-03-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* config/mips/mips.h (TARGET_FIX_R4400): Fix indentation.
* doc/invoke.texi: Complete documentation for -mfix-r4000 and
-mfix-r4400.
Please apply.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
gcc-3.5.0-20040322-mips-r4x00-div.patch
diff -up --recursive --new-file gcc-3.5.0-20040322.macro/gcc/config/mips/mips.h gcc-3.5.0-20040322/gcc/config/mips/mips.h
--- gcc-3.5.0-20040322.macro/gcc/config/mips/mips.h 2004-03-12 02:27:27.000000000 +0000
+++ gcc-3.5.0-20040322/gcc/config/mips/mips.h 2004-03-24 13:14:03.000000000 +0000
@@ -254,7 +254,7 @@ extern const struct mips_cpu_info *mips_
#define TARGET_FIX_R4000 (target_flags & MASK_FIX_R4000)
/* Work around R4400 errata. */
-#define TARGET_FIX_R4400 (target_flags & MASK_FIX_R4400)
+#define TARGET_FIX_R4400 (target_flags & MASK_FIX_R4400)
/* True if we should use NewABI-style relocation operators for
symbolic addresses. This is never true for mips16 code,
diff -up --recursive --new-file gcc-3.5.0-20040322.macro/gcc/doc/invoke.texi gcc-3.5.0-20040322/gcc/doc/invoke.texi
--- gcc-3.5.0-20040322.macro/gcc/doc/invoke.texi 2004-03-18 02:28:08.000000000 +0000
+++ gcc-3.5.0-20040322/gcc/doc/invoke.texi 2004-03-25 15:34:34.000000000 +0000
@@ -478,8 +478,8 @@ in the following sections.
-mcheck-zero-division -mno-check-zero-division @gol
-mmemcpy -mno-memcpy -mlong-calls -mno-long-calls @gol
-mmad -mno-mad -mfused-madd -mno-fused-madd -nocpp @gol
--mfix-r4000 -mno-fix-r4000 -mfix-sb1 -mno-fix-sb1 @gol
--mflush-func=@var{func} -mno-flush-func @gol
+-mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400 @gol
+-mfix-sb1 -mno-fix-sb1 -mflush-func=@var{func} -mno-flush-func @gol
-mbranch-likely -mno-branch-likely}
@emph{i386 and x86-64 Options}
@@ -8067,6 +8067,20 @@ immediately after starting an integer di
@item
A double-word or a variable shift may give an incorrect result if executed
while an integer multiplication is in progress.
+@item
+An integer division may give an incorrect result if started in a delay slot
+of a taken branch or a jump.
+@end itemize
+
+@item -mfix-r4400
+@itemx -mno-fix-r4400
+@opindex mfix-r4400
+@opindex mno-fix-r4400
+Work around certain R4400 CPU errata:
+@itemize @minus
+@item
+A double-word or a variable shift may give an incorrect result if executed
+immediately after starting an integer division.
@end itemize
@item -mfix-sb1