2001-06-06 22:29:01 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# test that every step outputs something that is consumable by
|
|
|
|
# another step
|
|
|
|
|
|
|
|
rm -f test.bc.temp[12]
|
|
|
|
|
2002-08-15 21:49:06 +02:00
|
|
|
AS=$2/as
|
|
|
|
DIS=$2/dis
|
2001-09-08 00:58:50 +02:00
|
|
|
|
2002-01-23 19:04:21 +01:00
|
|
|
echo "======== Running assembler/disassembler test on $1"
|
2001-09-08 00:58:50 +02:00
|
|
|
|
2001-06-06 22:29:01 +02:00
|
|
|
# Two full cycles are needed for bitwise stability
|
2002-01-23 19:04:21 +01:00
|
|
|
(
|
|
|
|
$AS < $1 > $1.bc.1 || exit 1
|
|
|
|
$DIS < $1.bc.1 > $1.ll.1 || exit 2
|
|
|
|
$AS < $1.ll.1 > $1.bc.2 || exit 3
|
|
|
|
$DIS < $1.bc.2 > $1.ll.2 || exit 4
|
2001-06-06 22:29:01 +02:00
|
|
|
|
2002-01-23 19:04:21 +01:00
|
|
|
diff $1.ll.[12] || exit 7
|
2001-06-06 22:29:01 +02:00
|
|
|
|
2002-01-23 19:04:21 +01:00
|
|
|
# FIXME: When we sort things correctly and deterministically, we can
|
|
|
|
# reenable this
|
|
|
|
#diff $1.bc.[12] || exit 8
|
2001-07-26 18:30:18 +02:00
|
|
|
|
2002-01-23 19:04:21 +01:00
|
|
|
rm $1.[bl][cl].[12]
|
|
|
|
touch Output/$1.asmdis
|
2002-01-23 21:39:56 +01:00
|
|
|
) || ../Failure.sh "$1 ASM/DIS"
|
2001-06-06 22:29:01 +02:00
|
|
|
|