7 #include <capstone/capstone.h>
23 "X86 32 (Intel syntax)"
29 "X86 64 (Intel syntax)"
71 "MIPS-32 (Big-endian)"
83 "MIPS-64-EL (Little-endian)"
89 "MIPS-32-EL (Little-endian)"
95 "MIPS-64 (Big-endian)"
101 "MIPS-32 | Micro (Big-endian)"
137 "MIPS-32R6 (Big-endian)"
143 "MIPS-32R6 (Micro+Big-endian)"
149 "MIPS-32R6 (Little-endian)"
155 "MIPS-32R6 (Micro+Little-endian)"
185 size_t * Sizep = &Size;
187 char LLVMAssemblyText[80];
188 char CapstoneAssemblyText[80];
193 }
else if (Size > 0x1000) {
199 outfile = fopen(
"/dev/null",
"w");
224 snprintf(CapstoneAssemblyText, 80,
"\t%s\t%s", insn->mnemonic, insn->op_str);
225 if (strcmp(CapstoneAssemblyText, LLVMAssemblyText) != 0) {
226 printf(
"capstone %s != llvm %s", CapstoneAssemblyText, LLVMAssemblyText);
230 printf(
"capstone failed with llvm %s", LLVMAssemblyText);
static mcore_handle handle
cs_arch
Architecture type.
@ CS_ARCH_ARM64
ARM-64, also called AArch64.
@ CS_ARCH_SPARC
Sparc architecture.
@ CS_ARCH_XCORE
XCore architecture.
@ CS_ARCH_M68K
68K architecture
@ CS_ARCH_X86
X86 architecture (including x86 & x86-64)
@ CS_ARCH_M680X
680X architecture
@ CS_ARCH_ARM
ARM architecture (including Thumb, Thumb-2)
@ CS_ARCH_MIPS
Mips architecture.
@ CS_ARCH_SYSZ
SystemZ architecture.
@ CS_ARCH_EVM
Ethereum architecture.
@ CS_ARCH_PPC
PowerPC architecture.
@ CS_MODE_MCLASS
ARM's Cortex-M series.
@ CS_MODE_64
64-bit mode (X86, PPC)
@ CS_MODE_MIPS64
Mips64 ISA (Mips)
@ CS_MODE_32
32-bit mode (X86)
@ CS_MODE_V8
ARMv8 A32 encodings for ARM.
@ CS_MODE_MICRO
MicroMips mode (MIPS)
@ CS_MODE_MIPS32
Mips32 ISA (Mips)
@ CS_MODE_MIPS32R6
Mips32r6 ISA.
@ CS_MODE_BIG_ENDIAN
big-endian mode
@ CS_MODE_V9
SparcV9 mode (Sparc)
@ CS_MODE_THUMB
ARM's Thumb mode, including Thumb-2.
@ CS_MODE_M680X_6809
M680X Motorola 6809 mode.
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
CAPSTONE_EXPORT cs_insn *CAPSTONE_API cs_malloc(csh ud)
CAPSTONE_EXPORT bool CAPSTONE_API cs_disasm_iter(csh ud, const uint8_t **code, size_t *size, uint64_t *address, cs_insn *insn)
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
int LLVMFuzzerReturnOneInput(const uint8_t *Data, size_t Size, char *AssemblyText)
struct platform platforms[]
assert(limit<=UINT32_MAX/2)