Hi, Paul Brook wrote: > 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. Yeah, that does make things simpler -- this version of the patch uses arm_ext_v1 as a condition instead. > Defaulting to thumb mode if a Thumb only core is specified on the commandline > ok I guess, however... > 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. OK, I've only made the auto-selection happen for command-line arch/cpu selection only. That probably has less potential for confusion. Patch re-tested. OK to apply now? Cheers, Julian ChangeLog: ChangeLog (gas): * config/tc-arm.c (md_assemble): Improve diagnostic when attempting to use ARM instructions on non-ARM-supporting cores. (autoselect_thumb_from_cpu_variant): New function. Switch on Thumb mode automatically based on cpu variant. (md_begin): Call above function. ChangeLog (gas/testsuite): * gas/arm/noarm.s: Add test for disabled ARM insns. * gas/arm/noarm.d: Drive test for above. * gas/arm/noarm.l: Expected error output.