diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /capstone/arch/EVM/EVMInstPrinter.c | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'capstone/arch/EVM/EVMInstPrinter.c')
-rw-r--r-- | capstone/arch/EVM/EVMInstPrinter.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/capstone/arch/EVM/EVMInstPrinter.c b/capstone/arch/EVM/EVMInstPrinter.c new file mode 100644 index 000000000..7f452800e --- /dev/null +++ b/capstone/arch/EVM/EVMInstPrinter.c @@ -0,0 +1,20 @@ +/* Capstone Disassembly Engine */ +/* By Nguyen Anh Quynh, 2018 */ + +#include "EVMInstPrinter.h" +#include "EVMMapping.h" + + +void EVM_printInst(MCInst *MI, struct SStream *O, void *PrinterInfo) +{ + SStream_concat(O, EVM_insn_name((csh)MI->csh, MI->Opcode)); + + if (MI->Opcode >= EVM_INS_PUSH1 && MI->Opcode <= EVM_INS_PUSH32) { + unsigned int i; + + SStream_concat0(O, "\t"); + for (i = 0; i < MI->Opcode - EVM_INS_PUSH1 + 1; i++) { + SStream_concat(O, "%02x", MI->evm_data[i]); + } + } +} |