blob: ad92a2ef2707c000f5ee037d462f8a08f96730c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
for COMPILER in gcc clang pcc tcc; do
for MODE in freestanding hosted; do
for LEVEL in d s 0 1 2 3; do
echo "## $COMPILER $MODE $LEVEL ##"
./build.sh c4 $COMPILER $MODE $LEVEL
./build.sh cc $COMPILER $MODE $LEVEL
./cc < test1.c > test1.asm
cat cc.c EOF test1.c | ./c4 > test1-c4.asm
cat c4.c EOF cc.c EOF test1.c | ./c4 > test1-c4-c4.asm
diff test1.asm test1-c4.asm
diff test1.asm test1-c4-c4.asm
fasm test1.asm test1.bin
hexdump -C test1.bin > test1.hex
diff test1.hex test1.hexmust
ndisasm -b32 -o1000000h -a test1.bin > test1.dis
diff test1.dis test1.disasmust
done
done
done
|