-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy patharch_evm_ks.c
More file actions
executable file
·34 lines (30 loc) · 763 Bytes
/
arch_evm_ks.c
File metadata and controls
executable file
·34 lines (30 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* radare2-keystone - GPL - Copyright 2016-2023 - pancake */
#include <r_arch.h>
#include <r_lib.h>
#include <keystone/keystone.h>
#include <keystone/evm.h>
#include "keystone.c"
static bool assemble(RArchSession *a, RAnalOp *ao, RArchEncodeMask mask) {
ks_mode mode = (ks_mode)0;
if (a->config->big_endian) {
mode = (ks_mode)((int)mode | KS_MODE_BIG_ENDIAN);
}
return keystone_assemble (a, ao, ao->mnemonic, KS_ARCH_SYSTEMZ, mode);
}
RArchPlugin r_arch_plugin_evm_ks = {
.meta = {
.name = "evm.ks",
.desc = "EVM keystone assembler",
.license = "GPL",
},
.arch = "evm",
.bits = 32,
.encode = &assemble,
};
#ifndef CORELIB
RLibStruct radare_plugin = {
.type = R_LIB_TYPE_ARCH,
.data = &r_arch_plugin_evm_ks,
.version = R2_VERSION
};
#endif