Skip to content

Commit

Permalink
Match symbols that being with @ for MIPS (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
1superchip authored Nov 9, 2024
1 parent 278ea0e commit 8a56efa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2996,6 +2996,11 @@ 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)\((@\d+)\)", field):
# Check for MWCC literal symbols that begin with "@"
# "%hi(@20)" or "%lo(@20)"
return True

return "." in field

# Example: ".text+0x34"
Expand Down

0 comments on commit 8a56efa

Please sign in to comment.