mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-16 00:50:06 +01:00
small changes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import pyparsing as pp
|
||||
import string
|
||||
|
||||
from osaca.parser import AttrDict, BaseParser
|
||||
|
||||
@@ -376,10 +377,7 @@ class ParserX86ATT(BaseParser):
|
||||
def is_vector_register(self, register):
|
||||
if register is None:
|
||||
return False
|
||||
if (
|
||||
len(register['name']) > 2
|
||||
and ''.join([_ for _ in register['name'] if not _.isdigit()])[-2:].lower() == 'mm'
|
||||
):
|
||||
if register['name'].rstrip(string.digits).lower() in ['mm', 'xmm', 'ymm', 'zmm']:
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -389,5 +387,5 @@ class ParserX86ATT(BaseParser):
|
||||
if self.is_gpr(register):
|
||||
return 'gpr'
|
||||
elif self.is_vector_register(register):
|
||||
return ''.join([_ for _ in register['name'] if not _.isdigit()]).lower()
|
||||
return register['name'].rstrip(string.digits).lower()
|
||||
raise ValueError
|
||||
|
||||
@@ -215,6 +215,10 @@ class MachineModel(object):
|
||||
arch_dict = {
|
||||
'tx2': 'aarch64',
|
||||
'zen1': 'x86',
|
||||
'zen+': 'x86',
|
||||
'zen2': 'x86',
|
||||
'con': 'x86', # Intel Conroe
|
||||
'wol': 'x86', # Intel Wolfdale
|
||||
'snb': 'x86',
|
||||
'ivb': 'x86',
|
||||
'hsw': 'x86',
|
||||
@@ -227,7 +231,7 @@ class MachineModel(object):
|
||||
'kbl': 'x86',
|
||||
'cnl': 'x86',
|
||||
'cfl': 'x86',
|
||||
'zen+': 'x86',
|
||||
|
||||
}
|
||||
arch = arch.lower()
|
||||
if arch in arch_dict:
|
||||
|
||||
Reference in New Issue
Block a user