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]

patch: ppc e500 fix for __ev64_*64__


Without this, GCC will split __ev64_?64__ types into 2 registers
when passing them as arguments.  This patch uses single element vectors
which get passed correctly.

Applie to mainline.

2003-03-10  Aldy Hernandez  <aldyh at redhat dot com>

	* config/rs6000/spe.h: Define __ev64_*64__ to use single element
	vectors.
	(__ev_convert_u64): Remove macro.  Define as inline.
	(__ev_convert_s64): Same.

Index: config/rs6000/spe.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/spe.h,v
retrieving revision 1.9
diff -c -p -r1.9 spe.h
*** config/rs6000/spe.h	17 Feb 2003 23:14:41 -0000	1.9
--- config/rs6000/spe.h	10 Mar 2003 18:40:30 -0000
*************** typedef short 			__vector __ev64_s16__;
*** 42,49 ****
  typedef unsigned short  	__vector __ev64_u16__;
  typedef int 			__vector __ev64_s32__;
  typedef unsigned 		__vector __ev64_u32__;
! typedef long long 		__ev64_s64__;
! typedef unsigned long long 	__ev64_u64__;
  typedef float 			__vector __ev64_fs__;
  typedef int 			__vector __ev64_opaque__;
  
--- 42,49 ----
  typedef unsigned short  	__vector __ev64_u16__;
  typedef int 			__vector __ev64_s32__;
  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__;
  
*************** __ev_create_u64 (uint64_t a)
*** 651,658 ****
    return u.v;
  }
  
! #define __ev_convert_u64(a) ((uint64_t) (a))
! #define __ev_convert_s64(a) ((int64_t) (a))
  
  /* __ev_get_* functions.  */
  
--- 651,667 ----
    return u.v;
  }
  
! static inline uint64_t
! __ev_convert_u64 (__ev64_opaque__ a)
! {
!   return (uint64_t) a;
! }
! 
! static inline int64_t
! __ev_convert_s64 (__ev64_opaque__ a)
! {
!   return (int64_t) a;
! }
  
  /* __ev_get_* functions.  */
  


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