From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1904 invoked by alias); 22 Oct 2010 07:53:04 -0000 Received: (qmail 1893 invoked by uid 22791); 22 Oct 2010 07:53:02 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Oct 2010 07:52:56 +0000 From: "Jacob.Bramley at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/46128] New: There is no mechanism for detecting VFP revisions in ARM GCC. X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: Jacob.Bramley at arm dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 22 Oct 2010 07:53:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg01865.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46128 Summary: There is no mechanism for detecting VFP revisions in ARM GCC. Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: Jacob.Bramley@arm.com CC: rearnsha@gcc.gnu.org Target: ARM There is currently no mechanism for detecting different versions of VFP using the pre-processor. In C code, this is not a problem, but it is necessary information when writing in-line assembly code that needs to be portable across ARM platforms. As a real-world example, consider the following Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=601914 In that example, Siahei wrote an in-line assembly block that constructs scripted arguments according to EABI ('hard' variant), then calls the specified function. However, in order to do this safely, we have to specify all the scratch registers in the clobber list, including D16-D31. Luckily, it seems that GCC accepts these in the clobber list even on VFPv3-D16, but will that always be the case? More generally, it would be beneficial to be able to optimize routines using specific VFPv3 instructions (such as VMOV's immediate-operand form), or to make use of VFPv4's fused-mulitply-accumulate instructions.