mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-08 04:00:05 +01:00
supports directives in the kernel
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
name = "osaca"
|
||||
__version__ = '0.2.1'
|
||||
__version__ = '0.2.2'
|
||||
|
||||
@@ -99,6 +99,8 @@ class Scheduler(object):
|
||||
# Instruction form not in CSV
|
||||
if instrForm[0][:3] == 'nop':
|
||||
sched += self.format_port_occupation_line(occ_ports[i], '* ' + instrForm[-1])
|
||||
elif instrForm[0] == 'DIRECTIVE':
|
||||
sched += self.format_port_occupation_line(occ_ports[i], '* ' + instrForm[-1])
|
||||
else:
|
||||
sched += self.format_port_occupation_line(occ_ports[i], 'X ' + instrForm[-1])
|
||||
continue
|
||||
@@ -324,7 +326,7 @@ class Scheduler(object):
|
||||
annotations = (
|
||||
'P - Load operation can be hidden behind a past or future store instruction\n'
|
||||
'X - No information for this instruction in data file\n'
|
||||
'* - Instruction micro-ops not bound to a port\n\n')
|
||||
'* - Not bound to a port, therefore ignored\n\n')
|
||||
return analysis + annotations
|
||||
|
||||
def get_head(self):
|
||||
|
||||
@@ -451,13 +451,17 @@ class OSACA(object):
|
||||
empty_byte = re.compile(r'[0-9a-f]{2}')
|
||||
if re.match(empty_byte, mnemonic) and len(mnemonic) == 2:
|
||||
return
|
||||
# Check if line contains a directive
|
||||
directive = re.compile(r'^\.[a-zA-Z0-9]+$')
|
||||
if re.match(directive, mnemonic):
|
||||
return
|
||||
# Check if there's one or more operands and store all in a list
|
||||
param_list = flatten(self._separate_params(params))
|
||||
param_list_types = list(param_list)
|
||||
# Check if line contains a directive and if so, add as a workaround with
|
||||
# marker in mnemonic
|
||||
directive = re.compile(r'^\.[a-zA-Z0-9]+$')
|
||||
if re.match(directive, mnemonic):
|
||||
instr = instr.rstrip()
|
||||
instr_form = ['DIRECTIVE'] + list() + [instr]
|
||||
self.instr_forms.append(instr_form)
|
||||
return
|
||||
# Check operands and separate them by IMMEDIATE (IMD), REGISTER (REG),
|
||||
# MEMORY (MEM) or LABEL(LBL)
|
||||
for i, op in enumerate(param_list):
|
||||
|
||||
Reference in New Issue
Block a user