-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathaarch64.py
More file actions
71 lines (63 loc) · 1.21 KB
/
aarch64.py
File metadata and controls
71 lines (63 loc) · 1.21 KB
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
63
64
65
66
67
68
69
70
71
"""aarch64 architecture definition."""
from arch.base_arch import BaseArch, FlagRegister
class Aarch64(BaseArch):
"""
aarch64 support file
"""
bits = 64
gpr_registers = [
"x0",
"x1",
"x2",
"x3",
"x4",
"x5",
"x6",
"x7",
"x8",
"x9",
"x10",
"x11",
"x12",
"x13",
"x14",
"x15",
"x16",
"x17",
"x18",
"x19",
"x20",
"x21",
"x22",
"x23",
"x24",
"x25",
"x26",
"x27",
"x28",
"x29",
"x30",
"fp",
"lr",
"sp",
"pc",
]
gpr_key = "general"
# Bitmasks used to extract flag bits from cpsr register value
_cpsr_register_bit_masks = {
"n": 0x80000000,
"z": 0x40000000,
"c": 0x20000000,
"v": 0x10000000,
"q": 0x8000000,
"ssbs": 0x800000,
"pan": 0x400000,
"dit": 0x200000,
"ge": 0xF0000,
"e": 0x200,
"a": 0x100,
"i": 0x80,
"f": 0x40,
"m": 0xF,
}
flag_registers = [FlagRegister("cpsr", _cpsr_register_bit_masks)]