Project Alice
Loading...
Searching...
No Matches
Disassembler.h
Go to the documentation of this file.
1/*===-- llvm-c/Disassembler.h - Disassembler Public C Interface ---*- C -*-===*\
2|* *|
3|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4|* Exceptions. *|
5|* See https://llvm.org/LICENSE.txt for license information. *|
6|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header provides a public interface to a disassembler library. *|
11|* LLVM provides an implementation of this interface. *|
12|* *|
13\*===----------------------------------------------------------------------===*/
14
15#ifndef LLVM_C_DISASSEMBLER_H
16#define LLVM_C_DISASSEMBLER_H
17
19#include "llvm-c/ExternC.h"
20
29
38LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo,
39 int TagType, LLVMOpInfoCallback GetOpInfo,
40 LLVMSymbolLookupCallback SymbolLookUp);
41
50LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU,
51 void *DisInfo, int TagType,
52 LLVMOpInfoCallback GetOpInfo,
53 LLVMSymbolLookupCallback SymbolLookUp);
54
63LLVMCreateDisasmCPUFeatures(const char *Triple, const char *CPU,
64 const char *Features, void *DisInfo, int TagType,
65 LLVMOpInfoCallback GetOpInfo,
66 LLVMSymbolLookupCallback SymbolLookUp);
67
73
74/* The option to produce marked up assembly. */
75#define LLVMDisassembler_Option_UseMarkup 1
76/* The option to print immediates as hex. */
77#define LLVMDisassembler_Option_PrintImmHex 2
78/* The option use the other assembler printer variant */
79#define LLVMDisassembler_Option_AsmPrinterVariant 4
80/* The option to set comment on instructions */
81#define LLVMDisassembler_Option_SetInstrComments 8
82 /* The option to print latency information alongside instructions */
83#define LLVMDisassembler_Option_PrintLatency 16
84
89
101 uint64_t BytesSize, uint64_t PC,
102 char *OutString, size_t OutStringSize);
103
109
110#endif /* LLVM_C_DISASSEMBLER_H */
#define LLVM_C_EXTERN_C_BEGIN
Definition: ExternC.h:35
#define LLVM_C_EXTERN_C_END
Definition: ExternC.h:36
const char *(* LLVMSymbolLookupCallback)(void *DisInfo, uint64_t ReferenceValue, uint64_t *ReferenceType, uint64_t ReferencePC, const char **ReferenceName)
LLVMDisasmContextRef LLVMCreateDisasmCPUFeatures(const char *Triple, const char *CPU, const char *Features, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
void LLVMDisasmDispose(LLVMDisasmContextRef DC)
size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes, uint64_t BytesSize, uint64_t PC, char *OutString, size_t OutStringSize)
LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
int(* LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, uint64_t Offset, uint64_t OpSize, uint64_t InstSize, int TagType, void *TagBuf)
LLVM_C_EXTERN_C_BEGIN LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo, int TagType, LLVMOpInfoCallback GetOpInfo, LLVMSymbolLookupCallback SymbolLookUp)
int LLVMSetDisasmOptions(LLVMDisasmContextRef DC, uint64_t Options)
void * LLVMDisasmContextRef
ulong uint64_t
uchar uint8_t