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]

[altivec]: major altivec.h cleanups


more boring stuff...

a customer provided us with a 4k-line testcase that found quite a few
interesting buglets, all obvious.   i distilled a few tests and
am committing a new regression test.

committed as obvious only to trunk.

i'll be doing some more cleanups in the next few days as i struggle to
pass the entire conformance suite.

aldy

2002-05-01  Aldy Hernandez  <aldyh@redhat.com>
	
	* gcc.dg/altivec-7.c: New.

	* config/rs6000/altivec.h: Cleanup.
	

Index: testsuite/gcc.dg/altivec-7.c
===================================================================
RCS file: testsuite/gcc.dg/altivec-7.c
diff -N testsuite/gcc.dg/altivec-7.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/altivec-7.c	1 May 2002 06:43:37 -0000
***************
*** 0 ****
--- 1,45 ----
+ /* Origin: Aldy Hernandez  <aldyh@redhat.com>  */
+ 
+ /* { dg-do compile { target powerpc-*-* } } */
+ /* { dg-options "-maltivec" } */
+ 
+ #include <altivec.h>
+ 
+ long **longp;
+ int *var_int;
+ unsigned long **ulongp;
+ vector pixel *varpixel;
+ vector signed char *vecchar;
+ vector signed long *vecint;
+ vector signed short *vecshort;
+ vector unsigned char *vecuchar;
+ vector unsigned long *vecuint;
+ vector unsigned short *vecushort;
+ vector float *vecfloat;
+ 
+ int main ()
+ {
+   *vecfloat++ = vec_andc(vecint[0], vecfloat[1]);
+   *vecfloat++ = vec_andc(vecfloat[0], vecint[1]);
+   *vecfloat++ = vec_vxor(vecint[0], vecfloat[1]);
+   *vecfloat++ = vec_vxor(vecfloat[0], vecint[1]);
+   *varpixel++ = vec_packpx(vecuint[0], vecuint[1]);
+   *varpixel++ = vec_vpkpx(vecuint[0], vecuint[1]);
+   *vecshort++ = vec_vmulosb(vecchar[0], vecchar[1]);
+   *vecint++ = vec_ld(var_int[0], longp[1]);
+   *vecint++ = vec_lde(var_int[0], longp[1]);
+   *vecint++ = vec_ldl(var_int[0], longp[1]);
+   *vecint++ = vec_lvewx(var_int[0], longp[1]);
+   *vecint++ = vec_unpackh(vecshort[0]);
+   *vecint++ = vec_unpackl(vecshort[0]);
+   *vecushort++ = vec_andc(vecshort[0], vecushort[1]);
+   *vecushort++ = vec_andc(vecushort[0], vecshort[1]);
+   *vecushort++ = vec_vxor(vecshort[0], vecushort[1]);
+   *vecushort++ = vec_vxor(vecushort[0], vecshort[1]);
+   *vecuint++ = vec_ld(var_int[0], ulongp[1]);
+   *vecuint++ = vec_lvx(var_int[0], ulongp[1]);
+   *vecuint++ = vec_vmsumubm(vecuchar[0], vecuchar[1], vecuint[2]);
+   *vecuchar++ = vec_xor(vecuchar[0], vecchar[1]);
+ 
+   return 0;
+ }
Index: config/rs6000/altivec.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/altivec.h,v
retrieving revision 1.18
diff -c -p -r1.18 altivec.h
*** config/rs6000/altivec.h	24 Apr 2002 10:57:33 -0000	1.18
--- config/rs6000/altivec.h	1 May 2002 06:43:38 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 45,52 ****
  #define vector __vector
  
  #define bool signed
! #define pixel short
! #define __pixel short
  
  /* Dummy prototype.  */
  extern int __altivec_link_error_invalid_argument ();
--- 45,52 ----
  #define vector __vector
  
  #define bool signed
! #define pixel unsigned short
! #define __pixel unsigned short
  
  /* Dummy prototype.  */
  extern int __altivec_link_error_invalid_argument ();
*************** vec_ld (int a1, signed int *a2)
*** 1203,1208 ****
--- 1203,1214 ----
    return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
  }
  
+ inline vector signed int
+ vec_ld (int a1, signed long *a2)
+ {
+   return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
+ }
+ 
  inline vector unsigned int
  vec_ld (int a1, vector unsigned int *a2)
  {
*************** vec_ld (int a1, unsigned int *a2)
*** 1215,1220 ****
--- 1221,1232 ----
    return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
  }
  
+ inline vector unsigned int
+ vec_ld (int a1, unsigned long *a2)
+ {
+   return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
+ }
+ 
  inline vector signed short
  vec_ld (int a1, vector signed short *a2)
  {
*************** vec_lde (int a1, unsigned int *a2)
*** 1307,1312 ****
--- 1319,1336 ----
    return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
  }
  
+ inline vector signed int
+ vec_lde (int a1, signed long *a2)
+ {
+   return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
+ }
+ 
+ inline vector unsigned int
+ vec_lde (int a1, unsigned long *a2)
+ {
+   return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
+ }
+ 
  /* vec_lvewx */
  
  inline vector float
*************** vec_lvewx (int a1, unsigned int *a2)
*** 1327,1332 ****
--- 1351,1368 ----
    return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
  }
  
+ inline vector signed int
+ vec_lvewx (int a1, signed long *a2)
+ {
+   return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
+ }
+ 
+ inline vector unsigned int
+ vec_lvewx (int a1, unsigned long *a2)
+ {
+   return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
+ }
+ 
  /* vec_lvehx */
  
  inline vector signed short
*************** vec_ldl (int a1, signed int *a2)
*** 1381,1386 ****
--- 1417,1428 ----
    return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
  }
  
+ inline vector signed int
+ vec_ldl (int a1, signed long *a2)
+ {
+   return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
+ }
+ 
  inline vector unsigned int
  vec_ldl (int a1, vector unsigned int *a2)
  {
*************** vec_ldl (int a1, unsigned int *a2)
*** 1393,1398 ****
--- 1435,1446 ----
    return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
  }
  
+ inline vector unsigned int
+ vec_ldl (int a1, unsigned long *a2)
+ {
+   return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
+ }
+ 
  inline vector signed short
  vec_ldl (int a1, vector signed short *a2)
  {
*************** vec_vpkuhum (vector unsigned short a1, v
*** 2557,2566 ****
  
  /* vec_packpx */
  
! inline vector signed short
  vec_packpx (vector unsigned int a1, vector unsigned int a2)
  {
!   return (vector signed short) __builtin_altivec_vpkpx ((vector signed int) a1, (vector signed int) a2);
  }
  
  /* vec_packs */
--- 2605,2614 ----
  
  /* vec_packpx */
  
! inline vector unsigned short
  vec_packpx (vector unsigned int a1, vector unsigned int a2)
  {
!   return (vector unsigned short) __builtin_altivec_vpkpx ((vector signed int) a1, (vector signed int) a2);
  }
  
  /* vec_packs */
*************** vec_unpackh (vector signed short a1)
*** 4321,4326 ****
--- 4369,4380 ----
    return (vector signed int) __builtin_altivec_vupkhsh ((vector signed short) a1);
  }
  
+ inline vector unsigned int
+ vec_unpackh (vector unsigned short a1)
+ {
+   return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1);
+ }
+ 
  /* vec_vupkhsh */
  
  inline vector signed int
*************** vec_vupkhsh (vector signed short a1)
*** 4332,4338 ****
  /* vec_vupkhpx */
  
  inline vector unsigned int
! vec_vupkhpx (vector signed short a1)
  {
    return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1);
  }
--- 4386,4392 ----
  /* vec_vupkhpx */
  
  inline vector unsigned int
! vec_vupkhpx (vector unsigned short a1)
  {
    return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1);
  }
*************** vec_unpackl (vector signed char a1)
*** 4354,4360 ****
  }
  
  inline vector unsigned int
! vec_vupklpx (vector signed short a1)
  {
    return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1);
  }
--- 4408,4414 ----
  }
  
  inline vector unsigned int
! vec_unpackl (vector unsigned short a1)
  {
    return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1);
  }
*************** vec_unpackl (vector signed short a1)
*** 4365,4370 ****
--- 4419,4432 ----
    return (vector signed int) __builtin_altivec_vupklsh ((vector signed short) a1);
  }
  
+ /* vec_vupklpx */
+ 
+ inline vector unsigned int
+ vec_vupklpx (vector unsigned short a1)
+ {
+   return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1);
+ }
+ 
  /* vec_upklsh */
  
  inline vector signed int
*************** struct __vec_step_help<vector float>
*** 5595,5601 ****
    static const int _S_elem = 4;
  };
  
! #define vec_step(t)  __vec_step_help<t>::_S_elem
  
  #else /* not C++ */
  
--- 5657,5663 ----
    static const int _S_elem = 4;
  };
  
! #define vec_step(t)  __vec_step_help<typeof(t)>::_S_elem
  
  #else /* not C++ */
  
*************** struct __vec_step_help<vector float>
*** 5623,5635 ****
    __altivec_link_error_invalid_argument ())))
  
  #define vec_step(t) \
!   __ch (__builtin_types_compatible_p (t, vector signed int), 4,		\
!   __ch (__builtin_types_compatible_p (t, vector unsigned int), 4,	\
!   __ch (__builtin_types_compatible_p (t, vector signed short), 8,	\
!   __ch (__builtin_types_compatible_p (t, vector unsigned short), 8,	\
!   __ch (__builtin_types_compatible_p (t, vector signed char), 16,	\
!   __ch (__builtin_types_compatible_p (t, vector unsigned char), 16,	\
!   __ch (__builtin_types_compatible_p (t, vector float), 4,		\
    __altivec_link_error_invalid_argument ())))))))
  
  #define vec_vaddubm(a1, a2) \
--- 5685,5697 ----
    __altivec_link_error_invalid_argument ())))
  
  #define vec_step(t) \
!   __ch (__builtin_types_compatible_p (typeof (t), vector signed int), 4,      \
!   __ch (__builtin_types_compatible_p (typeof (t), vector unsigned int), 4,    \
!   __ch (__builtin_types_compatible_p (typeof (t), vector signed short), 8,    \
!   __ch (__builtin_types_compatible_p (typeof (t), vector unsigned short), 8,  \
!   __ch (__builtin_types_compatible_p (typeof (t), vector signed char), 16,    \
!   __ch (__builtin_types_compatible_p (typeof (t), vector unsigned char), 16,  \
!   __ch (__builtin_types_compatible_p (typeof (t), vector float), 4,           \
    __altivec_link_error_invalid_argument ())))))))
  
  #define vec_vaddubm(a1, a2) \
*************** __ch (__bin_args_eq (vector float, (a1),
*** 5813,5820 ****
        ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned int, (a1), vector float, (a2)), \
        ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
! __ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
!       ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \
        ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \
--- 5875,5884 ----
        ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned int, (a1), vector float, (a2)), \
        ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
! __ch (__bin_args_eq (vector signed int, (a1), vector float, (a2)), \
!       ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
! __ch (__bin_args_eq (vector float, (a1), vector signed int, (a2)), \
!       ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \
        ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \
*************** __ch (__bin_args_eq (vector unsigned int
*** 5826,5834 ****
  __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
        ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \
!       ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \
!       ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
        ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \
--- 5890,5898 ----
  __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
        ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \
!       ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \
!       ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
        ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \
*************** __ch (__bin_args_eq (vector signed char,
*** 5851,5857 ****
        ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \
        ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
!     __altivec_link_error_invalid_argument ()))))))))))))))))))))))
  
  #define vec_avg(a1, a2) \
  __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
--- 5915,5921 ----
        ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
  __ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \
        ((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
!     __altivec_link_error_invalid_argument ())))))))))))))))))))))))
  
  #define vec_avg(a1, a2) \
  __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
*************** __ch (__un_args_eq (unsigned int *, (b))
*** 6096,6101 ****
--- 6160,6169 ----
        ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (unsigned int [], (b)), \
        ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
+ __ch (__un_args_eq (unsigned long *, (b)), \
+       ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
+ __ch (__un_args_eq (unsigned long [], (b)), \
+       ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (vector signed int *, (b)), \
        ((vector signed int) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (vector signed int [], (b)), \
*************** __ch (__un_args_eq (signed int *, (b)), 
*** 6104,6109 ****
--- 6172,6181 ----
        ((vector signed int) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (signed int [], (b)), \
        ((vector signed int) __builtin_altivec_lvx ((a), (b))), \
+ __ch (__un_args_eq (signed long *, (b)), \
+       ((vector signed int) __builtin_altivec_lvx ((a), (b))), \
+ __ch (__un_args_eq (signed long [], (b)), \
+       ((vector signed int) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (vector float *, (b)), \
        ((vector float) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (vector float [], (b)), \
*************** __ch (__un_args_eq (float *, (b)), \
*** 6112,6118 ****
        ((vector float) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvx ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))))))))))))))))))))
  
  #define vec_lde(a, b) \
  __ch (__un_args_eq (unsigned char *, (b)), \
--- 6184,6190 ----
        ((vector float) __builtin_altivec_lvx ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvx ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))))))))))))))))))))))))
  
  #define vec_lde(a, b) \
  __ch (__un_args_eq (unsigned char *, (b)), \
*************** __ch (__un_args_eq (signed short *, (b))
*** 6131,6136 ****
--- 6203,6216 ----
        ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \
  __ch (__un_args_eq (signed short [], (b)), \
        ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \
+ __ch (__un_args_eq (unsigned long *, (b)), \
+       ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (unsigned long [], (b)), \
+       ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (signed long *, (b)), \
+       ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (signed long [], (b)), \
+       ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (unsigned int *, (b)), \
        ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (unsigned int [], (b)), \
*************** __ch (__un_args_eq (float *, (b)), \
*** 6143,6149 ****
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))))))
  
  #define vec_lvewx(a, b) \
  __ch (__un_args_eq (unsigned int *, (b)), \
--- 6223,6229 ----
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))))))))))
  
  #define vec_lvewx(a, b) \
  __ch (__un_args_eq (unsigned int *, (b)), \
*************** __ch (__un_args_eq (signed int *, (b)), 
*** 6154,6164 ****
        ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (signed int [], (b)), \
        ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (float *, (b)), \
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))
  
  #define vec_lvehx(a, b) \
  __ch (__un_args_eq (unsigned short *, (b)), \
--- 6234,6252 ----
        ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (signed int [], (b)), \
        ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (unsigned long *, (b)), \
+       ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (unsigned long [], (b)), \
+       ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (signed long *, (b)), \
+       ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
+ __ch (__un_args_eq (signed long [], (b)), \
+       ((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (float *, (b)), \
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvewx ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))
  
  #define vec_lvehx(a, b) \
  __ch (__un_args_eq (unsigned short *, (b)), \
*************** __ch (__un_args_eq (unsigned int *, (b))
*** 6223,6228 ****
--- 6311,6320 ----
        ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (unsigned int [], (b)), \
        ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
+ __ch (__un_args_eq (unsigned long *, (b)), \
+       ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
+ __ch (__un_args_eq (unsigned long [], (b)), \
+       ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (vector signed int *, (b)), \
        ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (vector signed int [], (b)), \
*************** __ch (__un_args_eq (signed int *, (b)), 
*** 6231,6236 ****
--- 6323,6332 ----
        ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (signed int [], (b)), \
        ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
+ __ch (__un_args_eq (signed long *, (b)), \
+       ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
+ __ch (__un_args_eq (signed long [], (b)), \
+       ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (vector float *, (b)), \
        ((vector float) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (vector float [], (b)), \
*************** __ch (__un_args_eq (float *, (b)), \
*** 6239,6245 ****
        ((vector float) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvxl ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))))))))))))))))))))
  
  #define vec_loge(a1) __builtin_altivec_vlogefp ((a1))
  
--- 6335,6341 ----
        ((vector float) __builtin_altivec_lvxl ((a), (b))), \
  __ch (__un_args_eq (float [], (b)), \
        ((vector float) __builtin_altivec_lvxl ((a), (b))), \
! __altivec_link_error_invalid_argument ()))))))))))))))))))))))))))))))))
  
  #define vec_loge(a1) __builtin_altivec_vlogefp ((a1))
  
*************** __ch (__tern_args_eq (vector signed char
*** 6524,6530 ****
        ((vector signed int) __builtin_altivec_vmsummbm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \
  __altivec_link_error_invalid_argument ())
  
! #define vec_msumubm(a1, a2, a3) \
  __ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned int, (a3)), \
        ((vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \
  __altivec_link_error_invalid_argument ())
--- 6620,6626 ----
        ((vector signed int) __builtin_altivec_vmsummbm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \
  __altivec_link_error_invalid_argument ())
  
! #define vec_vmsumubm(a1, a2, a3) \
  __ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned int, (a3)), \
        ((vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \
  __altivec_link_error_invalid_argument ())
*************** __ch (__bin_args_eq (vector unsigned sho
*** 6613,6619 ****
        ((vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) (a1), (vector signed short) (a2))), \
  __altivec_link_error_invalid_argument ())
  
! #define vec_mulosb(a1, a2) \
  __ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \
        ((vector signed short) __builtin_altivec_vmulosb ((vector signed char) (a1), (vector signed char) (a2))), \
  __altivec_link_error_invalid_argument ())
--- 6709,6715 ----
        ((vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) (a1), (vector signed short) (a2))), \
  __altivec_link_error_invalid_argument ())
  
! #define vec_vmulosb(a1, a2) \
  __ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \
        ((vector signed short) __builtin_altivec_vmulosb ((vector signed char) (a1), (vector signed char) (a2))), \
  __altivec_link_error_invalid_argument ())
*************** __ch (__bin_args_eq (vector unsigned sho
*** 6703,6709 ****
        ((vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \
  __altivec_link_error_invalid_argument ()))
  
! #define vec_packpx(a1, a2) __builtin_altivec_vpkpx ((a1), (a2))
  
  #define vec_packs(a1, a2) \
  __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
--- 6799,6808 ----
        ((vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \
  __altivec_link_error_invalid_argument ()))
  
! #define vec_packpx(a1, a2) \
! __ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
!   (vector unsigned short) __builtin_altivec_vpkpx ((vector signed int) (a1), (vector signed int) (a2)), \
! __altivec_link_error_invalid_argument ())
  
  #define vec_packs(a1, a2) \
  __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
*************** __ch (__bin_args_eq (vector unsigned cha
*** 7277,7283 ****
        ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \
  __altivec_link_error_invalid_argument ()))))
  
! #define vec_subc(a1, a2) ((vector unsigned int) __builtin_altivec_vsubcuw ((vector unsigned int) (a1), (vector unsigned int) (a2)))
  
  #define vec_subs(a1, a2) \
  __ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \
--- 7376,7385 ----
        ((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \
  __altivec_link_error_invalid_argument ()))))
  
! #define vec_subc(a1, a2) \
! __ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
!   ((vector unsigned int) __builtin_altivec_vsubcuw ((vector signed int) (a1), (vector signed int) (a2))), \
! __altivec_link_error_invalid_argument ())
  
  #define vec_subs(a1, a2) \
  __ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \
*************** __altivec_link_error_invalid_argument ()
*** 7381,7387 ****
  #define vec_unpackh(a1) \
  __ch (__un_args_eq (vector signed char, (a1)), \
        ((vector signed short) __builtin_altivec_vupkhsb ((vector signed char) (a1))), \
! __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \
  __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector signed int) __builtin_altivec_vupkhsh ((vector signed short) (a1))), \
--- 7483,7489 ----
  #define vec_unpackh(a1) \
  __ch (__un_args_eq (vector signed char, (a1)), \
        ((vector signed short) __builtin_altivec_vupkhsb ((vector signed char) (a1))), \
! __ch (__un_args_eq (vector unsigned short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \
  __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector signed int) __builtin_altivec_vupkhsh ((vector signed short) (a1))), \
*************** __ch (__un_args_eq (vector signed short,
*** 7393,7399 ****
  __altivec_link_error_invalid_argument ())
  
  #define vec_vupkhpx(a1) \
! __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \
  __altivec_link_error_invalid_argument ())
  
--- 7495,7501 ----
  __altivec_link_error_invalid_argument ())
  
  #define vec_vupkhpx(a1) \
! __ch (__un_args_eq (vector unsigned short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \
  __altivec_link_error_invalid_argument ())
  
*************** __altivec_link_error_invalid_argument ()
*** 7405,7411 ****
  #define vec_unpackl(a1) \
  __ch (__un_args_eq (vector signed char, (a1)), \
        ((vector signed short) __builtin_altivec_vupklsb ((vector signed char) (a1))), \
! __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \
  __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector signed int) __builtin_altivec_vupklsh ((vector signed short) (a1))), \
--- 7507,7513 ----
  #define vec_unpackl(a1) \
  __ch (__un_args_eq (vector signed char, (a1)), \
        ((vector signed short) __builtin_altivec_vupklsb ((vector signed char) (a1))), \
! __ch (__un_args_eq (vector unsigned short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \
  __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector signed int) __builtin_altivec_vupklsh ((vector signed short) (a1))), \
*************** __ch (__un_args_eq (vector signed short,
*** 7417,7423 ****
  __altivec_link_error_invalid_argument ())
  
  #define vec_vupklpx(a1) \
! __ch (__un_args_eq (vector signed short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \
  __altivec_link_error_invalid_argument ())
  
--- 7519,7525 ----
  __altivec_link_error_invalid_argument ())
  
  #define vec_vupklpx(a1) \
! __ch (__un_args_eq (vector unsigned short, (a1)), \
        ((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \
  __altivec_link_error_invalid_argument ())
  
*************** __ch (__bin_args_eq (vector float, ((a1)
*** 7433,7442 ****
        ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned int, ((a1)), vector float, ((a2))), \
        ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed int, ((a1)), vector signed int, ((a2))), \
        ((vector signed int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
- __ch (__bin_args_eq (vector unsigned int, ((a1)), vector unsigned int, ((a2))), \
-       ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed int, ((a1)), vector unsigned int, ((a2))), \
        ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned int, ((a1)), vector signed int, ((a2))), \
--- 7535,7546 ----
        ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned int, ((a1)), vector float, ((a2))), \
        ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+ __ch (__bin_args_eq (vector signed int, ((a1)), vector float, ((a2))), \
+       ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+ __ch (__bin_args_eq (vector float, ((a1)), vector signed int, ((a2))), \
+       ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed int, ((a1)), vector signed int, ((a2))), \
        ((vector signed int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed int, ((a1)), vector unsigned int, ((a2))), \
        ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned int, ((a1)), vector signed int, ((a2))), \
*************** __ch (__bin_args_eq (vector unsigned int
*** 7446,7454 ****
  __ch (__bin_args_eq (vector unsigned short, ((a1)), vector unsigned short, ((a2))), \
        ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed short, ((a1)), vector unsigned short, ((a2))), \
!       ((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned short, ((a1)), vector signed short, ((a2))), \
!       ((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned short, ((a1)), vector unsigned short, ((a2))), \
        ((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed short, ((a1)), vector signed short, ((a2))), \
--- 7550,7558 ----
  __ch (__bin_args_eq (vector unsigned short, ((a1)), vector unsigned short, ((a2))), \
        ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed short, ((a1)), vector unsigned short, ((a2))), \
!       ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned short, ((a1)), vector signed short, ((a2))), \
!       ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned short, ((a1)), vector unsigned short, ((a2))), \
        ((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector signed short, ((a1)), vector signed short, ((a2))), \
*************** __ch (__bin_args_eq (vector unsigned cha
*** 7470,7477 ****
  __ch (__bin_args_eq (vector signed char, ((a1)), vector unsigned char, ((a2))), \
        ((vector signed char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned char, ((a1)), vector signed char, ((a2))), \
!       ((vector signed char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
!     __altivec_link_error_invalid_argument ()))))))))))))))))))))))
  
  /* Predicates.  */
  
--- 7574,7581 ----
  __ch (__bin_args_eq (vector signed char, ((a1)), vector unsigned char, ((a2))), \
        ((vector signed char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
  __ch (__bin_args_eq (vector unsigned char, ((a1)), vector signed char, ((a2))), \
!       ((vector unsigned char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
!     __altivec_link_error_invalid_argument ())))))))))))))))))))))))
  
  /* Predicates.  */
  


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