Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
1superchip committed Nov 14, 2024
1 parent 8effd9e commit 665f8f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2996,9 +2996,12 @@ def field_matches_any_symbol(field: str, arch: ArchSettings) -> bool:
return re.fullmatch((r"^@\d+$"), field) is not None

if arch.name in MIPS_ARCH_NAMES:
if re.fullmatch(r"%(?:hi|lo|gp_rel)\((@\d+(?:\+0x[A-Fa-f0-9]+)?)\)", field) is not None:
if (
re.fullmatch(r"%(?:hi|lo|gp_rel)\((@\d+(?:\+0x[A-Fa-f0-9]+)?)\)", field)
is not None
):
# Check for MWCC literal symbols that begin with "@"
# "%hi(@20)" or "%lo(@20)"
# "%hi(@20)" or "%lo(@20)", "gp_rel(@6)", or "hi(@7 + 0x10)"
return True

return "." in field
Expand Down

0 comments on commit 665f8f3

Please sign in to comment.