#!/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