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>
This commit is contained in:
Paolo Bonzini 2023-10-16 08:22:56 +02:00
parent e4b6532cc0
commit e41c40d101
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ regre = re.compile(r"((?<!DUP)[MNORCPQXSGVZA])([stuvwxyzdefg]+)([.]?[LlHh]?)(\d+
immre = re.compile(r"[#]([rRsSuUm])(\d+)(?:[:](\d+))?") immre = re.compile(r"[#]([rRsSuUm])(\d+)(?:[:](\d+))?")
reg_or_immre = re.compile( reg_or_immre = re.compile(
r"(((?<!DUP)[MNRCOPQXSGVZA])([stuvwxyzdefg]+)" r"(((?<!DUP)[MNRCOPQXSGVZA])([stuvwxyzdefg]+)"
+ "([.]?[LlHh]?)(\d+S?))|([#]([rRsSuUm])(\d+)[:]?(\d+)?)" r"([.]?[LlHh]?)(\d+S?))|([#]([rRsSuUm])(\d+)[:]?(\d+)?)"
) )
relimmre = re.compile(r"[#]([rR])(\d+)(?:[:](\d+))?") relimmre = re.compile(r"[#]([rR])(\d+)(?:[:](\d+))?")
absimmre = re.compile(r"[#]([sSuUm])(\d+)(?:[:](\d+))?") absimmre = re.compile(r"[#]([sSuUm])(\d+)(?:[:](\d+))?")
@ -337,7 +337,7 @@ def read_attribs_file(name):
def read_overrides_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(): for line in open(name, "rt").readlines():
if not overridere.match(line): if not overridere.match(line):
continue continue