{PATCH] RL78 movdf define expand

Sebastian Perta sebastian.perta@renesas.com
Fri Feb 16 14:15:00 GMT 2018


Hello,

The following patch defines a new expand movdf, it is similar to the movdi
expand which I implemented a while ago.
The usefulness of the patch can be seen easily even on the following test
case where it reduces the code size from 199 bytes to 109 bytes:

long double long_double_add(long double a, long double b)
{
	return a + b;
}

Regression test is OK, tested with the following command:
make -k check-gcc RUNTESTFLAGS=--target_board=rl78-sim

Best Regards,
Sebastian

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 257733)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2018-02-16  Sebastian Perta  <sebastian.perta@renesas.com>
+
+	* config/rl78/rl78.md (movdf): New define expand.
+
 2018-02-16  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/84417




Index: rl78.md
===================================================================
--- rl78.md	(revision 257733)
+++ rl78.md	(working copy)
@@ -727,6 +727,14 @@
   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"      "")




More information about the Gcc-patches mailing list