[applied] Reject Thumb-1 hard-float VFP

Submitted by Paul Brook on June 15, 2010, 1:44 p.m.

Details

Message ID 201006151444.51533.paul@codesourcery.com
State New
Headers show

Commit Message

Paul Brook June 15, 2010, 1:44 p.m.
We don't currently implement the hard-float VFP ABI for Thumb-1.  Patch below 
makes the compiler reject this rather than ICEing later on.

In theory we could support this. In practice we've seen no demand and it's not 
worth the effort. The sorry() is in use_vfp_abi rather than 
arm_override_options so that it also catches __attribute__((pcs(aapcs-vfp))).

Tested on arm-none-eabi.
Applied to SVN trunk.

Paul

2010-06-15  Paul Brook  <paul@codesourcery.com>
 
	gcc/
	* config/arm/arm.c (use_vfp_abi): Add sorry() for Thumb-1
	hard-float ABI.

Patch hide | download patch | download mbox

Index: gcc/config/arm/arm.c
===================================================================
--- gcc/config/arm/arm.c	(revision 160746)
+++ gcc/config/arm/arm.c	(working copy)
@@ -3821,7 +3821,18 @@  static bool
 use_vfp_abi (enum arm_pcs pcs_variant, bool is_double)
 {
   if (pcs_variant == ARM_PCS_AAPCS_VFP)
-    return true;
+    {
+      static bool seen_thumb1_vfp = false;
+
+      if (TARGET_THUMB1 && !seen_thumb1_vfp)
+	{
+	  sorry ("Thumb-1 hard-float VFP ABI");
+	  /* sorry() is not immediately fatal, so only display this once.  */
+	  seen_thumb1_vfp = true;
+	}
+
+      return true;
+    }
 
   if (pcs_variant != ARM_PCS_AAPCS_LOCAL)
     return false;