Skip to content

Commit

Permalink
Remove incomplete ESIL support for WASM (#3497)
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka authored May 4, 2023
1 parent 14c29cc commit c7c42af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions librz/analysis/p/analysis_wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,6 @@ static int wasm_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
case WASM_OP_F32CONST:
case WASM_OP_F64CONST:
op->type = RZ_ANALYSIS_OP_TYPE_MOV;
{
ut8 arg = data[1];
rz_strbuf_setf(&op->esil, "4,sp,-=,%d,sp,=[4]", arg);
}
break;
case WASM_OP_I64ADD:
case WASM_OP_I32ADD:
Expand All @@ -328,7 +324,6 @@ static int wasm_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
break;
case WASM_OP_NOP:
op->type = RZ_ANALYSIS_OP_TYPE_NOP;
rz_strbuf_setf(&op->esil, "%s", "");
break;
case WASM_OP_CALL:
case WASM_OP_CALLINDIRECT:
Expand All @@ -338,7 +333,6 @@ static int wasm_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
if (op->jump != UT64_MAX) {
op->ptr = op->jump;
}
rz_strbuf_setf(&op->esil, "4,sp,-=,0x%" PFMT64x ",sp,=[4],0x%" PFMT64x ",pc,=", op->fail, op->jump);
break;
case WASM_OP_RETURN:
// should be ret, but if there the analisys is stopped.
Expand Down Expand Up @@ -473,7 +467,6 @@ RzAnalysisPlugin rz_analysis_plugin_wasm = {
.archinfo = archinfo,
.get_reg_profile = get_reg_profile,
.op = &wasm_op,
.esil = true
};

#ifndef RZ_PLUGIN_INCORE
Expand Down
2 changes: 1 addition & 1 deletion test/db/cmd/cmd_list
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ _dA_ 32 tms320 LGPLv3 TMS320 DSP family (c54x,c55x,c55x+,c64x)
_d__ 32 tms320c64x BSD Capstone TMS320c64x disassembler
_dAe 32 v810 LGPL3 v810 disassembly plugin (by pancake)
_dAe 32 v850 LGPL3 v850 disassembly plugin
adAe 32 wasm MIT WebAssembly (by cgvwzq) v0.1.0
adA_ 32 wasm MIT WebAssembly (by cgvwzq) v0.1.0
a___ 16 32 64 x86.as LGPL3 Intel X86 GNU Assembler (Use RZ_X86_AS env)
_dAe 16 32 64 x86 BSD Capstone X86 disassembler
a___ 16 32 64 x86.nasm LGPL3 X86 nasm assembler
Expand Down

0 comments on commit c7c42af

Please sign in to comment.