2 #if defined(_MSC_VER) && _MSC_VER < 1900
3 #define _CRT_SECURE_NO_WARNINGS
10 #include <capstone/capstone.h>
30 "X86 32 (Intel syntax)",
37 "X86 64 (Intel syntax)",
86 "MIPS-32 (Big-endian)",
100 "MIPS-64-EL (Little-endian)",
107 "MIPS-32-EL (Little-endian)",
114 "MIPS-64 (Big-endian)",
121 "MIPS-32 | Micro (Big-endian)",
163 "MIPS-32R6 (Big-endian)",
170 "MIPS-32R6 (Micro+Big-endian)",
177 "MIPS-32R6 (Little-endian)",
184 "MIPS-32R6 (Micro+Little-endian)",
230 }
else if (Size > 0x1000) {
236 outfile = fopen(
"/dev/null",
"w");
243 int i = (
int)Data[0] % platforms_len;
258 for (j = 0; j <
count; j++) {
259 cs_insn *
i = &(all_insn[j]);
260 fprintf(
outfile,
"0x%"PRIx64":\t%s\t\t%s // insn-ID: %u, insn-mnem: %s\n",
261 i->address,
i->mnemonic,
i->op_str,
266 if (
detail->regs_read_count > 0) {
267 fprintf(
outfile,
"\tImplicit registers read: ");
268 for (
n = 0;
n <
detail->regs_read_count;
n++) {
273 if (
detail->regs_write_count > 0) {
274 fprintf(
outfile,
"\tImplicit registers modified: ");
275 for (
n = 0;
n <
detail->regs_write_count;
n++) {
280 if (
detail->groups_count > 0) {
281 fprintf(
outfile,
"\tThis instruction belongs to groups: ");
282 for (
n = 0;
n <
detail->groups_count;
n++) {
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_TMS320C64X
TMS320C64x 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.
@ CS_OPT_DETAIL
Break down instruction structure into details.
@ CS_OPT_ON
Turn ON an option (CS_OPT_DETAIL, CS_OPT_SKIPDATA).
CAPSTONE_EXPORT size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64_t offset, size_t count, cs_insn **insn)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_group_name(csh ud, unsigned int group)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_open(cs_arch arch, cs_mode mode, csh *handle)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_insn_name(csh ud, unsigned int insn)
CAPSTONE_EXPORT void CAPSTONE_API cs_free(cs_insn *insn, size_t count)
CAPSTONE_EXPORT const char *CAPSTONE_API cs_reg_name(csh ud, unsigned int reg)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_close(csh *handle)
CAPSTONE_EXPORT cs_err CAPSTONE_API cs_option(csh ud, cs_opt_type type, size_t value)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
struct platform platforms[]
const char * cs_fuzz_arch(uint8_t arch)