]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mn10300.h (TARGET_SWITCHES): Add -mmult-bug and -mno-mult-bug.
authorJeffrey A Law <law@cygnus.com>
Sat, 25 Oct 1997 18:16:50 +0000 (18:16 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 25 Oct 1997 18:16:50 +0000 (12:16 -0600)
        * 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

gcc/ChangeLog
gcc/config/mn10300/mn10300.h
gcc/config/mn10300/mn10300.md

index d26d46476a86272c7c2bf71a0ba206fd949f54a3..2abf40892dea139d2911e7a5ab93c93174cc0f24 100644 (file)
@@ -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.
index 32016067b2e455cd33b12a09ac6050c4954e25af..4c32b8dfd6a76fea088aae2279ebcb0582eeb9f3 100644 (file)
@@ -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.  */
index c9e7d336d2f87016c9893b9531193ad15b0305c3..f023478fe14f6abeaa1b31f5aceda6af02453d4c 100644 (file)
        (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"