From 5c6b8ffbd6a5bb06d0fb264c7566f9b513548968 Mon Sep 17 00:00:00 2001
From: aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 25 Jul 2003 23:49:30 +0000
Subject: [PATCH] 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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69802 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog              |  8 ++++++++
 gcc/config/rs6000/rs6000.c | 12 +++++-------
 gcc/config/rs6000/spe.h    |  1 -
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 892c3b7584b8..292325f900ba 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
 	* doc/passes.texi (Passes): Mention pretty-printing and
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index c5cd0b0a0894..10a6a53fbf63 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -6231,6 +6231,10 @@ spe_init_builtins ()
 			    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);
@@ -14770,13 +14774,7 @@ is_ev64_opaque_type (type)
   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)));
+	      || type == opaque_p_V2SI_type_node));
 }
 
 static rtx
diff --git a/gcc/config/rs6000/spe.h b/gcc/config/rs6000/spe.h
index ca90b8068d89..16765161fdea 100644
--- a/gcc/config/rs6000/spe.h
+++ b/gcc/config/rs6000/spe.h
@@ -45,7 +45,6 @@ typedef unsigned 		__vector __ev64_u32__;
 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__
-- 
GitLab