Add Single Element Vectors support

Nick Clifton nickc@redhat.com
Tue Sep 17 11:52:00 GMT 2002


Hi Aldy,

> Where are the e500 bits?

Here are the e500 bits.  May I apply them to the sources please ?

Cheers
        Nick

PS.  There appears to be a missing dependency in the Makefile because
changing spe.md does not cause the machine description to be
recompiled.  I am not sure how/where this should be fixed.

2002-09-17  Nick Clifton  <nickc@redhat.com>

	* config/rs60000/rs6000.c (rs6000_emit_move): Handle V1DImode moves.
	* config/rs60000/rs6000.c (SPE_VECTOR_MODE): Include V1DImode.
	* config/rs6000/spe.md (movv1di, movv1di_internal): New patterns.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.381
diff -c -3 -p -w -r1.381 rs6000.c
*** config/rs6000/rs6000.c	16 Sep 2002 19:48:19 -0000	1.381
--- config/rs6000/rs6000.c	17 Sep 2002 18:42:06 -0000
*************** rs6000_emit_move (dest, source, mode)
*** 2645,2650 ****
--- 2645,2651 ----
      case V4HImode:
      case V2SFmode:
      case V2SImode:
+     case V1DImode:
        if (CONSTANT_P (operands[1])
  	  && !easy_vector_constant (operands[1]))
  	operands[1] = force_const_mem (mode, operands[1]);

Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.226
diff -c -3 -p -w -r1.226 rs6000.h
*** config/rs6000/rs6000.h	14 Sep 2002 13:12:54 -0000	1.226
--- config/rs6000/rs6000.h	17 Sep 2002 18:42:07 -0000
*************** extern int rs6000_default_long_calls;
*** 876,881 ****
--- 876,882 ----
  #define SPE_VECTOR_MODE(MODE)		\
  	((MODE) == V4HImode          	\
           || (MODE) == V2SFmode          \
+          || (MODE) == V1DImode          \
           || (MODE) == V2SImode)
  
  /* Define this macro to be nonzero if the port is prepared to handle

Index: config/rs6000/spe.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/spe.md,v
retrieving revision 1.2
diff -c -3 -p -w -r1.2 spe.md
*** config/rs6000/spe.md	29 Jul 2002 20:15:43 -0000	1.2
--- config/rs6000/spe.md	17 Sep 2002 18:42:07 -0000
***************
*** 2253,2258 ****
--- 2253,2274 ----
     evor %0,%1,%1"
    [(set_attr "type" "vecload")])
  
+ (define_expand "movv1di"
+   [(set (match_operand:V1DI 0 "nonimmediate_operand" "")
+ 	(match_operand:V1DI 1 "any_operand" ""))]
+   "TARGET_SPE"
+   "{ rs6000_emit_move (operands[0], operands[1], V1DImode); DONE; }")
+ 
+ (define_insn "*movv1di_internal"
+   [(set (match_operand:V1DI 0 "nonimmediate_operand" "=m,r,r")
+ 	(match_operand:V1DI 1 "input_operand" "r,m,r"))]
+   "TARGET_SPE"
+   "@
+    evstdd%X0 %1,%y0
+    evldd%X1 %0,%y1
+    evor %0,%1,%1"
+   [(set_attr "type" "vecload")])
+ 
  (define_expand "movv4hi"
    [(set (match_operand:V4HI 0 "nonimmediate_operand" "")
  	(match_operand:V4HI 1 "any_operand" ""))]



More information about the Gcc-patches mailing list