-
Notifications
You must be signed in to change notification settings - Fork 14
/
Comparator_64.h
62 lines (56 loc) · 2.46 KB
/
Comparator_64.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifdef __LP64__
#import "Util.h"
void NumberComparator(long value) {
if (findDataList.size()) {
for (int i = 0,temp = 0; i < findDataList.size(); i++) {
findInfoStruct = findDataList.at(i);
memInfoStruct = memDataList.at(temp);
for (; memInfoStruct.address <= findInfoStruct.address; temp++) {
if (memInfoStruct.address == findInfoStruct.address) {
if (value == (memInfoStruct.value & 0x00000000FFFFFFFF)) {
tempInfoStruct.address = memInfoStruct.address;
tempInfoStruct.value = (memInfoStruct.value & 0x00000000FFFFFFFF);
tempDataList.push_back(tempInfoStruct);
if (i < (findDataList.size()-1)) {
i++;
findInfoStruct = findDataList.at(i);
if (memInfoStruct.address > findInfoStruct.address) {
--i;
findInfoStruct = findDataList.at(i);
}
}
}
}
if (memInfoStruct.address + 4 == findInfoStruct.address) {
if (value == (memInfoStruct.value >> 32)) {
tempInfoStruct.address = memInfoStruct.address+4;
tempInfoStruct.value = (memInfoStruct.value >> 32);
tempDataList.push_back(tempInfoStruct);
}
}
memInfoStruct = memDataList.at(temp);
}
temp++;
}
} else {
for (int i = 0; i < memDataList.size(); i++) {
memInfoStruct = memDataList.at(i);
if (value == (memInfoStruct.value & 0x00000000FFFFFFFF)) {
tempInfoStruct.address = memInfoStruct.address;
tempInfoStruct.value = (memInfoStruct.value & 0x00000000FFFFFFFF);
tempDataList.push_back(tempInfoStruct);
}
if (value == (memInfoStruct.value >> 32)) {
tempInfoStruct.address = (memInfoStruct.address + 4);
tempInfoStruct.value = (memInfoStruct.value >> 32);
tempDataList.push_back(tempInfoStruct);
}
}
}
findDataList.clear();
findDataList = tempDataList;
tempDataList.clear();
memDataList.clear();
}
#else
#endif