Rizin
unix-like reverse engineering framework and cli tools
analysis_vax.c File Reference
#include <string.h>
#include <rz_types.h>
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_asm.h>
#include <rz_analysis.h>

Go to the source code of this file.

Functions

static int vax_op (RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, RzAnalysisOpMask mask)
 

Variables

RzAnalysisPlugin rz_analysis_plugin_vax
 
RZ_API RzLibStruct rizin_plugin
 

Function Documentation

◆ vax_op()

static int vax_op ( RzAnalysis analysis,
RzAnalysisOp op,
ut64  addr,
const ut8 buf,
int  len,
RzAnalysisOpMask  mask 
)
static

Definition at line 15 of file analysis_vax.c.

15  {
16  op->size = 1;
17  if (len < 1) {
18  return -1;
19  }
21  switch (buf[0]) {
22  case 0xd0:
23  case 0x2e:
25  op->size = 8;
26  break;
27  case 0x78:
29  op->size = 8;
30  break;
31  case 0xc0:
32  case 0xd8:
34  op->size = 8;
35  break;
36  case 0x00:
37  op->type = RZ_ANALYSIS_OP_TYPE_TRAP; // HALT
38  break;
39  case 0x01:
41  break;
42  case 0x51:
43  case 0x73:
45  break;
46  case 0xac:
48  op->size = 4;
49  break;
50  case 0x5a:
51  op->size = 2;
52  break;
53  case 0x11:
54  case 0x18:
55  op->size = 2;
57  break;
58  case 0x31:
59  case 0xe9:
60  op->size = 3;
62  break;
63  case 0xc6:
64  case 0xc7:
65  op->size = 8;
67  break;
68  case 0xd6:
69  case 0x61:
70  op->size = 2;
72  break;
73  case 0x62:
75  break;
76  case 0xff:
77  op->size = 2;
78  break;
79  }
80  return op->size;
81 }
size_t len
Definition: 6502dis.c:15
voidpf void * buf
Definition: ioapi.h:138
@ RZ_ANALYSIS_OP_TYPE_CMP
Definition: rz_analysis.h:399
@ RZ_ANALYSIS_OP_TYPE_SUB
Definition: rz_analysis.h:402
@ RZ_ANALYSIS_OP_TYPE_UNK
Definition: rz_analysis.h:388
@ RZ_ANALYSIS_OP_TYPE_TRAP
Definition: rz_analysis.h:392
@ RZ_ANALYSIS_OP_TYPE_ADD
Definition: rz_analysis.h:401
@ RZ_ANALYSIS_OP_TYPE_CJMP
Definition: rz_analysis.h:373
@ RZ_ANALYSIS_OP_TYPE_DIV
Definition: rz_analysis.h:405
@ RZ_ANALYSIS_OP_TYPE_MOV
Definition: rz_analysis.h:390
@ RZ_ANALYSIS_OP_TYPE_SHL
Definition: rz_analysis.h:407
@ RZ_ANALYSIS_OP_TYPE_NOP
Definition: rz_analysis.h:389
@ RZ_ANALYSIS_OP_TYPE_XOR
Definition: rz_analysis.h:412
Definition: dis.c:32

References len, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_DIV, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_SHL, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_UNK, and RZ_ANALYSIS_OP_TYPE_XOR.

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
}
RzAnalysisPlugin rz_analysis_plugin_vax
Definition: analysis_vax.c:83
@ RZ_LIB_TYPE_ANALYSIS
Definition: rz_lib.h:73
#define RZ_VERSION
Definition: rz_version.h:8
const char * version
Definition: rz_analysis.h:1239

Definition at line 94 of file analysis_vax.c.

◆ rz_analysis_plugin_vax

RzAnalysisPlugin rz_analysis_plugin_vax
Initial value:
= {
.name = "vax",
.desc = "VAX code analysis plugin",
.license = "LGPL3",
.arch = "vax",
.esil = false,
.bits = 8 | 32,
.op = &vax_op,
}
static int vax_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, RzAnalysisOpMask mask)
Definition: analysis_vax.c:15

Definition at line 83 of file analysis_vax.c.