Skip to content

Commit

Permalink
dirty fix to prevent double static
Browse files Browse the repository at this point in the history
  • Loading branch information
fpedd committed Sep 2, 2021
1 parent 717ceed commit 16e0bcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions m2isar/backends/etiss/instruction_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ def assignment(self: behav.Assignment, context: TransformerContext):
if expr.static:
if bool(target.static & StaticType.WRITE):
expr.code = Template(f'{expr.code}').safe_substitute(**replacements.rename_static)

else:
expr.code = context.make_static(expr.code)
if "std::to_string" not in expr.code:
expr.code = context.make_static(expr.code)

if bool(target.static & StaticType.READ):
target.code = Template(target.code).safe_substitute(replacements.rename_dynamic)
Expand Down

0 comments on commit 16e0bcb

Please sign in to comment.