-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperand.h
46 lines (38 loc) · 1.11 KB
/
operand.h
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
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef __Scarab__Operand__H__
#define __Scarab__Operand__H__
#include "type.h"
#include "dis-table.h"
class Operand{
public:
Operand();
Operand(INT8, INT32, OPERAND_SIZE, OPERAND_TYPE, INT8, INT8,
INT8, INT32, int, OPERAND_SIZE, bool);
Operand(INT8, INT32, OPERAND_SIZE, OPERAND_TYPE, INT8, INT8,
INT8, INT32, int, OPERAND_SIZE, int);
Operand(int, int, OPERAND_SIZE, OPERAND_TYPE, int, int, int,
int, int, OPERAND_SIZE, int);
Operand(int, HAVE_AUXILIARY_CODE, OPERAND_SIZE, OPERAND_TYPE, int, int, int,
int, int, OPERAND_SIZE, int);
INT32 getOperand();
void serialize(const char* prefix);
/* segment */
INT8 segment;
/* Store register number or immediate */
INT32 operand;
/* Store operand size */
int operand_size;
/* Store operand type */
INT8 type;
/* use for addressing */
INT8 scale;
INT8 index;
INT8 base;
/* displacement */
INT32 displacement;
int displacement_size;
/* addressing size, if exists */
INT8 addressing_size;
/* whether this operand is a default register */
bool isDefault;
};
#endif