summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-05-15 20:31:59 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2020-05-15 20:31:59 +0200
commit5d679dbf97fd9a86809bb1ef0e132764ab88d879 (patch)
tree73ae951e9303b72f12c811c396077728147c0682
parent7410a294233d8ee0128c563f53624109d0bc09d8 (diff)
downloadcompilertests-5d679dbf97fd9a86809bb1ef0e132764ab88d879.tar.gz
compilertests-5d679dbf97fd9a86809bb1ef0e132764ab88d879.tar.bz2
fixed test.sh and added a byte/dword move test
-rwxr-xr-xecomp-c/test.sh2
-rw-r--r--ecomp-c/tests/asm-i386/mov.asm12
2 files changed, 13 insertions, 1 deletions
diff --git a/ecomp-c/test.sh b/ecomp-c/test.sh
index fba9c4f..30eefdd 100755
--- a/ecomp-c/test.sh
+++ b/ecomp-c/test.sh
@@ -80,7 +80,7 @@ list_tests( )
echo $TESTS | tr ' ' '\n'
}
-cd "$(dirname "$0")"
+cd "$(dirname "$0")"/tests
rm -f *.asm *.comp_err *.bin *.ebin *.run
diff --git a/ecomp-c/tests/asm-i386/mov.asm b/ecomp-c/tests/asm-i386/mov.asm
new file mode 100644
index 0000000..3be7224
--- /dev/null
+++ b/ecomp-c/tests/asm-i386/mov.asm
@@ -0,0 +1,12 @@
+format binary
+use32
+org $1000000
+mov al, [flag1]
+mov eax, $ffffffff
+mov [flag2], al
+hlt
+db 'XXXXXXX'
+flag1: db $1
+flag2: db $2
+db 'XXXXXXX'
+dd $01020304