Skip to content

Commit

Permalink
opcodes/riscv-dis.c: Remove last_map_state
Browse files Browse the repository at this point in the history
Before changing the core disassembler, we take care of minor code clarity
issues and improve readability.

This commit removes unused variable last_map_state (set by the
print_insn_riscv function but not read anywhere else).

opcodes/ChangeLog:

	* riscv-dis.c (last_map_state): Remove.
	(print_insn_riscv): Remove setting last_map_state.
  • Loading branch information
a4lg committed Oct 14, 2022
1 parent 3009ffe commit 637d7c1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions opcodes/riscv-dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ struct riscv_private_data
/* Used for mapping symbols. */
static int last_map_symbol = -1;
static bfd_vma last_stop_offset = 0;
enum riscv_seg_mstate last_map_state;

/* Register names as used by the disassembler. */
static const char * const *riscv_gpr_names;
Expand Down Expand Up @@ -1041,8 +1040,6 @@ print_insn_riscv (bfd_vma memaddr, struct disassemble_info *info)
set_default_riscv_dis_options ();

mstate = riscv_search_mapping_symbol (memaddr, info);
/* Save the last mapping state. */
last_map_state = mstate;

/* Set the size to dump. */
if (mstate == MAP_DATA
Expand Down

0 comments on commit 637d7c1

Please sign in to comment.