From patchwork Tue Jun 15 13:44:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Brook X-Patchwork-Id: 55668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8D4A7B7D7F for ; Tue, 15 Jun 2010 23:45:06 +1000 (EST) Received: (qmail 14667 invoked by alias); 15 Jun 2010 13:45:03 -0000 Received: (qmail 14612 invoked by uid 22791); 15 Jun 2010 13:45:02 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, TW_VF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Jun 2010 13:44:57 +0000 Received: (qmail 935 invoked from network); 15 Jun 2010 13:44:55 -0000 Received: from unknown (HELO wren.localnet) (paul@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Jun 2010 13:44:55 -0000 From: Paul Brook To: gcc-patches@gcc.gnu.org Subject: [applied] Reject Thumb-1 hard-float VFP Date: Tue, 15 Jun 2010 14:44:50 +0100 User-Agent: KMail/1.13.3 (Linux/2.6.33-2-amd64; KDE/4.4.4; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201006151444.51533.paul@codesourcery.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 gcc/ * config/arm/arm.c (use_vfp_abi): Add sorry() for Thumb-1 hard-float ABI. 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;