forked from andreaskuster/black-parrot-branch-predictor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.h
executable file
·50 lines (34 loc) · 938 Bytes
/
utils.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
47
48
49
///////////////////////////////////////////////////////////////////////
// Copyright 2015 Samsung Austin Semiconductor, LLC. //
///////////////////////////////////////////////////////////////////////
#ifndef UTILS_H
#define UTILS_H
#include <string>
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
#define UINT32 unsigned int
#define INT32 int
#define UINT64 unsigned long long
#define COUNTER unsigned long long
#define NOT_TAKEN 0
#define TAKEN 1
#define FAILURE 0
#define SUCCESS 1
typedef enum {
OPTYPE_OP=0,
OPTYPE_RET_UNCOND=1,
OPTYPE_JMP_DIRECT_UNCOND=2,
OPTYPE_JMP_INDIRECT_UNCOND=3,
OPTYPE_CALL_DIRECT_UNCOND=4,
OPTYPE_CALL_INDIRECT_UNCOND=5,
OPTYPE_RET_COND=6,
OPTYPE_JMP_DIRECT_COND=7,
OPTYPE_JMP_INDIRECT_COND=8,
OPTYPE_CALL_DIRECT_COND=9,
OPTYPE_CALL_INDIRECT_COND=10,
OPTYPE_ERROR=11,
OPTYPE_MAX=12
} OpType;
#endif