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: unassig...@gcc.gnu.org ReportedBy: jacob.bram...@arm.com CC: rearn...@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.