mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Allow negative alignment offsets (#1255)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
error: align-large-ofs.asm(2):
|
||||
Alignment offset (2) must be smaller than alignment size (2)
|
||||
The absolute alignment offset (2) must be less than alignment size (2)
|
||||
error: Assembly aborted (1 error)!
|
||||
|
||||
6
test/asm/align-offset.asm
Normal file
6
test/asm/align-offset.asm
Normal file
@@ -0,0 +1,6 @@
|
||||
SECTION "good", ROM0, ALIGN[4, -2]
|
||||
align 4, 14 ; -2 == (1 << 4) - 2 == -2 mod (1 << 4)
|
||||
|
||||
SECTION "bad+", ROM0, ALIGN[4, 18] ; out of range
|
||||
|
||||
SECTION "bad-", ROM0, ALIGN[4, -20] ; out of range negative
|
||||
5
test/asm/align-offset.err
Normal file
5
test/asm/align-offset.err
Normal file
@@ -0,0 +1,5 @@
|
||||
error: align-offset.asm(4):
|
||||
The absolute alignment offset (18) must be less than alignment size (16)
|
||||
error: align-offset.asm(6):
|
||||
The absolute alignment offset (20) must be less than alignment size (16)
|
||||
error: Assembly aborted (2 errors)!
|
||||
Reference in New Issue
Block a user