I have committed these two patches to fix bug [#5671]. We also have to put op0 into a register to get shift instruction recognized.

Grace will commit her tests later.


Jie
	* config/bfin/bfin.c (bfin_expand_builtin): Copy op0 to
	register for cmplx_mac and cmplx_msu builtins.

Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 3678)
+++ config/bfin/bfin.c	(working copy)
@@ -6643,6 +6643,8 @@ bfin_expand_builtin (tree exp, rtx targe
 	  || GET_MODE (target) != V2HImode
 	  || ! (*insn_data[icode].operand[0].predicate) (target, V2HImode))
 	target = gen_reg_rtx (tmode);
+      if (! register_operand (op0, GET_MODE (op0)))
+	op0 = copy_to_mode_reg (GET_MODE (op0), op0);
       if (! register_operand (op1, GET_MODE (op1)))
 	op1 = copy_to_mode_reg (GET_MODE (op1), op1);
       if (! register_operand (op2, GET_MODE (op2)))
	* config/bfin/bfin.c (bfin_expand_builtin): Copy op0 to
	register for cmplx_mac and cmplx_msu builtins.

Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 3678)
+++ config/bfin/bfin.c	(working copy)
@@ -6546,6 +6546,8 @@ bfin_expand_builtin (tree exp, rtx targe
 	  || GET_MODE (target) != V2HImode
 	  || ! (*insn_data[icode].operand[0].predicate) (target, V2HImode))
 	target = gen_reg_rtx (V2HImode);
+      if (! register_operand (op0, GET_MODE (op0)))
+	op0 = copy_to_mode_reg (GET_MODE (op0), op0);
       if (! register_operand (op1, GET_MODE (op1)))
 	op1 = copy_to_mode_reg (GET_MODE (op1), op1);
       if (! register_operand (op2, GET_MODE (op2)))
_______________________________________________
Toolchain-devel mailing list
Toolchain-devel@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/toolchain-devel

Reply via email to