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
|
#!/usr/bin/env python3
_arch_detail = {
# Intel's x86 (8080).
# 'x86': ('x86', 'i386', 'little'),
# 'i286': ('x86', 'i286', 'little'),
# 'i386': ('x86', 'i386', 'little'),
# 'i486': ('x86', 'i486', 'little'),
# 'i586': ('x86', 'i586', 'little'),
# 'i686': ('x86', 'i686', 'little'),
# 'i786': ('x86', 'i786', 'little'),
# Intel's x86_64 (64-bit version of the x86).
# 'x86_64': ('x86_64', None, 'little'),
# Hitachi's SuperH, J-Core.
'sh': ('sh', 'sh1', None),
'sh1': ('sh', 'sh1', None),
'sh2': ('sh', 'sh2', None),
'sh2eb': ('sh', 'sh2', 'big'),
'sh2le': ('sh', 'sh2', 'little'),
'sh2a': ('sh', 'sh2a', None),
'sh2e': ('sh', 'sh2e', None),
'sh3': ('sh', 'sh3', None),
'sh3eb': ('sh', 'sh3', 'big'),
'sh3le': ('sh', 'sh3', 'little'),
'sh3e': ('sh', 'sh3e', None),
'sh3ele': ('sh', 'sh3e', 'little'),
'sh4': ('sh', 'sh4', None),
'sh4eb': ('sh', 'sh4', 'big'),
'sh4le': ('sh', 'sh4', 'little'),
'sh4a': ('sh', 'sh4', None),
}
def get_arch_detail(arch):
""" Return the (family, arch, endianness) tuple. """
try: det = _arch_detail[arch]
except: return None
# XXX: Temporary?
if not det[1]:
det = (det[0], det[0], det[2])
return det
# End of file.
|