[Bug target/46128] New: There is no mechanism for detecting VFP revisions in ARM GCC.

Jacob.Bramley at arm dot com gcc-bugzilla@gcc.gnu.org
Fri Oct 22 07:53:00 GMT 2010


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.



More information about the Gcc-bugs mailing list