• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2024 Intel Corporation
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #pragma once
7 
8 #include <stdio.h>
9 #include <stdbool.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 struct elk_isa_info;
16 struct elk_inst;
17 
18 const struct elk_label *elk_find_label(const struct elk_label *root, int offset);
19 void elk_create_label(struct elk_label **labels, int offset, void *mem_ctx);
20 int elk_disassemble_inst(FILE *file, const struct elk_isa_info *isa,
21                          const struct elk_inst *inst, bool is_compacted,
22                          int offset, const struct elk_label *root_label);
23 const struct
24 elk_label *elk_label_assembly(const struct elk_isa_info *isa,
25                               const void *assembly, int start, int end,
26                               void *mem_ctx);
27 void elk_disassemble_with_labels(const struct elk_isa_info *isa,
28                                  const void *assembly, int start, int end, FILE *out);
29 void elk_disassemble(const struct elk_isa_info *isa,
30                      const void *assembly, int start, int end,
31                      const struct elk_label *root_label, FILE *out);
32 int elk_disassemble_find_end(const struct elk_isa_info *isa,
33                              const void *assembly, int start);
34 void elk_disassemble_with_errors(const struct elk_isa_info *isa,
35                                  const void *assembly, int start, FILE *out);
36 
37 #ifdef __cplusplus
38 } /* extern "C" */
39 #endif
40