Useful link-time lints #1506
Labels
enhancement
Typically new features; lesser priority than bugs
rgbasm
This affects RGBASM
rgblink
This affects RGBLINK
These would be useful as opt-in link-time warnings:
call
,jp
,jr
,rst
1) targeting a label in ROMX, emit a(n equivalent of)assert BANK(@) == 0 || BANK(<target>) == 0 || BANK(@) == BANK(<target>)
. Do this only if PC is in a ROMX section2, which also excludesLOAD
.jp
, check for and suggest usingjr
instead if possible.Footnotes
rst
always targets ROM0, but if we add support for swappable ROM0, possibly via HDFs ([Feature request/proposal] Hardware layout description files (custom mapper support) #524), then this would be multi-banked. ↩In theory,
BANK(@) != 0
for ROMX, but-t
maps ROMX to ROM0. The destination is then guaranteed to be in ROM0 as well, but that may not remain the case if we add some similar feature to HDFs, so a cheap stringent check is good for future-proofing. ↩The text was updated successfully, but these errors were encountered: