Revision 17d2db94
Added by Pierre-Loïc Garoche over 8 years ago
src/basic_library.ml | ||
---|---|---|
155 | 155 |
| "impl", [v1; v2] -> Format.fprintf fmt "(!%a || %a)" pp_val v1 pp_val v2 |
156 | 156 |
| "=", [v1; v2] -> Format.fprintf fmt "(%a == %a)" pp_val v1 pp_val v2 |
157 | 157 |
| "mod", [v1; v2] -> Format.fprintf fmt "(%a %% %a)" pp_val v1 pp_val v2 |
158 |
| "xor", [v1; v2] -> Format.fprintf fmt "(%a ^ %a)" pp_val v1 pp_val v2 |
|
158 | 159 |
| _, [v1; v2] -> Format.fprintf fmt "(%a %s %a)" pp_val v1 i pp_val v2 |
159 | 160 |
| _ -> assert false |
160 | 161 |
|
src/c_backend.ml | ||
---|---|---|
774 | 774 |
fprintf fmt "GCC=gcc@."; |
775 | 775 |
fprintf fmt "INC=/usr/local/include/lustrec@."; |
776 | 776 |
fprintf fmt "@."; |
777 |
fprintf fmt "main:@.";
|
|
777 |
fprintf fmt "%s_%s:@." basename nodename;
|
|
778 | 778 |
fprintf fmt "\t${GCC} -I${INC} -I. -c %s.c@." basename; |
779 | 779 |
fprintf fmt "\t${GCC} -I${INC} -c ${INC}/io_frontend.c@."; |
780 |
fprintf fmt "\t${GCC} -I${INC} -c ${INC}/StdLibrary.c@."; |
|
781 |
fprintf fmt "\t${GCC} -o %s_%s io_frontend.o StdLibrary.o -lm %s.o@." basename nodename basename |
|
780 |
(* fprintf fmt "\t${GCC} -I${INC} -c ${INC}/StdLibrary.c@."; *) |
|
781 |
(* fprintf fmt "\t${GCC} -o %s_%s io_frontend.o StdLibrary.o -lm %s.o@." basename nodename basename*) |
|
782 |
fprintf fmt "\t${GCC} -o %s_%s io_frontend.o -lm %s.o@." basename nodename basename |
|
783 |
|
|
784 |
|
|
782 | 785 |
|
783 | 786 |
(********************************************************************************************) |
784 | 787 |
(* Translation function *) |
Also available in: Unified diff
- Renamed the only target of the generated makefile
- Solved bug: xor are now printed as bitwise xor in c : a ^ b and not a xor b.
git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@131 041b043f-8d7c-46b2-b46e-ef0dd855326e