aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1997-10-25 18:16:50 +0000
committerJeff Law <law@gcc.gnu.org>1997-10-25 12:16:50 -0600
commita6f7ba1798530b13d702814433761bf392e84796 (patch)
treeaa1bc1c0cd86143b357b25ff6c6349872885b5c2 /gcc
parentfc55478797083a56aa91843dc2303496da502cac (diff)
downloadgcc-a6f7ba1798530b13d702814433761bf392e84796.zip
gcc-a6f7ba1798530b13d702814433761bf392e84796.tar.gz
gcc-a6f7ba1798530b13d702814433761bf392e84796.tar.bz2
mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
* mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug. (TARGET_MULT_BUG): Define. (TARGET_DEFAULT): Default to TARGET_MULT_BUG. * mn10300.md (mulsi3): Handle TARGET_MULT_BUG. From-SVN: r16173
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/mn10300/mn10300.h8
-rw-r--r--gcc/config/mn10300/mn10300.md8
3 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d26d464..2abf408 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sat Oct 25 12:20:58 1997 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
+ (TARGET_MULT_BUG): Define.
+ (TARGET_DEFAULT): Default to TARGET_MULT_BUG.
+ * mn10300.md (mulsi3): Handle TARGET_MULT_BUG.
+
Fri Oct 24 17:40:34 1997 Jeffrey A Law (law@cygnus.com)
* mn10200.c (indirect_memory_operand): Delete unused function.
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 3201606..4c32b8d 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -49,11 +49,15 @@ extern struct rtx_def *zero_areg;
where VALUE is the bits to set or minus the bits to clear.
An empty string NAME is used to identify the default VALUE. */
+/* Generate code to work around mul/mulq bugs on the mn10300. */
+#define TARGET_MULT_BUG (target_flags & 0x1)
#define TARGET_SWITCHES \
- {{ "", TARGET_DEFAULT}}
+ {{ "mult-bug", 0x1}, \
+ { "no-mult-bug", -0x1}, \
+ { "", TARGET_DEFAULT}}
#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT 0
+#define TARGET_DEFAULT 0x1
#endif
/* Print subsidiary information on the compiler version in use. */
diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md
index c9e7d33..f023478 100644
--- a/gcc/config/mn10300/mn10300.md
+++ b/gcc/config/mn10300/mn10300.md
@@ -730,7 +730,13 @@
(mult:SI (match_operand:SI 1 "register_operand" "%0")
(match_operand:SI 2 "register_operand" "d")))]
""
- "mul %2,%0"
+ "*
+{
+ if (TARGET_MULT_BUG)
+ return \"nop\;nop\;mul %2,%0\";
+ else
+ return \"mul %2,%0\";
+}"
[(set_attr "cc" "set_zn")])
(define_insn "udivmodsi4"