diff gcc/config/rl78/rl78.md @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line diff
--- a/gcc/config/rl78/rl78.md	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/config/rl78/rl78.md	Thu Oct 25 07:37:49 2018 +0900
@@ -1,5 +1,5 @@
 ;;  Machine Description for Renesas RL78 processors
-;;  Copyright (C) 2011-2017 Free Software Foundation, Inc.
+;;  Copyright (C) 2011-2018 Free Software Foundation, Inc.
 ;;  Contributed by Red Hat.
 
 ;; This file is part of GCC.
@@ -718,3 +718,69 @@
   [(set_attr "valloc" "macax")
    (set_attr "is_g13_muldiv_insn" "yes")]
 )
+
+(define_expand "movdi"
+  [(set (match_operand:DI 0 "nonimmediate_operand" "")
+        (match_operand:DI 1 "general_operand"      ""))]
+  ""
+  "rl78_split_movdi(operands, DImode);
+  DONE;"
+)
+
+(define_expand "movdf"
+  [(set (match_operand:DF 0 "nonimmediate_operand" "")
+        (match_operand:DF 1 "general_operand" ""))]
+  ""
+  "rl78_split_movdi(operands, DFmode);
+  DONE;"
+)
+
+(define_expand "umindi3"
+ [(set (match_operand:DI          0 "nonimmediate_operand" "")
+	(umin:DI (match_operand:DI 1 "general_operand"      "")
+		 (match_operand:DI    2 "general_operand"      "")))
+   ]
+  "optimize_size"
+  "rl78_emit_libcall (\"__umindi3\", UMIN, DImode, DImode, 3, operands);
+   DONE;"
+)
+
+(define_expand "umaxdi3"
+ [(set (match_operand:DI          0 "nonimmediate_operand" "")
+	(umax:DI (match_operand:DI 1 "general_operand"      "")
+		 (match_operand:DI    2 "general_operand"      "")))
+   ]
+  "optimize_size"
+  "rl78_emit_libcall (\"__umaxdi3\", UMAX, DImode, DImode, 3, operands);
+   DONE;"
+)
+
+(define_expand "smindi3"
+ [(set (match_operand:DI          0 "nonimmediate_operand" "")
+	(smin:DI (match_operand:DI 1 "general_operand"      "")
+		 (match_operand:DI    2 "general_operand"      "")))
+   ]
+  "optimize_size"
+  "rl78_emit_libcall (\"__smindi3\", SMIN, DImode, DImode, 3, operands);
+   DONE;"
+)
+
+(define_expand "smaxdi3"
+ [(set (match_operand:DI          0 "nonimmediate_operand" "")
+	(smax:DI (match_operand:DI 1 "general_operand"      "")
+		 (match_operand:DI    2 "general_operand"      "")))
+   ]
+  "optimize_size"
+  "rl78_emit_libcall (\"__smaxdi3\", SMAX, DImode, DImode, 3, operands);
+   DONE;"
+)
+
+(define_expand "anddi3"
+ [(set (match_operand:DI          0 "nonimmediate_operand" "")
+	(and:DI (match_operand:DI 1 "general_operand"      "")
+		 (match_operand:DI    2 "general_operand"      "")))
+   ]
+  "optimize_size"
+  "rl78_emit_libcall (\"__anddi3\", AND, DImode, DImode, 3, operands);
+   DONE;"
+)