aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Vieira <andre.simoesdiasvieira@arm.com>2024-11-08 10:06:26 +0000
committerAndre Vieira <andre.simoesdiasvieira@arm.com>2024-11-08 10:06:38 +0000
commit2c9d089c901afe818f4daa841ced44b87c517d82 (patch)
treee27d8ec7783e9d8feac433ebda912d05a51c50ff /opcodes/arc-ext.c
parent[gdb/tdep] Use raw_supply_zeroed in i387_supply_xsave (diff)
downloadbinutils-gdb-2c9d089c901afe818f4daa841ced44b87c517d82.tar.gz
binutils-gdb-2c9d089c901afe818f4daa841ced44b87c517d82.tar.bz2
binutils-gdb-2c9d089c901afe818f4daa841ced44b87c517d82.zip
arm, objdump: Make objdump use bfd's machine detection to drive disassembly
For any arm elf target, disable an old piece of code that forced disassembly to disassemble for 'unknown architecture' which once upon a time meant it would disassemble ANY arm instruction. This is no longer true with the addition of Armv8.1-M Mainline, as there are conflicting encodings for different thumb instructions. BFD however can detect what architecture the object file was assembled for using information in the notes section. So if available, we use that, otherwise we default to the old 'unknown' behaviour. With the changes above code, a mode changing 'bx lr' assembled for armv4 with the option --fix-v4bx will result in an object file that is recognized by bfd as one for the armv4 architecture. The disassembler now disassembles this encoding as a BX even for Armv4 architectures, but warns the user when disassembling for Armv4 that this instruction is only valid from Armv4T onwards. Remove the unused and wrongfully defined ARM_ARCH_V8A_CRC, and define and use a ARM_ARCH_V8R_CRC to make sure instructions enabled by -march=armv8-r+crc are disassembled correctly. Patch up some of the tests cases, see a brief explanation for each below. inst.d: This test checks the assembly & disassembly of basic instructions in armv3m. I changed the expected behaviour for teqp, cmnp cmpp and testp instructions to properly print p when disassembling, whereas before, in the 'unknown' case it would disassemble these as UNPREDICTABLE as they were changed in later architectures. nops.d: Was missing an -march, added one to make sure we were testing the right behavior of NOP<c> instructions. unpredictable.d: Was missing an -march, added armv6 as that reproduced the behaviour being tested.
Diffstat (limited to 'opcodes/arc-ext.c')
0 files changed, 0 insertions, 0 deletions