From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16863 invoked by alias); 29 Nov 2001 05:07:14 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16775 invoked from network); 29 Nov 2001 05:07:10 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by hostedprojects.ges.redhat.com with SMTP; 29 Nov 2001 05:07:10 -0000 Received: from fri.redhat.lsd.ic.unicamp.br (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id VAA07679; Wed, 28 Nov 2001 21:00:07 -0800 (PST) Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [192.168.160.1]) by fri.redhat.lsd.ic.unicamp.br (8.11.6/8.11.6) with ESMTP id fAT506t12314; Thu, 29 Nov 2001 03:00:06 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.11.6/8.11.6) id fAT504422662; Thu, 29 Nov 2001 03:00:04 -0200 X-Authentication-Warning: free.redhat.lsd.ic.unicamp.br: aoliva set sender to aoliva@redhat.com using -f To: Richard Henderson Cc: Aldy Hernandez , Stan Shebs , "Joseph S. Myers" , gcc@gcc.gnu.org Subject: Re: front end changes for altivec References: <1006874643.5176.8.camel@litecycle.cc.andrews.edu> <20011127132756.A30114@redhat.com> <1006898082.5178.41.camel@litecycle.cc.andrews.edu> <20011127140031.E30114@redhat.com> <3C0418B1.8B56487D@apple.com> <20011127151526.A30257@redhat.com> <1006909175.5178.51.camel@litecycle.cc.andrews.edu> <20011127170302.B30341@redhat.com> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Wed, 21 Nov 2001 13:08:00 -0000 In-Reply-To: Richard Henderson's message of "Tue, 27 Nov 2001 17:03:02 -0800" Message-ID: User-Agent: Gnus/5.0805 (Gnus v5.8.5) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2001-11/txt/msg01022.txt.bz2 On Nov 27, 2001, Richard Henderson wrote: > On Tue, Nov 27, 2001 at 06:59:35PM -0600, Aldy Hernandez wrote: >> why can't you have sizeof((vector int))? > Oh, you mean vector_width == sizeof(vector int) / sizeof(int)? > Um, I guess that works. > But what do you do with > vector int x = (vector int){ 1, 2, 3, 4 }; > when a vector is only two elements wide? How about requiring that variables of type vector always be arrays with their actual number of elements explicitly specified, or inferred from the initializer? We could still support implicit iteration over vector elements for operations such as copying, addition and subtraction, relieving the source code from the need to worry about the exact vector size, while still allowing code to pick into it somehow, for example: vector int x[] = { 1, 2, 3, 4, 5, 6, 7 }; // probably pads with 0s vector int y[7]; ... y = x; y = x + y; I'm unsure whether indexing such an array (x[n]) would get you the nth int or the nth vector element. I'm inclined to prefer the latter, even though it's a bit odd that you wouldn't be able to get x[6] on the vector above unless the machine didn't support any int-type vector mode, such that the int vector size is 1. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: Richard Henderson Cc: Aldy Hernandez , Stan Shebs , "Joseph S. Myers" , gcc@gcc.gnu.org Subject: Re: front end changes for altivec Date: Wed, 28 Nov 2001 21:07:00 -0000 Message-ID: References: <1006874643.5176.8.camel@litecycle.cc.andrews.edu> <20011127132756.A30114@redhat.com> <1006898082.5178.41.camel@litecycle.cc.andrews.edu> <20011127140031.E30114@redhat.com> <3C0418B1.8B56487D@apple.com> <20011127151526.A30257@redhat.com> <1006909175.5178.51.camel@litecycle.cc.andrews.edu> <20011127170302.B30341@redhat.com> X-SW-Source: 2001-11/msg01523.html Message-ID: <20011128210700.Oq83JEsWP7ItnzxpjI6kuxAc2Ca0IX1Y7Hml3A0vGqk@z> On Nov 27, 2001, Richard Henderson wrote: > On Tue, Nov 27, 2001 at 06:59:35PM -0600, Aldy Hernandez wrote: >> why can't you have sizeof((vector int))? > Oh, you mean vector_width == sizeof(vector int) / sizeof(int)? > Um, I guess that works. > But what do you do with > vector int x = (vector int){ 1, 2, 3, 4 }; > when a vector is only two elements wide? How about requiring that variables of type vector always be arrays with their actual number of elements explicitly specified, or inferred from the initializer? We could still support implicit iteration over vector elements for operations such as copying, addition and subtraction, relieving the source code from the need to worry about the exact vector size, while still allowing code to pick into it somehow, for example: vector int x[] = { 1, 2, 3, 4, 5, 6, 7 }; // probably pads with 0s vector int y[7]; ... y = x; y = x + y; I'm unsure whether indexing such an array (x[n]) would get you the nth int or the nth vector element. I'm inclined to prefer the latter, even though it's a bit odd that you wouldn't be able to get x[6] on the vector above unless the machine didn't support any int-type vector mode, such that the int vector size is 1. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me