From patchwork Thu Sep 15 08:48:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 114769 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 21DB0B70D1 for ; Thu, 15 Sep 2011 18:49:28 +1000 (EST) Received: (qmail 28464 invoked by alias); 15 Sep 2011 08:49:23 -0000 Received: (qmail 28452 invoked by uid 22791); 15 Sep 2011 08:49:21 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, MSGID_MULTIPLE_AT, SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 15 Sep 2011 08:49:07 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 15 Sep 2011 09:49:05 +0100 Received: from e103039 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 15 Sep 2011 09:49:03 +0100 From: "James Greenhalgh" To: Subject: [Patch ARM] Add predefined macro when unaligned access is available. Date: Thu, 15 Sep 2011 09:48:55 +0100 Message-ID: <000f01cc7384$4ddfed60$e99fc820$@greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: 111091509490500501 X-IsSubscribed: yes 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 Hi, This patch adds a predefined macro __ARM_FEATURE_UNALIGNED which is set when unaligned access is supported in hardware and enabled by users. Thanks, James Greenhalgh gcc/ 2011-09-14 James Greenhalgh * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): New builtin macro. diff --git gcc/config/arm/arm.h gcc/config/arm/arm.h index 208ee51..a76988e 100644 --- gcc/config/arm/arm.h +++ gcc/config/arm/arm.h @@ -47,6 +47,8 @@ extern char arm_arch_name[]; { \ if (TARGET_DSP_MULTIPLY) \ builtin_define ("__ARM_FEATURE_DSP"); \ + if (unaligned_access) \ + builtin_define ("__ARM_FEATURE_UNALIGNED"); \ /* Define __arm__ even when in thumb mode, for \ consistency with armcc. */ \ builtin_define ("__arm__"); \