| 1 | /* Capstone Disassembly Engine */cxx . . $ `<file>/arch/RISCV/RISCVModule.c`/ |
| 2 | /* RISC-V Backend By Rodrigo Cortes Porto <[email protected]> & |
| 3 | Shawn Chang <[email protected]>, HardenedLinux@2018 */ |
| 4 | |
| 5 | #ifdef CAPSTONE_HAS_RISCVcxx . . $ `<built-in>:425:9`! |
| 6 | |
| 7 | #include "../../utils.h"cxx . . $ `<file>/utils.h`/ |
| 8 | #include "../../MCRegisterInfo.h"cxx . . $ `<file>/MCRegisterInfo.h`/ |
| 9 | #include "RISCVDisassembler.h"cxx . . $ `<file>/arch/RISCV/RISCVDisassembler.h`/ |
| 10 | #include "RISCVInstPrinter.h"cxx . . $ `<file>/arch/RISCV/RISCVInstPrinter.h`/ |
| 11 | #include "RISCVMapping.h"cxx . . $ `<file>/arch/RISCV/RISCVMapping.h`/ |
| 12 | #include "RISCVModule.h"cxx . . $ `<file>/arch/RISCV/RISCVModule.h`/ |
| 13 | |
| 14 | cs_errcxx . . $ cs_err# RISCV_global_initcxx . . $ RISCV_global_init(2c23641276a36c6e).(cs_structcxx . . $ cs_struct# * ud) |
| 15 | { |
| 16 | MCRegisterInfocxx . . $ MCRegisterInfo# *mri; |
| 17 | mri = cs_mem_malloccxx . . $ cs_mem_malloc.(sizeof(*mri)); |
| 18 | |
| 19 | RISCV_initcxx . . $ RISCV_init(c2e0c34190506c3d).(mri); |
| 20 | ud->printercxx . . $ cs_struct#printer. = RISCV_printInstcxx . . $ RISCV_printInst(6238f66e5ea10f57).; |
| 21 | ud->printer_infocxx . . $ cs_struct#printer_info. = mri; |
| 22 | ud->getinsn_infocxx . . $ cs_struct#getinsn_info. = mri; |
| 23 | ud->disasmcxx . . $ cs_struct#disasm. = RISCV_getInstructioncxx . . $ RISCV_getInstruction(fe94ce91eeab61e9).; |
| 24 | ud->post_printercxx . . $ cs_struct#post_printer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 25 | |
| 26 | ud->reg_namecxx . . $ cs_struct#reg_name. = RISCV_reg_namecxx . . $ RISCV_reg_name(efd1348d9ae5172e).; |
| 27 | ud->insn_idcxx . . $ cs_struct#insn_id. = RISCV_get_insn_idcxx . . $ RISCV_get_insn_id(b32a94ba649bfb5a).; |
| 28 | ud->insn_namecxx . . $ cs_struct#insn_name. = RISCV_insn_namecxx . . $ RISCV_insn_name(efd1348d9ae5172e).; |
| 29 | ud->group_namecxx . . $ cs_struct#group_name. = RISCV_group_namecxx . . $ RISCV_group_name(efd1348d9ae5172e).; |
| 30 | |
| 31 | return CS_ERR_OKcxx . . $ CS_ERR_OK.; |
| 32 | } |
| 33 | |
| 34 | cs_errcxx . . $ cs_err# RISCV_optioncxx . . $ RISCV_option(34dd9365584c51ad).(cs_structcxx . . $ cs_struct# * handle, cs_opt_typecxx . . $ cs_opt_type# type, size_t value) |
| 35 | { |
| 36 | if (type == CS_OPT_SYNTAXcxx . . $ CS_OPT_SYNTAX.) |
| 37 | handle->syntaxcxx . . $ cs_struct#syntax. = (int)value; |
| 38 | |
| 39 | return CS_ERR_OKcxx . . $ CS_ERR_OK.; |
| 40 | } |
| 41 | |
| 42 | #endif |