]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-aarch64.c
[Morello] Add mapping symbol to identify C64 code sections
Add a mapping symbol $c at the beginning of every C64 code section to
allow the disassembler to identify C64 code sections. This will allow
the disassembler to print the correct base address registers and also
choose the correct disassembly in cases where the opcodes for A64 and
C64 instructions are aliased.
To aid correct disassembly of instructions, pass CPU variant to
various helpers in libopcodes so that they can use that information to
choose between A64 and C64 disassembly.
bfd/ChangeLog:
2020-10-20 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
* cpu-aarch64.c (bfd_is_aarch64_special_symbol_name): Add
capability mapping symbol.
* elfnn-aarch64.c (elfNN_aarch64_output_map_sym,
is_aarch64_mapping_symbol): Likewise.
gas/ChangeLog:
2020-10-20 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
* config/tc-aarch64.h (mstate): Add MAP_C64.
* config/tc-aarch64.c (make_mapping_symbol): Add capability
mapping symbol.
(MAP_CUR_INSN): New macro.
(mapping_state, s_aarch64_inst, md_assemble,
aarch64_handle_align, aarch64_init_frag): Use it.
(output_operand_error_record, do_encode,
try_to_encode_as_unscaled_ldst, fix_mov_imm_insn, fix_insn):
Pass CPU_VARIANT to AARCH64_OPCODE_ENCODE.
* doc/c-aarch64.texi: Document $c.
include/ChangeLog:
2020-10-20 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
* opcode/aarch64.h (aarch64_opcode_encode): Add cpu variant
argument.
opcodes/ChangeLog:
2020-10-20 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
* aarch64-asm.c (aarch64_opcode_encode): Add CPU variant
argument.
* aarch64-dis.c (map_type): Add MAP_C64.
(MAYBE_C64): New macro.
(determine_disassembling_preference, print_operands): Use it.
(aarch64_symbol_is_valid): Test for $c.
(get_sym_code_type): Recognise MAP_C64.
(select_aarch64_variant): Clear AARCH64_FEATURE_C64.
(determine_disassembling_preference, aarch64_opcode_decode):
Adjust calls to aarch64_match_operands_constraint.
* aarch64-opc.c (get_altbase_reg_name, get_base_reg_name): New
functions.
(aarch64_print_operand): Use them.
(aarch64_match_operands_constraint): Likewise.
* aarch64-opc.h (aarch64_match_operands_constraint): Add CPU
variant argument.
14 files changed: