From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18653 invoked by alias); 7 Apr 2009 05:04:43 -0000 Received: (qmail 18642 invoked by uid 22791); 7 Apr 2009 05:04:42 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS 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.43rc1) with ESMTP; Tue, 07 Apr 2009 05:04:34 +0000 Received: from spaceape13.eur.corp.google.com (spaceape13.eur.corp.google.com [172.28.16.147]) by smtp-out.google.com with ESMTP id n3754TlW029399; Mon, 6 Apr 2009 22:04:29 -0700 Received: from smtp.corp.google.com (spacemonkey1.corp.google.com [192.168.120.115]) by spaceape13.eur.corp.google.com with ESMTP id n3754PLA028958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 6 Apr 2009 22:04:26 -0700 Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id n3754NY8013080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 6 Apr 2009 22:04:24 -0700 To: marian@jozep.com.au Cc: "John \(Eljay\) Love-Jensen" , Jeff Chimene , GCC-help Subject: Re: GCC assmbler for powerpc-eabi References: <1239065496.7224.69.camel@beast> From: Ian Lance Taylor Date: Tue, 07 Apr 2009 05:04:00 -0000 In-Reply-To: <1239065496.7224.69.camel@beast> (marian@jozep.com.au's message of "Tue\, 07 Apr 2009 10\:51\:36 +1000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true 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: 2009-04/txt/msg00072.txt.bz2 marian writes: > crxor 6,6,6 <<<< WHY <<<<<< > bl sprintf The various PPC ABIs are unreasonably complicated. The crxor instruction is required by some of them. It is used when calling a function which takes a variable number of arguments. crxor is used to indicate that no floating point arguments were passed. creqv is used to indicate that at least one floating point argument was passed. The varargs function checks the condition register to see whether it has to push the floating point parameter registers on the stack in order to let va_arg work correctly. Since most varargs functions do not have any floating point arguments, it is usually a good tradeoff to have one exact instruction in the caller to save several memory operations in the callee. If you prefer a different tradeoff, you can fool with the -mcall-XXX options. Ian