Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
14eaa27f
Commit
14eaa27f
authored
Aug 12, 2014
by
dbarbera
Browse files
Execute llvm generated code
parent
6ed0927a
Changes
6
Show whitespace changes
Inline
Side-by-side
tests/regression/test10/Makefile
View file @
14eaa27f
...
...
@@ -10,19 +10,25 @@ test-ada:
../../../opengeode.py
--toAda
challenge.pr system_structure.pr
asn1.exe
-Ada
dataview-uniq.asn
-typePrefix
asn1Scc
-equal
gnatmake
-c
*
.adb
gcc
-c
test.c
gcc
-c
test
_ada
.c
gnatbind
-n
challenge.ali
gnatlink
-o
testcase test.o challenge.ali
-lgnat
-lm
gnatlink
-o
testcase test
_ada
.o challenge.ali
-lgnat
-lm
./testcase | diff expected -
test-llvm
:
../../../opengeode.py challenge.pr system_structure.pr
--llvm
../../../opengeode.py challenge.pr system_structure.pr
--check
--llvm
asn1.exe
-c
dataview-uniq.asn
-typePrefix
asn1Scc
-equal
llc challenge.ll
gcc
-c
challenge.s
clang
-c
challenge.s
clang
-c
dataview-uniq.c
clang
-c
test_llvm.c
clang challenge.o dataview-uniq.o test_llvm.o
-o
testcase
-lm
./testcase | diff expected -
coverage
:
coverage run
-p
../../../opengeode.py challenge.pr system_structure.pr
--toAda
clean
:
rm
-rf
*
.adb
*
.ads
*
.pyc runSpark.sh spark.idx
*
.o
*
.ali gnat.cfg examiner
\
bin
*
.wrn
*
.gpr testcase
*
.ll
*
.s
bin
*
.wrn
*
.gpr testcase
*
.ll
*
.s dataview-uniq.c dataview-uniq.h real.c xer.c
\
ber.c acn.c asn1crt.c asn1crt.h
tests/regression/test10/test.c
→
tests/regression/test10/test
_ada
.c
View file @
14eaa27f
File moved
tests/regression/test10/test_llvm.c
0 → 100644
View file @
14eaa27f
#include
<math.h>
#include
<stdio.h>
/* Ada code external interface */
extern
void
challenge_run
();
extern
void
challenge_any_one
();
extern
int
challenge_startup
();
//extern long long l_result;
/* Provide code called by the Ada state machine as external procedure */
void
challenge_RI_pow
(
long
long
*
a
,
long
long
*
b
,
long
long
*
res
)
{
*
res
=
(
long
long
)
pow
((
double
)
*
a
,
(
double
)
*
b
);
}
int
main
()
{
challenge_startup
();
challenge_run
();
challenge_run
();
//printf("Internal state: %lld\n", l_result);
challenge_any_one
();
challenge_run
();
return
0
;
}
tests/regression/test8/Makefile
View file @
14eaa27f
...
...
@@ -17,9 +17,14 @@ test-ada:
./testcase | diff expected -
test-llvm
:
../../../opengeode.py orchestrator.pr system_structure.pr
--llvm
../../../opengeode.py orchestrator.pr system_structure.pr
--check
--llvm
asn1.exe
-c
dataview-uniq.asn
-typePrefix
asn1Scc
-equal
llc orchestrator.ll
gcc
-c
orchestrator.s
clang
-c
orchestrator.s
clang
-c
dataview-uniq.c
clang
-c
test_llvm.c
clang orchestrator.o dataview-uniq.o test_llvm.o
-o
testcase
-lm
./testcase | diff expected -
coverage
:
coverage run
-p
../../../opengeode.py orchestrator.pr system_structure.pr
--toAda
...
...
tests/regression/test8/test.c
→
tests/regression/test8/test
_ada
.c
View file @
14eaa27f
File moved
tests/regression/test8/test_llvm.c
0 → 100644
View file @
14eaa27f
#include
<math.h>
#include
<stdio.h>
#include
"dataview-uniq.h"
extern
void
orchestrator_startup
();
void
orchestrator_RI_VESAT_one_step
(
asn1SccT_GNC_LV_SIM_INPUTS
*
inp
)
{
printf
(
"[C Code] Received T_GNC_LV_SIM_INPUTS
\n
"
);
}
int
main
()
{
printf
(
"[C Code] Running test
\n
"
);
orchestrator_startup
();
return
0
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment