From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26394 invoked by alias); 8 Apr 2003 08:53:36 -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 26386 invoked from network); 8 Apr 2003 08:53:34 -0000 Received: from unknown (HELO Angel.zoy.org) (12.210.238.170) by sources.redhat.com with SMTP; 8 Apr 2003 08:53:34 -0000 Received: by Angel.zoy.org (Postfix, from userid 1000) id 77EB9BB95; Tue, 8 Apr 2003 01:53:30 -0700 (PDT) Date: Tue, 08 Apr 2003 10:10:00 -0000 From: Michel LESPINASSE To: gcc@gcc.gnu.org Subject: altivec support in gcc Message-ID: <20030408085330.GC20370@zoy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.3i X-SW-Source: 2003-04/txt/msg00306.txt.bz2 Hi, I have a few questions about the altivec support in gcc... First, is there any reason why altivec.h defines the second argument in vec_ld as being a vector pointer instead of a const vector pointer ? This is causing me no ends of trouble. Second, I have not tried gcc 3.3 yet, but gcc 3.2 has a lot of trouble compiling the following construct... it does compile it eventually, but it requires hundreds of megabytes of virtual memory for doing it... (This code is meant as a shortcut for calculating (A+B+C+D+2)>>2, for a vector of 16 unsigned char values. This is used in the motion compensation loop of an mpeg2 decoder.) ones = vec_splat_u8 (1); avg0 = vec_avg (A, B); xor0 = vec_xor (A, B); avg1 = vec_avg (C, D); xor1 = vec_xor (C, D); tmp = vec_and (vec_and (ones, vec_or (xor0, xor1)), vec_xor (avg0, avg1)); out = vec_sub (vec_avg (avg0, avg1), tmp); Initially I had only one out= assignment, i.e. I had put the tmp expression in place of the tmp variable in the current out assignment. I could not even get that code to compile, it made gcc inflate to over 700 MB. After splitting it as shown above, the code does compile fine, but GCC still inflates to over 300 MB compiling it. This is on a debian/sid system, the gcc -v version indicates: gcc -v Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.2.3/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc powerpc-linux Thread model: posix gcc version 3.2.3 20030316 (Debian prerelease) It's probably not a critical bug as it can be worked around by splitting expressions in smaller pieces, but I thought it should be signaled as it makes some code extremely slow to compile. For information, the same code used to compile just fine with apple's old altivec-patched gcc 2.95.x compiler. Hope this helps, -- Michel "Walken" LESPINASSE "In this time of war against Osama bin Laden and the oppressive Taliban regime, we are thankful that OUR leader isn't the spoiled son of a powerful politician from a wealthy oil family who is supported by religious fundamentalists, operates through clandestine organizations, has no respect for the democratic electoral process, bombs innocents, and uses war to deny people their civil liberties." --The Boondocks