This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH, ARM]: Fix diagnostics & disallow ARM instructions on V7M cores
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Julian Brown <julian at codesourcery dot com>, binutils at sources dot redhat dot com, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Thu, 11 May 2006 23:21:34 +0100
- Subject: Re: [PATCH, ARM]: Fix diagnostics & disallow ARM instructions on V7M cores
- References: <4463AB5D.6070108@codesourcery.com>
On Thursday 11 May 2006 22:23, Julian Brown wrote:
> + #define THUMB_ONLY???? ?(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 ----
> ?
> ? ? ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
> ?
> + ? autoselect_thumb_from_cpu_variant ();
> +
> ? ? arm_arch_used = thumb_arch_used = arm_arch_none;
Defaulting to thumb mode if a Thumb only core is specified on the commandline
ok I guess, however...
?
> ? #if defined OBJ_COFF || defined OBJ_ELF
> *************** s_arm_cpu (int ignored ATTRIBUTE_UNUSED)
> *** 19457,19462 ****
> --- 19480,19486 ----
> ? ?????? ? ?selected_cpu_name[i] = 0;
> ? ?????? ?}
> ? ??????ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
> + ? ? ? ? autoselect_thumb_from_cpu_variant ();
I don't think making .arch armv7 imply .thumb is a good idea.
If we do this we should also make .arch armv4 imply .arm.
Paul