Skip to content

Commit

Permalink
Merge branch 'master' into i6662-public_v2_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
edeiana authored Dec 16, 2024
2 parents 4d4a2ea + eb4a4b8 commit 26e66b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/ir/aarch64/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ def read_codec_file(path):
# Syntax: pattern opcode opndtype* : opndtype*
pattern, nzcv_rw_flag, enum, feat, opcode, args = line.split(None, 5)
dsts, srcs = [a.split() for a in args.split(':')]
opcode_bits = int(re.sub('[\^x]', '0', pattern), 2)
opnd_bits = int(re.sub('x', '1', re.sub('[1\^]', '0', pattern)), 2)
high_soft_bits = int(re.sub('\^', '1', re.sub('[10x]', '0', pattern)), 2)
opcode_bits = int(re.sub(r'[\^x]', '0', pattern), 2)
opnd_bits = int(re.sub('x', '1', re.sub(r'[1\^]', '0', pattern)), 2)
high_soft_bits = int(re.sub(r'\^', '1', re.sub('[10x]', '0', pattern)), 2)
patterns.append(Pattern(pattern, opcode_bits, opnd_bits, high_soft_bits, opcode, (dsts, srcs), enum, feat))
opc_props[opcode] = Opcode(opcode, nzcv_rw_flag, feat)
continue
Expand All @@ -572,7 +572,7 @@ def read_codec_file(path):
pattern, nzcv_rw_flag, enum, feat, opcode, opndset = line.split()
opcode_bits = int(re.sub('x', '0', pattern), 2)
opnd_bits = int(re.sub('x', '1', re.sub('1', '0', pattern)), 2)
high_soft_bits = int(re.sub('\^', '1', re.sub('[10x]', '0', pattern)), 2)
high_soft_bits = int(re.sub(r'\^', '1', re.sub('[10x]', '0', pattern)), 2)
patterns.append(Pattern(pattern, opcode_bits, opnd_bits, high_soft_bits, opcode, opndset, enum, feat))
opc_props[opcode] = Opcode(opcode, nzcv_rw_flag, feat)
continue
Expand Down

0 comments on commit 26e66b0

Please sign in to comment.