mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-05 10:40:06 +01:00
Merge branch 'master' of github.com:RRZE-HPC/osaca
This commit is contained in:
@@ -128,7 +128,7 @@ def check_arguments(args, parser):
|
||||
supported_archs = ['SNB', 'IVB', 'HSW', 'BDW', 'SKX', 'CSX', 'ZEN1', 'TX2']
|
||||
supported_import_files = ['ibench', 'asmbench']
|
||||
|
||||
if 'arch' in args and args.arch.upper() not in supported_archs:
|
||||
if 'arch' in args and (args.arch is None or args.arch.upper() not in supported_archs):
|
||||
parser.error(
|
||||
'Microarchitecture not supported. Please see --help for all valid architecture codes.'
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ class ParserX86ATT(BaseParser):
|
||||
relocation = pp.Combine(pp.Literal('@') + pp.Word(pp.alphas))
|
||||
id_offset = pp.Word(pp.nums) + pp.Suppress(pp.Literal('+'))
|
||||
first = pp.Word(pp.alphas + '_.', exact=1)
|
||||
rest = pp.Word(pp.alphanums + '$_.')
|
||||
rest = pp.Word(pp.alphanums + '$_.+-')
|
||||
identifier = pp.Group(
|
||||
pp.Optional(id_offset).setResultsName('offset')
|
||||
+ pp.Combine(first + pp.Optional(rest)).setResultsName('name')
|
||||
|
||||
@@ -45,6 +45,15 @@ class TestParserX86ATT(unittest.TestCase):
|
||||
self.assertEqual(len(self._get_directive(self.parser, '\t.text').parameters), 0)
|
||||
self.assertEqual(self._get_directive(self.parser, '\t.align\t16,0x90').name, 'align')
|
||||
self.assertEqual(len(self._get_directive(self.parser, '\t.align\t16,0x90').parameters), 2)
|
||||
self.assertEqual(
|
||||
self._get_directive(self.parser, '\t.set\tL$set$0,LECIE1-LSCIE1').parameters,
|
||||
[{'name': 'L$set$0'}, {'name': 'LECIE1-LSCIE1'}])
|
||||
self.assertEqual(
|
||||
self._get_directive(self.parser,
|
||||
'\t.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support'
|
||||
).parameters,
|
||||
[{'name': v} for v in
|
||||
['__TEXT', '__eh_frame', 'coalesced', 'no_toc+strip_static_syms+live_support']])
|
||||
self.assertEqual(
|
||||
self._get_directive(self.parser, '\t.align\t16,0x90').parameters[1], '0x90'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user