From 923a35efe73f9ac1d2eff8e066fd35a3b4e3a7f3 Mon Sep 17 00:00:00 2001 From: billow Date: Thu, 17 Oct 2024 21:01:54 +0800 Subject: [PATCH] Revert "auto-sync: fix byte pattern" This reverts commit cf8e870f776889514b69a2f25a376f62ab2b291c. --- suite/auto-sync/src/autosync/MCUpdater.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/suite/auto-sync/src/autosync/MCUpdater.py b/suite/auto-sync/src/autosync/MCUpdater.py index 0b93062fda..770395912a 100755 --- a/suite/auto-sync/src/autosync/MCUpdater.py +++ b/suite/auto-sync/src/autosync/MCUpdater.py @@ -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.+)" - byte_pat = r"0[bx][a-fA-F0-9]+" - enc_pat = ( - r"(\[?(?P" - + "(?P" - + rf"({byte_pat}(,\s*))+({byte_pat}|A)" - + ")" - + ")\]?)" - ) + enc_pat = r"(\[?(?P(?P((0x[a-fA-F0-9]{1,2}[, ]{0,2}))+)[^, ]?)\]?)" dups = [] for line in mc_output.stdout.splitlines(): @@ -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.