From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14430 invoked by alias); 11 May 2006 22:21:45 -0000 Received: (qmail 14412 invoked by uid 22791); 11 May 2006 22:21:42 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 May 2006 22:21:39 +0000 Received: (qmail 18784 invoked from network); 11 May 2006 22:21:37 -0000 Received: from unknown (HELO 81-178-245-196.dsl.pipex.com) (paul@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 May 2006 22:21:37 -0000 From: Paul Brook To: binutils@sourceware.org Subject: Re: [PATCH, ARM]: Fix diagnostics & disallow ARM instructions on V7M cores Date: Fri, 12 May 2006 05:49:00 -0000 User-Agent: KMail/1.9.1 Cc: Julian Brown , binutils@sources.redhat.com, Richard Earnshaw References: <4463AB5D.6070108@codesourcery.com> In-Reply-To: <4463AB5D.6070108@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-ID: <200605112321.35247.paul@codesourcery.com> Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00229.txt.bz2 Message-ID: <20060512054900.WrMz8VMU-EiniUs5OMYZV5MZQJ_39e_Fke-VBrgMEH8@z> On Thursday 11 May 2006 22:23, Julian Brown wrote: > + #define THUMB_ONLY=A0=A0=A0=A0 =A0(ARM_EXT_V7 | ARM_EXT_V7M) > + #define THUMB_ONLY_EXCEPT (ARM_EXT_V7A | ARM_EXT_V7R) I don't think these are necessary. In opcode_select we already have: if (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1)) as_bad (_("selected processor does not support ARM opcodes")); That condition should be ok whenever we need to check for a Thumb-only core. > *************** md_begin (void) > *** 18396,18401 **** > --- 18417,18424 ---- > =A0 > =A0 =A0 ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt); > =A0 > + =A0 autoselect_thumb_from_cpu_variant (); > + > =A0 =A0 arm_arch_used =3D thumb_arch_used =3D arm_arch_none; Defaulting to thumb mode if a Thumb only core is specified on the commandli= ne=20 ok I guess, however... =A0 > =A0 #if defined OBJ_COFF || defined OBJ_ELF > *************** s_arm_cpu (int ignored ATTRIBUTE_UNUSED) > *** 19457,19462 **** > --- 19480,19486 ---- > =A0 =A0=A0=A0=A0=A0=A0 =A0 =A0selected_cpu_name[i] =3D 0; > =A0 =A0=A0=A0=A0=A0=A0 =A0} > =A0 =A0=A0=A0=A0=A0=A0ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt,= *mfpu_opt); > + =A0 =A0 =A0 =A0 autoselect_thumb_from_cpu_variant (); I don't think making .arch armv7 imply .thumb is a good idea.=20 If we do this we should also make .arch armv4 imply .arm. Paul