MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / IsAffectedSnapdragon

Function IsAffectedSnapdragon

Scripts/NeedDisabledSVE.py:39–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39def IsAffectedSnapdragon():
40 cpuinfo = []
41
42 with open("/proc/cpuinfo") as cpuinfo_file:
43 current_implementer = 0
44 current_part = 0
45 for line in cpuinfo_file:
46 line = line.strip()
47 if "CPU implementer" in line:
48 current_implementer = int(re.findall(r'0x[0-9A-F]+', line, re.I)[0], 16)
49 if "CPU part" in line:
50 current_part = int(re.findall(r'0x[0-9A-F]+', line, re.I)[0], 16)
51 cpuinfo += {tuple([current_implementer, current_part])}
52
53 for core in cpuinfo:
54 if SnapdragonIDsWithDisabledSVE.get(core):
55 return True
56
57 return False
58
59
60def main():

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected