Commit e69cff63 authored by dbarbera's avatar dbarbera
Browse files

Execute generated IR

parent 5cefbcf0
...@@ -7,16 +7,18 @@ test-ada: ...@@ -7,16 +7,18 @@ test-ada:
../../../opengeode.py --toAda myfunction.pr system_structure.pr ../../../opengeode.py --toAda myfunction.pr system_structure.pr
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c myfunction.adb gnatmake -c myfunction.adb
gcc -c test.c gcc -c test_ada.c
gnatbind -n myfunction.ali gnatbind -n myfunction.ali
gnatlink -o testcase test.o myfunction.ali -lgnat gnatlink -o testcase test_ada.o myfunction.ali -lgnat
./testcase
./testcase | diff expected - ./testcase | diff expected -
test-llvm: test-llvm:
../../../opengeode.py myfunction.pr system_structure.pr --llvm ../../../opengeode.py myfunction.pr system_structure.pr --llvm
llc myfunction.ll llc myfunction.ll
gcc -c myfunction.s gcc -c myfunction.s
gcc -c test_llvm.c
gcc myfunction.o test_llvm.o -o testcase
./testcase | diff expected -
coverage: coverage:
coverage run -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda coverage run -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda
......
#include <math.h>
#include <stdio.h>
extern void myfunction_startup();
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
void myfunction_RI_set_mytimer(long long *val)
{
printf("[C] SET MyTimer: %lld\n", *val);
}
void myfunction_RI_reset_mytimer()
{
printf("RESET MyTimer\n");
}
int main()
{
printf("[C Code] Running test\n");
myfunction_startup();
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment