Let RGBASM write JR offsets in floating sections

This requires some special-casing for `jr @` because the `jr` opcode has
already been emitted, but not the operand, so PC points to the middle.
Moved the RGBLINK test to RGBASM's folder, and created a new RGBLINK test.
This commit is contained in:
ISSOtm
2020-07-27 18:11:42 +02:00
parent b1adbcc77c
commit 762474d3ac
13 changed files with 47 additions and 25 deletions

7
test/asm/jr-@.asm Normal file
View File

@@ -0,0 +1,7 @@
SECTION "fixed", ROM0[0]
jr @
; We need this section to be floating because RGBASM can know the value of PC
; otherwise, leading to different behavior
; FIXME: we rely on this landing at address 2, which isn't *guaranteed*...
SECTION "floating", ROM0
jr @