diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-16 08:22:56 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-10-19 14:52:59 +0300 |
commit | 7a04747125e595c7cb4db66dcd0b4fc4b13b6e87 (patch) | |
tree | e274560118c346541f9acbfc72a5be9b50265e45 /target | |
parent | 23b0010786f354845f8ff7760bc1af83fc160649 (diff) |
target/hexagon: avoid invalid escape in Python string
This is an error in Python 3.12; fix it by using a raw string literal.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit e41c40d101fce79af4d679955eb6e0d31e02c47c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target')
-rwxr-xr-x | target/hexagon/hex_common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index dce1b852a7..0da65d6dd6 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon/hex_common.py @@ -45,7 +45,7 @@ regre = re.compile(r"((?<!DUP)[MNORCPQXSGVZA])([stuvwxyzdefg]+)([.]?[LlHh]?)(\d+ immre = re.compile(r"[#]([rRsSuUm])(\d+)(?:[:](\d+))?") reg_or_immre = re.compile( r"(((?<!DUP)[MNRCOPQXSGVZA])([stuvwxyzdefg]+)" - + "([.]?[LlHh]?)(\d+S?))|([#]([rRsSuUm])(\d+)[:]?(\d+)?)" + r"([.]?[LlHh]?)(\d+S?))|([#]([rRsSuUm])(\d+)[:]?(\d+)?)" ) relimmre = re.compile(r"[#]([rR])(\d+)(?:[:](\d+))?") absimmre = re.compile(r"[#]([sSuUm])(\d+)(?:[:](\d+))?") @@ -337,7 +337,7 @@ def read_attribs_file(name): def read_overrides_file(name): - overridere = re.compile("#define fGEN_TCG_([A-Za-z0-9_]+)\(.*") + overridere = re.compile(r"#define fGEN_TCG_([A-Za-z0-9_]+)\(.*") for line in open(name, "rt").readlines(): if not overridere.match(line): continue |