Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Due to inactivity, this project is scheduled to be deleted on 2035-04-24.
Why is this scheduled?
Show more breadcrumbs
skitzml
compiler
Commits
526254fe
Verified
Commit
526254fe
authored
5 years ago
by
Guillaume Kessibi
Browse files
Options
Downloads
Patches
Plain Diff
test suite: added -from-asml tests and modified closure.asml to use indices instead of offsets
parent
b4d12024
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#35307
passed
5 years ago
Stage: build_compiler
Stage: tests
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+5
-1
5 additions, 1 deletion
Makefile
asml/closure.asml
+2
-2
2 additions, 2 deletions
asml/closure.asml
tests/suite_from_asml.sh
+17
-0
17 additions, 0 deletions
tests/suite_from_asml.sh
with
24 additions
and
3 deletions
Makefile
+
5
−
1
View file @
526254fe
...
@@ -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
\0
33[1mDocumentation ready at: _build/doc/index.html
\0
33[0m"
echo
-e
"
\e
[42m
\0
33[1mDocumentation ready at: _build/doc/index.html
\0
33[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
This diff is collapsed.
Click to expand it.
asml/closure.asml
+
2
−
2
View file @
526254fe
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
This diff is collapsed.
Click to expand it.
tests/suite_from_asml.sh
0 → 100755
+
17
−
0
View file @
526254fe
#!/bin/sh
echo
-e
"
\n\e
[44m
\0
33[1m---- TESTING COMPILING FROM ASML! ----
\0
33[0m"
echo
-e
"
\n\e
[4m
\0
33[1m--> All asml files
\0
33[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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment