Skip to content
Snippets Groups Projects
Verified Commit 526254fe authored by Guillaume Kessibi's avatar Guillaume Kessibi
Browse files

test suite: added -from-asml tests and modified closure.asml to use indices instead of offsets

parent b4d12024
No related branches found
No related tags found
No related merge requests found
Pipeline #35307 passed
...@@ -15,7 +15,8 @@ doc: all ...@@ -15,7 +15,8 @@ doc: all
-I _build/backend/asm_gen -I _build/frontend -d _build/doc -I _build/backend/asm_gen -I _build/frontend -d _build/doc
echo -e "\e[42m\033[1mDocumentation ready at: _build/doc/index.html\033[0m" echo -e "\e[42m\033[1mDocumentation ready at: _build/doc/index.html\033[0m"
test: clean all test_typechecking test_asml_gen test_asm_gen test_asm_output test: clean all test_typechecking test_asml_gen test_asm_gen test_asm_output \
test_from_asml
test_typechecking: all test_typechecking: all
PROG=$(PROG) ./tests/typechecking/suite.sh PROG=$(PROG) ./tests/typechecking/suite.sh
...@@ -29,5 +30,8 @@ test_asm_gen: all ...@@ -29,5 +30,8 @@ test_asm_gen: all
test_asm_output: all test_asm_output: all
PROG=$(PROG) ./tests/suite_asm_output.sh PROG=$(PROG) ./tests/suite_asm_output.sh
test_from_asml: all
PROG=$(PROG) ./tests/suite_from_asml.sh
clean: clean:
rm -rf _build $(PROG) *.s *.asml ARM/*.ml* *.output rm -rf _build $(PROG) *.s *.asml ARM/*.ml* *.output
let _add_x y = let _add_x y =
let x = mem(%self + 4) in let x = mem(%self + 1) in
add y x add y x
let _apply_to_zero u = let _apply_to_zero u =
...@@ -11,6 +11,6 @@ let _ = ...@@ -11,6 +11,6 @@ let _ =
let add_x = new 8 in let add_x = new 8 in
let addr_add_x = _add_x in let addr_add_x = _add_x in
let tu0 = mem(add_x + 0) <- addr_add_x in let tu0 = mem(add_x + 0) <- addr_add_x in
let tu1 = mem(add_x + 4) <- x0 in let tu1 = mem(add_x + 1) <- x0 in
let res = call _apply_to_zero add_x in let res = call _apply_to_zero add_x in
call _min_caml_print_int res call _min_caml_print_int res
#!/bin/sh
echo -e "\n\e[44m\033[1m---- TESTING COMPILING FROM ASML! ----\033[0m"
echo -e "\n\e[4m\033[1m--> All asml files\033[0m"
for f in asml/*.asml; do
base=$(basename "$f")
printf "$base:\t"
./$PROG -from-asml $f -o ARM/$base.s
cd ARM && make && qemu-arm $base.arm &>/dev/null && \
printf "\e[1;32mOK \e[0m\n" || exit 1
cd ..
done
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment