Merge branch 'master' of github.com:RRZE-HPC/osaca

This commit is contained in:
JanLJL
2020-03-26 10:03:23 +01:00
2 changed files with 5 additions and 4 deletions

View File

@@ -279,7 +279,7 @@ class Frontend(object):
'------------------\n'
' No final analysis is given. If you want to ignore this\n'
' warning and run the analysis anyway, start osaca with\n'
' --ignore_unknown flag.\n'
' --ignore-unknown flag.\n'
'--------------------------------------------------------------------------------'
'----------------{}\n'
).format(amount, '-' * len(str(amount)))

View File

@@ -337,7 +337,8 @@ class MachineModel(object):
"""
hashname = self._get_hashname(filepath)
filepath = os.path.join(utils.CACHE_DIR, hashname + '.pickle')
pickle.dump(data, open(filepath, 'wb'))
with open(filepath, 'wb') as f:
pickle.dump(data, f)
def _get_hashname(self, name):
"""Returns unique hashname for machine model"""
@@ -397,7 +398,7 @@ class MachineModel(object):
operand_string += 'p' if operand['post-indexed'] else ''
return operand_string
def _create_db_operand_aarch64(operand):
def _create_db_operand_aarch64(self, operand):
"""Create instruction form operand for DB out of operand string."""
if operand == 'i':
return {'class': 'immediate', 'imd': 'int'}
@@ -418,7 +419,7 @@ class MachineModel(object):
else:
raise ValueError('Parameter {} is not a valid operand code'.format(operand))
def _create_db_operand_x86(operand):
def _create_db_operand_x86(self, operand):
"""Create instruction form operand for DB out of operand string."""
if operand == 'r':
return {'class': 'register', 'name': 'gpr'}