-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocation.h
43 lines (34 loc) · 993 Bytes
/
Location.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
#ifndef LOCATION_H
#define LOCATION_H
#include <string>
#include <vector>
class Location {
protected:
int value;
Location();
public:
Location(int val);
virtual std::string toBinaryString(std::map<std::string, int> labels);
};
class UpperLoadAddr : public Location {
protected:
std::string label;
int op1;
int op2;
public:
UpperLoadAddr(std::string label, int op1, int op2);
virtual std::string toBinaryString(std::map<std::string, int> labels) override;
};
class LowerLoadAddr : public UpperLoadAddr {
public:
LowerLoadAddr(std::string label, int op1, int op2);
virtual std::string toBinaryString(std::map<std::string, int> labels) override;
};
class LiteralLabel : public Location {
protected:
std::string label;
public:
LiteralLabel(std::string label);
virtual std::string toBinaryString(std::map<std::string, int> labels) override;
};
#endif