Skip to content

Commit b490121

Browse files
committed
CHB: fix unused field warnings
1 parent c5e6d7a commit b490121

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

CodeHawk/CHB/bchlibelf/bCHDwarfOperationRecords.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,7 @@ let dwarf_operand_list_to_string
200200
let get_dw_op_name (op: dwarf_operation_t) = (get_dw_op_record op).mnemonic
201201

202202
let get_dw_op_operands (op: dwarf_operation_t) = (get_dw_op_record op).operands
203+
204+
let dwarf_operation_to_string (op: dwarf_operation_t): string =
205+
let default () = (get_dw_op_record op).dw_asm (mk_string_formatter 80) in
206+
default ()

CodeHawk/CHB/bchlibelf/bCHDwarfOperationRecords.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ val dwarf_operand_list_to_string: int -> string -> dwarf_operand_t list -> strin
3434
val get_dw_op_name: dwarf_operation_t -> string
3535

3636
val get_dw_op_operands: dwarf_operation_t -> dwarf_operand_t list
37+
38+
val dwarf_operation_to_string: dwarf_operation_t -> string

CodeHawk/CHB/bchlibpower32/bCHPowerOpcodeRecords.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,3 +2186,7 @@ let get_pwr_crfs_set (opc: pwr_opcode_t): pwr_register_field_t list =
21862186

21872187
let get_pwr_crfs_used (opc: pwr_opcode_t): pwr_register_field_t list =
21882188
(get_record opc).crfs_used
2189+
2190+
2191+
let get_pwr_operands (opc: pwr_opcode_t): pwr_operand_int list =
2192+
(get_record opc).operands

CodeHawk/CHB/bchlibpower32/bCHPowerOpcodeRecords.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ val pwr_opcode_name: pwr_opcode_t -> string
4040
val get_pwr_crfs_set: pwr_opcode_t -> pwr_register_field_t list
4141

4242
val get_pwr_crfs_used: pwr_opcode_t -> pwr_register_field_t list
43+
44+
val get_pwr_operands: pwr_opcode_t -> pwr_operand_int list

CodeHawk/CHB/bchlibx86/bCHX86OpcodeRecords.ml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4504,6 +4504,8 @@ let get_opcode_long_name (opc:opcode_t) = (get_record opc).long_name
45044504

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

4507+
let get_opcode_docref (opc: opcode_t): string = (get_record opc).docref
4508+
45074509

45084510
let is_conditional_instruction (opc:opcode_t) =
45094511
let cflags = (get_record opc).flags_used in
@@ -4516,6 +4518,11 @@ let opcode_to_string (opc:opcode_t) =
45164518
default ()
45174519

45184520

4521+
let opcode_to_att_string (opc: opcode_t) =
4522+
let default () = (get_record opc).att_asm string_formatter in
4523+
default ()
4524+
4525+
45194526
let write_xml_opcode (node:xml_element_int) (opc:opcode_t) (floc:floc_int) =
45204527
let default () =
45214528
let opr = get_record opc in

CodeHawk/CHB/bchlibx86/bCHX86OpcodeRecords.mli

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ val get_flags_used: opcode_t -> eflag_t list
5656

5757
val opcode_to_string: opcode_t -> string
5858

59+
val opcode_to_att_string: opcode_t -> string
60+
5961
val get_opcode_name: opcode_t -> string
6062

6163
val get_opcode_long_name: opcode_t -> string
6264

6365
val get_opcode_group: opcode_t -> string
6466

67+
val get_opcode_docref: opcode_t -> string
68+
6569
val is_conditional_instruction: opcode_t -> bool
6670

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

0 commit comments

Comments
 (0)