mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Change behavior of merging FRAGMENTs to constrain each fragment individually
Additionally, remove the deprecated merging of non-fragment SECTIONs
This commit is contained in:
8
test/asm/align-16.asm
Normal file
8
test/asm/align-16.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
SECTION "Byte", ROM0
|
||||
|
||||
db 2
|
||||
|
||||
SECTION "ROM0", ROM0, ALIGN[16]
|
||||
|
||||
db 1
|
||||
0
test/asm/align-16.err
Normal file
0
test/asm/align-16.err
Normal file
0
test/asm/align-16.out
Normal file
0
test/asm/align-16.out
Normal file
1
test/asm/align-16.out.bin
Normal file
1
test/asm/align-16.out.bin
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
test/asm/align-large-ofs.asm
Normal file
2
test/asm/align-large-ofs.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
SECTION "Tesst", ROM0, ALIGN[1,2]
|
||||
3
test/asm/align-large-ofs.err
Normal file
3
test/asm/align-large-ofs.err
Normal file
@@ -0,0 +1,3 @@
|
||||
ERROR: align-large-ofs.asm(2):
|
||||
Alignment offset (2) must be smaller than alignment size (2)
|
||||
error: Assembly aborted (1 errors)!
|
||||
0
test/asm/align-large-ofs.out
Normal file
0
test/asm/align-large-ofs.out
Normal file
2
test/asm/align-large.asm
Normal file
2
test/asm/align-large.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
SECTION "You lost the game", ROM0[17]
|
||||
0
test/asm/align-large.err
Normal file
0
test/asm/align-large.err
Normal file
0
test/asm/align-large.out
Normal file
0
test/asm/align-large.out
Normal file
27
test/asm/fragment-align-org-rev.asm
Normal file
27
test/asm/fragment-align-org-rev.asm
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
SECTION "Word", ROM0/*[5]*/
|
||||
|
||||
dw $78df
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[1]*/
|
||||
|
||||
db $40
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/,ALIGN[1,1]
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0[5]
|
||||
0
test/asm/fragment-align-org-rev.err
Normal file
0
test/asm/fragment-align-org-rev.err
Normal file
0
test/asm/fragment-align-org-rev.out
Normal file
0
test/asm/fragment-align-org-rev.out
Normal file
1
test/asm/fragment-align-org-rev.out.bin
Normal file
1
test/asm/fragment-align-org-rev.out.bin
Normal file
@@ -0,0 +1 @@
|
||||
D@.{<7B>x
|
||||
25
test/asm/fragment-align-org.asm
Normal file
25
test/asm/fragment-align-org.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0[1]
|
||||
|
||||
db $40
|
||||
|
||||
SECTION "Word", ROM0/*[6]*/
|
||||
|
||||
dw $78d5
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/,ALIGN[1]
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
0
test/asm/fragment-align-org.err
Normal file
0
test/asm/fragment-align-org.err
Normal file
0
test/asm/fragment-align-org.out
Normal file
0
test/asm/fragment-align-org.out
Normal file
1
test/asm/fragment-align-org.out.bin
Normal file
1
test/asm/fragment-align-org.out.bin
Normal file
@@ -0,0 +1 @@
|
||||
D@.{<7B>x
|
||||
25
test/asm/fragment-align.asm
Normal file
25
test/asm/fragment-align.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[1]*/
|
||||
|
||||
db $40
|
||||
|
||||
SECTION "Word", ROM0/*[6]*/
|
||||
|
||||
dw $78d5
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/,ALIGN[1]
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2 ; Uh oh
|
||||
3
test/asm/fragment-align.err
Normal file
3
test/asm/fragment-align.err
Normal file
@@ -0,0 +1,3 @@
|
||||
ERROR: fragment-align.asm(25):
|
||||
Section's alignment fails required alignment (offset from section start = $0004)
|
||||
error: Assembly aborted (1 errors)!
|
||||
0
test/asm/fragment-align.out
Normal file
0
test/asm/fragment-align.out
Normal file
@@ -1,10 +1,4 @@
|
||||
ERROR: section-union.asm(37):
|
||||
Section "test" already declared as union section
|
||||
warning: section-union.asm(37): [-Wobsolete]
|
||||
Concatenation of non-fragment sections is deprecated
|
||||
ERROR: section-union.asm(37):
|
||||
Section "test" already declared as fixed at $c000
|
||||
ERROR: section-union.asm(37):
|
||||
Section "test" already declared as aligned to 256 bytes
|
||||
Section already declared as union section
|
||||
FATAL: section-union.asm(37):
|
||||
Cannot create section "test" (3 errors)
|
||||
Cannot create section "test" (1 error)
|
||||
|
||||
20
test/link/fragment-align/base-bad/a.asm
Normal file
20
test/link/fragment-align/base-bad/a.asm
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[1]*/
|
||||
|
||||
db $40
|
||||
|
||||
SECTION "Word", ROM0/*[6]*/
|
||||
|
||||
dw $78d5
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/,ALIGN[1]
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
5
test/link/fragment-align/base-bad/b.asm
Normal file
5
test/link/fragment-align/base-bad/b.asm
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2 ; Uh oh
|
||||
1
test/link/fragment-align/base-bad/out.err
Normal file
1
test/link/fragment-align/base-bad/out.err
Normal file
@@ -0,0 +1 @@
|
||||
error: Section "Frag" is defined with conflicting 2-byte alignment (offset 1) and 4-byte alignment (offset 3)
|
||||
20
test/link/fragment-align/base/a.asm
Normal file
20
test/link/fragment-align/base/a.asm
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[1]*/
|
||||
|
||||
db $40
|
||||
|
||||
SECTION "Word", ROM0/*[5]*/
|
||||
|
||||
dw $78d5
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/,ALIGN[1]
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
5
test/link/fragment-align/base/b.asm
Normal file
5
test/link/fragment-align/base/b.asm
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
0
test/link/fragment-align/base/out.err
Normal file
0
test/link/fragment-align/base/out.err
Normal file
1
test/link/fragment-align/base/out.gb
Normal file
1
test/link/fragment-align/base/out.gb
Normal file
@@ -0,0 +1 @@
|
||||
D@.{<7B>x
|
||||
8
test/link/fragment-align/org-bad/a.asm
Normal file
8
test/link/fragment-align/org-bad/a.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0[0] ; Uh oh
|
||||
|
||||
db $40
|
||||
|
||||
SECTION "Word", ROM0/*[6]*/
|
||||
|
||||
dw $78d5
|
||||
17
test/link/fragment-align/org-bad/b.asm
Normal file
17
test/link/fragment-align/org-bad/b.asm
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/,ALIGN[1]
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
1
test/link/fragment-align/org-bad/out.err
Normal file
1
test/link/fragment-align/org-bad/out.err
Normal file
@@ -0,0 +1 @@
|
||||
error: Section "Frag" is defined with conflicting address $0000 and 4-byte alignment (offset 2)
|
||||
25
test/link/fragment-align/org-rev-bad/a.asm
Normal file
25
test/link/fragment-align/org-rev-bad/a.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
SECTION "Word", ROM0/*[5]*/
|
||||
|
||||
dw $78df
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[1]*/
|
||||
|
||||
db $40
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/,ALIGN[1,1]
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
2
test/link/fragment-align/org-rev-bad/b.asm
Normal file
2
test/link/fragment-align/org-rev-bad/b.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0[6] ; Uh oh
|
||||
1
test/link/fragment-align/org-rev-bad/out.err
Normal file
1
test/link/fragment-align/org-rev-bad/out.err
Normal file
@@ -0,0 +1 @@
|
||||
error: Section "Frag" is defined with conflicting 4-byte alignment (offset 1) and address $0006
|
||||
25
test/link/fragment-align/org-rev/a.asm
Normal file
25
test/link/fragment-align/org-rev/a.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
SECTION "Word", ROM0/*[5]*/
|
||||
|
||||
dw $78df
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[1]*/
|
||||
|
||||
db $40
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/,ALIGN[1,1]
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
2
test/link/fragment-align/org-rev/b.asm
Normal file
2
test/link/fragment-align/org-rev/b.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0[5]
|
||||
0
test/link/fragment-align/org-rev/out.err
Normal file
0
test/link/fragment-align/org-rev/out.err
Normal file
1
test/link/fragment-align/org-rev/out.gb
Normal file
1
test/link/fragment-align/org-rev/out.gb
Normal file
@@ -0,0 +1 @@
|
||||
D@.{<7B>x
|
||||
8
test/link/fragment-align/org/a.asm
Normal file
8
test/link/fragment-align/org/a.asm
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0[1]
|
||||
|
||||
db $40
|
||||
|
||||
SECTION "Word", ROM0/*[6]*/
|
||||
|
||||
dw $78d5
|
||||
17
test/link/fragment-align/org/b.asm
Normal file
17
test/link/fragment-align/org/b.asm
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[2]*/,ALIGN[1]
|
||||
|
||||
db $2e
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[3]*/
|
||||
|
||||
db $1f
|
||||
|
||||
SECTION "Byte", ROM0/*[0]*/
|
||||
|
||||
db $44
|
||||
|
||||
SECTION FRAGMENT "Frag", ROM0/*[4]*/
|
||||
|
||||
db $7b
|
||||
align 2, 1
|
||||
0
test/link/fragment-align/org/out.err
Normal file
0
test/link/fragment-align/org/out.err
Normal file
1
test/link/fragment-align/org/out.gb
Normal file
1
test/link/fragment-align/org/out.gb
Normal file
@@ -0,0 +1 @@
|
||||
D@.{<7B>x
|
||||
@@ -1,6 +1,6 @@
|
||||
error: Section "conflicting alignment" is defined with conflicting 4-byte alignment (offset 0) and address $cafe
|
||||
---
|
||||
ERROR: <stdin>(18):
|
||||
Section "conflicting alignment" already declared as aligned to 4 bytes (offset 0)
|
||||
Section already declared as aligned to 4 bytes (offset 0)
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "conflicting alignment" (1 errors)
|
||||
Cannot create section "conflicting alignment" (1 error)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
error: Section "conflicting alignment" is defined with conflicting 8-byte alignment (offset 7) and 16-byte alignment (offset 14)
|
||||
---
|
||||
ERROR: <stdin>(18):
|
||||
Section "conflicting alignment" already declared with incompatible 3-byte alignment (offset 7)
|
||||
Section already declared with incompatible 3-byte alignment (offset 7)
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "conflicting alignment" (1 errors)
|
||||
Cannot create section "conflicting alignment" (1 error)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
error: Section "conflicting types" is defined with conflicting types HRAM and WRAM0
|
||||
---
|
||||
ERROR: <stdin>(18):
|
||||
Section "conflicting types" already exists but with type HRAM
|
||||
Section already exists but with type HRAM
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "conflicting types" (1 errors)
|
||||
Cannot create section "conflicting types" (1 error)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
error: Section "conflicting banks" is defined with conflicting banks 4 and 1
|
||||
---
|
||||
ERROR: <stdin>(14):
|
||||
Section "conflicting banks" already declared with different bank 4
|
||||
Section already declared with different bank 4
|
||||
FATAL: <stdin>(14):
|
||||
Cannot create section "conflicting banks" (1 errors)
|
||||
Cannot create section "conflicting banks" (1 error)
|
||||
|
||||
@@ -3,4 +3,4 @@ error: Section "overlaid data" is of type ROM0, which cannot be unionized
|
||||
ERROR: <stdin>(18):
|
||||
Cannot declare ROM sections as UNION
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "overlaid data" (1 errors)
|
||||
Cannot create section "overlaid data" (1 error)
|
||||
|
||||
@@ -3,4 +3,4 @@ error: Section "different data" is of type ROM0, which cannot be unionized
|
||||
ERROR: <stdin>(16):
|
||||
Cannot declare ROM sections as UNION
|
||||
FATAL: <stdin>(16):
|
||||
Cannot create section "different data" (1 errors)
|
||||
Cannot create section "different data" (1 error)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
error: Section "conflicting alignment" is defined with conflicting 8-byte alignment (offset 7) and 8-byte alignment (offset 6)
|
||||
---
|
||||
ERROR: <stdin>(18):
|
||||
Section "conflicting alignment" already declared with incompatible 3-byte alignment (offset 7)
|
||||
Section already declared with incompatible 3-byte alignment (offset 7)
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "conflicting alignment" (1 errors)
|
||||
Cannot create section "conflicting alignment" (1 error)
|
||||
|
||||
@@ -3,4 +3,4 @@ error: Section "different section sizes" is of type ROM0, which cannot be unioni
|
||||
ERROR: <stdin>(16):
|
||||
Cannot declare ROM sections as UNION
|
||||
FATAL: <stdin>(16):
|
||||
Cannot create section "different section sizes" (1 errors)
|
||||
Cannot create section "different section sizes" (1 error)
|
||||
|
||||
@@ -3,4 +3,4 @@ error: Section "different syntaxes" is of type ROM0, which cannot be unionized
|
||||
ERROR: <stdin>(18):
|
||||
Cannot declare ROM sections as UNION
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "different syntaxes" (1 errors)
|
||||
Cannot create section "different syntaxes" (1 error)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
error: Section "conflicting address" is defined with conflicting addresses $beef and $babe
|
||||
---
|
||||
ERROR: <stdin>(16):
|
||||
Section "conflicting address" already declared as fixed at different address $beef
|
||||
Section already declared as fixed at different address $beef
|
||||
FATAL: <stdin>(16):
|
||||
Cannot create section "conflicting address" (1 errors)
|
||||
Cannot create section "conflicting address" (1 error)
|
||||
|
||||
@@ -3,4 +3,4 @@ error: Section "mutually-overlaid data" is of type ROM0, which cannot be unioniz
|
||||
ERROR: <stdin>(18):
|
||||
Cannot declare ROM sections as UNION
|
||||
FATAL: <stdin>(18):
|
||||
Cannot create section "mutually-overlaid data" (1 errors)
|
||||
Cannot create section "mutually-overlaid data" (1 error)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
export LC_ALL=C
|
||||
set -o pipefail
|
||||
|
||||
otemp=$(mktemp)
|
||||
gbtemp=$(mktemp)
|
||||
@@ -13,16 +14,31 @@ bold=$(tput bold)
|
||||
resbold=$(tput sgr0)
|
||||
red=$(tput setaf 1)
|
||||
rescolors=$(tput op)
|
||||
|
||||
tryDiff () {
|
||||
diff -u --strip-trailing-cr $1 $2 || (echo "${bold}${red}${i%.asm}.out mismatch!${rescolors}${resbold}"; false)
|
||||
if ! diff -u --strip-trailing-cr $1 $2; then
|
||||
echo "${bold}${red}${i%.asm}.out mismatch!${rescolors}${resbold}"
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
tryCmp () {
|
||||
cmp $1 $2 || (../../contrib/gbdiff.bash $1 $2; echo "${bold}${red}${i%.asm}.out.bin mismatch!${rescolors}${resbold}"; false)
|
||||
if ! cmp $1 $2; then
|
||||
../../contrib/gbdiff.bash $1 $2
|
||||
echo "${bold}${red}${i%.asm}.out.bin mismatch!${rescolors}${resbold}"
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
RGBASM=../../rgbasm
|
||||
RGBLINK=../../rgblink
|
||||
rgblink() {
|
||||
out="$(env $RGBLINK "$@")" || return $?
|
||||
if [[ -n "$out" ]]; then
|
||||
echo "$bold${red}Linking shouldn't produce anything on stdout!$rescolors$resbold"
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
for i in *.asm; do
|
||||
$RGBASM -o $otemp $i
|
||||
@@ -31,13 +47,13 @@ for i in *.asm; do
|
||||
ran_flag=
|
||||
for flag in '-d' '-t' '-w'; do
|
||||
if [ -f ${i%.asm}-no${flag}.out ]; then
|
||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||
rgblink -o $gbtemp $otemp > $outtemp 2>&1
|
||||
tryDiff ${i%.asm}-no${flag}.out $outtemp
|
||||
rc=$(($? || $rc))
|
||||
ran_flag=1
|
||||
fi
|
||||
if [ -f ${i%.asm}${flag}.out ]; then
|
||||
$RGBLINK ${flag} -o $gbtemp $otemp > $outtemp 2>&1
|
||||
rgblink ${flag} -o $gbtemp $otemp > $outtemp 2>&1
|
||||
tryDiff ${i%.asm}${flag}.out $outtemp
|
||||
rc=$(($? || $rc))
|
||||
ran_flag=1
|
||||
@@ -49,7 +65,7 @@ for i in *.asm; do
|
||||
|
||||
# Other tests have several linker scripts
|
||||
find . -name "${i%.asm}*.link" | while read script; do
|
||||
$RGBLINK -l $script -o $gbtemp $otemp > $outtemp 2>&1
|
||||
rgblink -l $script -o $gbtemp $otemp > $outtemp 2>&1
|
||||
tryDiff ${script%.link}.out $outtemp
|
||||
rc=$(($? || $rc))
|
||||
ran_flag=1
|
||||
@@ -59,7 +75,7 @@ for i in *.asm; do
|
||||
fi
|
||||
|
||||
# The rest of the tests just links a file, and maybe checks the binary
|
||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||
rgblink -o $gbtemp $otemp > $outtemp 2>&1
|
||||
if [ -f ${i%.asm}.out ]; then
|
||||
tryDiff ${i%.asm}.out $outtemp
|
||||
rc=$(($? || $rc))
|
||||
@@ -75,41 +91,54 @@ done
|
||||
|
||||
# These tests do their own thing
|
||||
|
||||
$RGBASM -o $otemp high-low/a.asm
|
||||
$RGBLINK -o $gbtemp $otemp
|
||||
$RGBASM -o $otemp high-low/b.asm
|
||||
$RGBLINK -o $gbtemp2 $otemp
|
||||
i="high-low.asm" tryCmp $gbtemp $gbtemp2
|
||||
rc=$(($? || $rc))
|
||||
|
||||
$RGBASM -o $otemp bank-const/a.asm
|
||||
$RGBASM -o $gbtemp2 bank-const/b.asm
|
||||
$RGBLINK -o $gbtemp $gbtemp2 $otemp > $outtemp 2>&1
|
||||
rgblink -o $gbtemp $gbtemp2 $otemp > $outtemp 2>&1
|
||||
i="bank-const.asm" tryDiff bank-const/err.out $outtemp
|
||||
rc=$(($? || $rc))
|
||||
|
||||
for i in fragment-align/*; do
|
||||
$RGBASM -o $otemp $i/a.asm
|
||||
$RGBASM -o $gbtemp2 $i/b.asm
|
||||
rgblink -o $gbtemp $otemp $gbtemp2 2>$outtemp
|
||||
tryDiff $i/out.err $outtemp
|
||||
rc=$(($? || $rc))
|
||||
if [[ -f $i/out.gb ]]; then
|
||||
dd if=$gbtemp count=1 bs=$(printf %s $(wc -c < $i/out.gb)) > $otemp 2>/dev/null
|
||||
tryCmp $i/out.gb $otemp
|
||||
rc=$(($? || $rc))
|
||||
fi
|
||||
done
|
||||
|
||||
$RGBASM -o $otemp high-low/a.asm
|
||||
rgblink -o $gbtemp $otemp
|
||||
$RGBASM -o $otemp high-low/b.asm
|
||||
rgblink -o $gbtemp2 $otemp
|
||||
i="high-low.asm" tryCmp $gbtemp $gbtemp2
|
||||
rc=$(($? || $rc))
|
||||
|
||||
$RGBASM -o $otemp section-union/good/a.asm
|
||||
$RGBASM -o $gbtemp2 section-union/good/b.asm
|
||||
$RGBLINK -o $gbtemp -l section-union/good/script.link $otemp $gbtemp2
|
||||
rgblink -o $gbtemp -l section-union/good/script.link $otemp $gbtemp2
|
||||
dd if=$gbtemp count=1 bs=$(printf %s $(wc -c < section-union/good/ref.out.bin)) > $otemp 2>/dev/null
|
||||
i="section-union/good.asm" tryCmp section-union/good/ref.out.bin $otemp
|
||||
rc=$(($? || $rc))
|
||||
$RGBASM -o $otemp section-union/fragments/a.asm
|
||||
$RGBASM -o $gbtemp2 section-union/fragments/b.asm
|
||||
$RGBLINK -o $gbtemp $otemp $gbtemp2
|
||||
rgblink -o $gbtemp $otemp $gbtemp2
|
||||
dd if=$gbtemp count=1 bs=$(printf %s $(wc -c < section-union/fragments/ref.out.bin)) > $otemp 2>/dev/null
|
||||
i="section-union/fragments.asm" tryCmp section-union/fragments/ref.out.bin $otemp
|
||||
rc=$(($? || $rc))
|
||||
for i in section-union/*.asm; do
|
||||
$RGBASM -o $otemp $i
|
||||
$RGBASM -o $gbtemp2 $i -DSECOND
|
||||
if $RGBLINK $otemp $gbtemp2 > $outtemp 2>&1; then
|
||||
if rgblink $otemp $gbtemp2 2>$outtemp; then
|
||||
echo -e "${bold}${red}$i didn't fail to link!${rescolors}${resbold}"
|
||||
rc=1
|
||||
fi
|
||||
echo --- >> $outtemp
|
||||
# Ensure RGBASM also errors out
|
||||
echo 'SECOND equs "1"' | cat $i - $i | $RGBASM - 2>> $outtemp
|
||||
cat $i - $i <<<'SECOND equs "1"' | $RGBASM - 2>> $outtemp
|
||||
tryDiff ${i%.asm}.out $outtemp
|
||||
rc=$(($? || $rc))
|
||||
done
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
warning: v1: VRAM bank 1 can't be used with option -d.
|
||||
warning: v1: VRAM bank 1 can't be used with option -d
|
||||
error: Sanity checks failed
|
||||
|
||||
Reference in New Issue
Block a user