[PATCH, ARM]: Fix diagnostics & disallow ARM instructions on V7M cores
Julian Brown
julian@codesourcery.com
Fri May 12 02:08:00 GMT 2006
Hi,
This patch fixes the case where the diagnostic on attempting to assemble
files containing ARM instructions on processors which don't support them
isn't very helpful (e.g. "instruction not supported -- `nop'"). Thumb
mode is made the default on such cores, and attempts to use the ".arm"
directive or ARM instructions is faulted.
Tested with "make check" with cross to arm-none-eabi, with a small test
case added.
OK to apply on mainline? CSL branch?
Cheers,
Julian
ChangeLog (gas):
* config/tc-arm.c (arm_thumb_only, arm_thumb_only_except): Add
static vars.
(md_assemble): Disable 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.
(s_arm_cpu, s_arm_arch): Likewise.
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.
ChangeLog (include/opcode):
* arm.h (THUMB_ONLY): New macro. Architectures which support only
Thumb instructions.
(THUMB_ONLY_EXCEPT): Bits set here negate the above cases.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: v7m-no-arm-2
URL: <https://sourceware.org/pipermail/binutils/attachments/20060512/31ae1605/attachment.ksh>
More information about the Binutils
mailing list