Skip to content

Commit c7bf3fa

Browse files
committed
bugfix for downwards compatability with OSACA
1 parent da3bc10 commit c7bf3fa

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

kerncraft/incore_model.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,17 @@ def asm_instrumentation(
700700

701701
if isa == "x86":
702702
syntax = detect_x86_syntax(code)
703-
marker_start, marker_end = get_marker(
704-
isa, syntax=syntax, comment="pointer_increment={} {}".format(
705-
pointer_increment, block_hashstr
703+
osaca_version_tuple = tuple(map(int, (osaca.get_version().split("."))))
704+
if osaca_version_tuple >= (0,7,0):
705+
marker_start, marker_end = get_marker(
706+
isa, syntax=syntax, comment="pointer_increment={} {}".format(
707+
pointer_increment, block_hashstr
708+
)
709+
)
710+
else:
711+
marker_start, marker_end = get_marker(
712+
isa, comment="pointer_increment={} {}".format(pointer_increment, block_hashstr)
706713
)
707-
)
708714

709715
marked_asm = (
710716
asm_lines[:block_start]

0 commit comments

Comments
 (0)