From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6967 invoked by alias); 13 Mar 2008 05:56:48 -0000 Received: (qmail 6959 invoked by uid 22791); 13 Mar 2008 05:56:47 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Mar 2008 05:56:24 +0000 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id m2D5uKbK003647; Wed, 12 Mar 2008 22:56:20 -0700 Received: from smtp.corp.google.com (spacemonkey1.corp.google.com [192.168.120.115]) by zps36.corp.google.com with ESMTP id m2D5uJ8P030031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 12 Mar 2008 22:56:19 -0700 Received: from localhost.localdomain.google.com (adsl-76-249-168-94.dsl.pltn13.sbcglobal.net [76.249.168.94]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id m2D5uIxr030916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 12 Mar 2008 21:56:19 -0800 To: "Clem Taylor" Cc: gcc-help@gcc.gnu.org Subject: Re: workaround for "error: more than 30 operands in 'asm'"? References: From: Ian Lance Taylor Date: Thu, 13 Mar 2008 05:56:00 -0000 In-Reply-To: (Clem Taylor's message of "Wed\, 12 Mar 2008 19\:25\:12 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00115.txt.bz2 "Clem Taylor" writes: > I'm working on taking PowerPC VMX code that uses altivec intrinsics > and rescheduling it with inline assembly. gcc is making some fairly > bad scheduling choices in with the code, resulting in code that is > running 4x slower then I was hoping for. I have a simplified version > working, but with the real version gcc is failing with: "error: more > than 30 operands in 'asm'". The code is using 28 vector registers and > 6 serial registers. > > The code is a mixture of setup code in C and only the inner loop is in > assembly, so it wouldn't be convenient to write this directly in > assembly. Also, because the code is highly pipelined (to overcome the > latency of the VMX floating point unit) it is a mess to split this up > into multiple asm() statements. Beyond recompiling gcc with a larger > operand count, is there a workaround for this problem? Use fewer operands? Otherwise, no. It's a hard limit in gcc. Since you mention the number of registers you are using, note that that only matters if they are inputs or outputs. If you need a temporary register, just pick one, and add it the clobber list. But if you really have that many inputs and outputs, then you are stuck. Ian