[PATCH, ARM]: Fix diagnostics & disallow ARM instructions on V7M cores
Paul Brook
paul@codesourcery.com
Fri May 12 05:49:00 GMT 2006
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
More information about the Binutils
mailing list