This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ppc spe: builtin opaque type


The disgusting hack that is is_ev64_opaque_type, is being replaced
with a proper builtin type.  This makes a couple corner cases that
work.

Committed to mainline and e500 3.3 branch.

2003-07-25  Aldy Hernandez  <aldyh@redhat.com>

	* config/rs6000/rs6000.c (is_ev64_opaque_type): Only check pointer
	equality.
	(spe_init_builtins): Declare __ev64_opaque__ as a builtin type.

	* config/rs6000/spe.h: Remove __ev64_opaque__ definition.

Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.507
diff -c -p -r1.507 rs6000.c
*** config/rs6000/rs6000.c	21 Jul 2003 20:18:51 -0000	1.507
--- config/rs6000/rs6000.c	25 Jul 2003 23:11:48 -0000
*************** spe_init_builtins ()
*** 6231,6236 ****
--- 6231,6240 ----
  			    SPE_BUILTIN_EVSEL_CMPGTS,
  			    SPE_BUILTIN_EVSEL_FSTSTEQ);
  
+   (*lang_hooks.decls.pushdecl)
+     (build_decl (TYPE_DECL, get_identifier ("__ev64_opaque__"),
+ 		 opaque_V2SI_type_node));
+ 
    /* Initialize irregular SPE builtins.  */
    
    def_builtin (target_flags, "__builtin_spe_mtspefscr", void_ftype_int, SPE_BUILTIN_MTSPEFSCR);
*************** is_ev64_opaque_type (type)
*** 14768,14780 ****
    return (TARGET_SPE
  	  && (type == opaque_V2SI_type_node
  	      || type == opaque_V2SF_type_node
! 	      || type == opaque_p_V2SI_type_node
! 	      || (TREE_CODE (type) == VECTOR_TYPE
! 		  && TYPE_NAME (type)
! 		  && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
! 		  && DECL_NAME (TYPE_NAME (type))
! 		  && strcmp (IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))),
! 			     "__ev64_opaque__") == 0)));
  }
  
  static rtx
--- 14772,14778 ----
    return (TARGET_SPE
  	  && (type == opaque_V2SI_type_node
  	      || type == opaque_V2SF_type_node
! 	      || type == opaque_p_V2SI_type_node));
  }
  
  static rtx
Index: config/rs6000/spe.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/spe.h,v
retrieving revision 1.16
diff -c -p -r1.16 spe.h
*** config/rs6000/spe.h	5 Jul 2003 00:08:11 -0000	1.16
--- config/rs6000/spe.h	25 Jul 2003 23:11:49 -0000
*************** typedef unsigned 		__vector __ev64_u32__
*** 45,51 ****
  typedef long long 		__vector __ev64_s64__;
  typedef unsigned long long 	__vector __ev64_u64__;
  typedef float 			__vector __ev64_fs__;
- typedef int 			__vector __ev64_opaque__;
  
  #define __v2si __ev64_opaque__
  #define __v2sf __ev64_fs__
--- 45,50 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]