Skip to content

Commit

Permalink
Revert "auto-sync: fix byte pattern"
Browse files Browse the repository at this point in the history
This reverts commit cf8e870.
  • Loading branch information
imbillow committed Oct 17, 2024
1 parent 520f357 commit 923a35e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions suite/auto-sync/src/autosync/MCUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,7 @@ def init_tests(self, unified_test_cases: bool):
log.debug(f"llvm-mc result: {mc_output}")
text_section = 0 # Counts the .text sections
asm_pat = f"(?P<asm_text>.+)"
byte_pat = r"0[bx][a-fA-F0-9]+"
enc_pat = (
r"(\[?(?P<full_enc_string>"
+ "(?P<enc_bytes>"
+ rf"({byte_pat}(,\s*))+({byte_pat}|A)"
+ ")"
+ ")\]?)"
)
enc_pat = r"(\[?(?P<full_enc_string>(?P<enc_bytes>((0x[a-fA-F0-9]{1,2}[, ]{0,2}))+)[^, ]?)\]?)"

dups = []
for line in mc_output.stdout.splitlines():
Expand All @@ -167,7 +160,7 @@ def init_tests(self, unified_test_cases: bool):
if not match:
continue
full_enc_string = match.group("full_enc_string")
if not re.search(rf"{byte_pat}$", full_enc_string[:-1]):
if not re.search(r"0x[a-fA-F0-9]{1,2}$", full_enc_string[:-1]):
log.debug(f"Ignore because symbol injection is needed: {line}")
# The encoding string contains symbol information of the form:
# [0xc0,0xe0,A,A,A... or similar. We ignore these for now.
Expand Down

0 comments on commit 923a35e

Please sign in to comment.