Skip to content

Commit

Permalink
target/hexagon: avoid invalid escape in Python string
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bonzini committed Oct 17, 2023
1 parent e4b6532 commit e41c40d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target/hexagon/hex_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def uniquify(seq):
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+))?")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e41c40d

Please sign in to comment.