summaryrefslogtreecommitdiff
path: root/miniany/torture.sh
diff options
context:
space:
mode:
Diffstat (limited to 'miniany/torture.sh')
-rwxr-xr-xminiany/torture.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/miniany/torture.sh b/miniany/torture.sh
index 530cd7c..c3d2db7 100755
--- a/miniany/torture.sh
+++ b/miniany/torture.sh
@@ -2,14 +2,26 @@
for COMPILER in gcc clang pcc tcc; do
for MODE in freestanding hosted; do
- for LEVEL in d 0 1 2 3; do
-# freestanding c4 needs much more work
+ for LEVEL in d s 0 1 2 3; do
+ echo "## $COMPILER $MODE $LEVEL ##"
+# pcc and hosted c4 fail, use another compiler for this case for now
# ./build.sh c4 $COMPILER $MODE $LEVEL
- $COMPILER -m32 -o c4 c4.c
+ if test "$COMPILER" = "pcc"; then
+ ./build.sh c4 tcc $MODE $LEVEL
+ else
+ ./build.sh c4 $COMPILER $MODE $LEVEL
+ fi
./build.sh cc $COMPILER $MODE $LEVEL
- ./cc < test1.c
- ./c4 cc.c < test1.c
- ./c4 c4.c cc.c < test1.c
+ ./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