This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: altivec c++ obvious fixes
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dje at watson dot ibm dot com
- Date: Tue, 5 Feb 2002 19:27:01 +1100
- Subject: Re: altivec c++ obvious fixes
On Tuesday, February 5, 2002, at 07:16 PM, Richard Henderson wrote:
> On Tue, Feb 05, 2002 at 07:05:59PM +1100, Aldy Hernandez wrote:
>> ...me being completely c++ illiterate... how would i do that?
>>
>
> In this case, I think just naming the thing __vec_size_help.
oh... thaaaat.
i think i'm past my quota of obvious patches for today, but what
the hell...
commited as obvious.
2002-02-05 Aldy Hernandez <aldyh@redhat.com>
* altivec.h (vec_step_help): Rename to __vec_step_help.
Index: config/rs6000/altivec.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/altivec.h,v
retrieving revision 1.7
diff -c -p -r1.7 altivec.h
*** altivec.h 2002/02/05 07:56:33 1.7
--- altivec.h 2002/02/05 08:25:10
*************** vec_any_out (vector float a1, vector flo
*** 4057,4110 ****
/* vec_step */
template<typename _Tp>
! struct vec_step_help
{
// All proper vector types will specialize elem.
};
template<>
! struct vec_step_help<vector signed short>
{
static const int elem = 8;
};
template<>
! struct vec_step_help<vector unsigned short>
{
static const int elem = 8;
};
template<>
! struct vec_step_help<vector signed int>
{
static const int elem = 4;
};
template<>
! struct vec_step_help<vector unsigned int>
{
static const int elem = 4;
};
template<>
! struct vec_step_help<vector unsigned char>
{
static const int elem = 16;
};
template<>
! struct vec_step_help<vector signed char>
{
static const int elem = 16;
};
template<>
! struct vec_step_help<vector float>
{
static const int elem = 4;
};
! #define vec_step(t) vec_step_help<t>::elem
#else /* not C++ */
--- 4057,4110 ----
/* vec_step */
template<typename _Tp>
! struct __vec_step_help
{
// All proper vector types will specialize elem.
};
template<>
! struct __vec_step_help<vector signed short>
{
static const int elem = 8;
};
template<>
! struct __vec_step_help<vector unsigned short>
{
static const int elem = 8;
};
template<>
! struct __vec_step_help<vector signed int>
{
static const int elem = 4;
};
template<>
! struct __vec_step_help<vector unsigned int>
{
static const int elem = 4;
};
template<>
! struct __vec_step_help<vector unsigned char>
{
static const int elem = 16;
};
template<>
! struct __vec_step_help<vector signed char>
{
static const int elem = 16;
};
template<>
! struct __vec_step_help<vector float>
{
static const int elem = 4;
};
! #define vec_step(t) __vec_step_help<t>::elem
#else /* not C++ */
>
>
> r~
>
>
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy Lost in Australia
Red Hat, Inc.