Skip to content

Commit

Permalink
CHB: fix unused field warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sipma committed Oct 7, 2024
1 parent c5e6d7a commit b490121
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CodeHawk/CHB/bchlibelf/bCHDwarfOperationRecords.ml
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,7 @@ let dwarf_operand_list_to_string
let get_dw_op_name (op: dwarf_operation_t) = (get_dw_op_record op).mnemonic

let get_dw_op_operands (op: dwarf_operation_t) = (get_dw_op_record op).operands

let dwarf_operation_to_string (op: dwarf_operation_t): string =
let default () = (get_dw_op_record op).dw_asm (mk_string_formatter 80) in
default ()
2 changes: 2 additions & 0 deletions CodeHawk/CHB/bchlibelf/bCHDwarfOperationRecords.mli
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ val dwarf_operand_list_to_string: int -> string -> dwarf_operand_t list -> strin
val get_dw_op_name: dwarf_operation_t -> string

val get_dw_op_operands: dwarf_operation_t -> dwarf_operand_t list

val dwarf_operation_to_string: dwarf_operation_t -> string
4 changes: 4 additions & 0 deletions CodeHawk/CHB/bchlibpower32/bCHPowerOpcodeRecords.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2186,3 +2186,7 @@ let get_pwr_crfs_set (opc: pwr_opcode_t): pwr_register_field_t list =

let get_pwr_crfs_used (opc: pwr_opcode_t): pwr_register_field_t list =
(get_record opc).crfs_used


let get_pwr_operands (opc: pwr_opcode_t): pwr_operand_int list =
(get_record opc).operands
2 changes: 2 additions & 0 deletions CodeHawk/CHB/bchlibpower32/bCHPowerOpcodeRecords.mli
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ val pwr_opcode_name: pwr_opcode_t -> string
val get_pwr_crfs_set: pwr_opcode_t -> pwr_register_field_t list

val get_pwr_crfs_used: pwr_opcode_t -> pwr_register_field_t list

val get_pwr_operands: pwr_opcode_t -> pwr_operand_int list
7 changes: 7 additions & 0 deletions CodeHawk/CHB/bchlibx86/bCHX86OpcodeRecords.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4504,6 +4504,8 @@ let get_opcode_long_name (opc:opcode_t) = (get_record opc).long_name

let get_opcode_group (opc:opcode_t) = (get_record opc).group_name

let get_opcode_docref (opc: opcode_t): string = (get_record opc).docref


let is_conditional_instruction (opc:opcode_t) =
let cflags = (get_record opc).flags_used in
Expand All @@ -4516,6 +4518,11 @@ let opcode_to_string (opc:opcode_t) =
default ()


let opcode_to_att_string (opc: opcode_t) =
let default () = (get_record opc).att_asm string_formatter in
default ()


let write_xml_opcode (node:xml_element_int) (opc:opcode_t) (floc:floc_int) =
let default () =
let opr = get_record opc in
Expand Down
4 changes: 4 additions & 0 deletions CodeHawk/CHB/bchlibx86/bCHX86OpcodeRecords.mli
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ val get_flags_used: opcode_t -> eflag_t list

val opcode_to_string: opcode_t -> string

val opcode_to_att_string: opcode_t -> string

val get_opcode_name: opcode_t -> string

val get_opcode_long_name: opcode_t -> string

val get_opcode_group: opcode_t -> string

val get_opcode_docref: opcode_t -> string

val is_conditional_instruction: opcode_t -> bool

val write_xml_opcode: xml_element_int -> opcode_t -> floc_int -> unit

0 comments on commit b490121

Please sign in to comment.