aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Driver.ml
Commit message (Collapse)AuthorAgeFilesLines
* Formatted json printing.Bernhard Schommer2017-06-281-8/+23
| | | | | | | | | Instead of just dumping the json output it is now a little bit formatted for better reading. Furthermore the AsmToJson function for the non powerpc targets now prints the json value "null" sucht that the resulting json file is valid json.
* Added a little bit more compilation info to sdump.Bernhard Schommer2017-06-261-2/+9
| | | | | | The additional compilation information contains the file, command line (after @-file expansion) and the current working directory. Bug 21690
* RISC-V port and assorted changesXavier Leroy2017-04-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commits adds code generation for the RISC-V architecture, both in 32- and 64-bit modes. The generated code was lightly tested using the simulator and cross-binutils from https://riscv.org/software-tools/ This port required the following additional changes: - Integers: More properties about shrx - SelectOp: now provides smart constructors for mulhs and mulhu - SelectDiv, 32-bit integer division and modulus: implement constant propagation, use the new smart constructors mulhs and mulhu. - Runtime library: if no asm implementation is provided, run the reference C implementation through CompCert. Since CompCert rejects the definitions of names of special functions such as __i64_shl, the reference implementation now uses "i64_" names, e.g. "i64_shl", and a renaming "i64_ -> __i64_" is performed over the generated assembly file, before assembling and building the runtime library. - test/: add SIMU make variable to run tests through a simulator - test/regression/alignas.c: make sure _Alignas and _Alignof are not #define'd by C headers commit da14495c01cf4f66a928c2feff5c53f09bde837f Author: Xavier Leroy <xavier.leroy@inria.fr> Date: Thu Apr 13 17:36:10 2017 +0200 RISC-V port, continued Now working on Asmgen. commit 36f36eb3a5abfbb8805960443d087b6a83e86005 Author: Xavier Leroy <xavier.leroy@inria.fr> Date: Wed Apr 12 17:26:39 2017 +0200 RISC-V port, first steps This port is based on Prashanth Mundkur's experimental RV32 port and brings it up to date with CompCert, and adds 64-bit support (RV64). Work in progress.
* Add optimization option finline.Bernhard Schommer2017-04-071-0/+1
| | | | | | The new option f(no-)inline controlls whether inlining is active or not. Bug 21343.
* Added missing dltl to dall.Bernhard Schommer2017-03-081-0/+1
|
* Merge pull request #170 from AbsInt/remove_cminorXavier Leroy2017-02-151-65/+0
|\ | | | | | | | | | | Remove CompCert's ability to parse and compile source files written in Cminor This facility is no longer used (as far as we know) and is painful to maintain.
| * Removed CMinor import. Bug 20992Bernhard Schommer2017-02-141-65/+0
| |
* | Removed superfluous semicolon.Bernhard Schommer2017-02-141-1/+1
|/
* Remove Optionsprinter. Bug 20993Bernhard Schommer2017-02-141-14/+1
|
* Refactor the classification of attributesXavier Leroy2017-02-031-0/+1
| | | | | | | | | | | | | | | Introduce Cutil.class_of_attribute to return the class of the given attribute: one among Attr_type attribute related to types (e.g. "aligned") Attr_struct attribute related to struct/union/enum types (e.g. "packed") Attr_function attribute related to function types (e.g. "noreturn") Attr_name attribute related to variable and function declarations (e.g. "section") Attr_unknown attribute was not declared Cutil.declare_attribute is used to associate a class to a custom attribute. Standard attributes (const, volatile, _Alignas, etc) are Attr_type. cfronted/C2C.ml: declare the few attributes that CompCert honors currently. cparser/GCC.ml: a bigger list of attributes taken from GCC, for reference only.
* Fixed indention of help.Bernhard Schommer2017-01-271-3/+3
|
* Allow .sx files for preprocessed assembler files.Bernhard Schommer2017-01-251-0/+3
| | | | | GCC treats files with .sx extension in the same way as it treats files with .S suffix.
* Use quoted strings.Bernhard Schommer2017-01-181-74/+79
| | | | | | Instead of escaping all newlines etc for the help options use quoted strings. Bug 19872
* Added backtrace handler.Bernhard Schommer2017-01-171-0/+2
| | | | | | | | If CompCert crashes because of an uncaught exception the exception is caught toplevel and the backtrace is printed plus an additional message to include the backtrace in a support request, if buildnr and tag are available. Bug 20681.
* add parameter to enforce a specific compcert build number for QSKs (bug 20595)Michael Schmidt2016-12-161-2/+14
|
* Also exit on errors. Bug 19872Bernhard Schommer2016-12-151-1/+1
|
* Check errors at the end. Bug 19872Bernhard Schommer2016-12-151-0/+1
|
* Merge pull request #145 from AbsInt/64Xavier Leroy2016-10-271-3/+6
|\ | | | | | | Support for 64-bit target processors + support for x86 in 64-bit mode
| * Make Archi.ptr64 always computable, and reorganize files accordingly: ia32 ↵Xavier Leroy2016-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | -> x86/x86_32/x86_64 Having Archi.ptr64 as an opaque Parameter that is determined at run-time depending on compcert.ini is problematic for applications such as VST where functions such as Ctypes.sizeof must compute within Coq. This commit introduces two versions of the Archi.v file, one for x86 32 bits (with ptr64 := false), one for x86 64 bits (with ptr64 := true). Unlike previous approaches, no other file is duplicated between these two variants of x86. While we are at it, I renamed "ia32" into "x86" everywhere. "ia32" is Intel speak for the 32-bit architecture. It is not a good name to describe both the 32 and 64 bit architectures. Finally, .depend is no longer under version control and is regenerated when the target architecture changes. That's because the location of Archi.v differs between the ports that have 32/64 bit variants (x86 so far) and the ports that have only one bitsize (ARM and PowerPC so far).
| * Support for 64-bit architectures: generic supportXavier Leroy2016-10-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | - Introduce Archi.ptr64 parameter. - Define module Ptrofs of integers as wide as a pointer (64 if Archi.ptr64, 32 otherwise). - Use Ptrofs.int as the offset type for Vptr values and anywhere pointer offsets are manipulated. - Modify Val operations that handle pointers (e.g. Val.add, Val.sub, Val.cmpu) so that in 64-bit pointer mode it is the "long" operation (e.g. Val.addl, Val.subl, Val.cmplu) that handles pointers. - Update the memory model accordingly. - Modify C operations that handle pointers (e.g. addition, subtraction, comparisons) accordingly. - Make it possible to turn off the splitting of 64-bit integers into pairs of 32-bit integers. - Update the compiler front-end and back-end accordingly.
* | Document -target and -conf. Bug 20210Bernhard Schommer2016-10-181-0/+2
| |
* | Refactored debugging options.Bernhard Schommer2016-10-141-28/+5
| | | | | | | | | | | | | | The options controlling the generation of debugging information are now moved into the Debug module. Futhermore the -gdepth options are replaced in favor of a more gcc compatible version. Bug 20193
* | Remove undocumented option. Bug 20193Bernhard Schommer2016-10-141-6/+2
| |
* | Fix minor typoMichael Schmidt2016-10-121-1/+1
|/
* Merge pull request #139 from AbsInt/advanced-diagnosticsBernhard Schommer2016-09-201-31/+34
|\ | | | | Advanced diagnostics
| * Merge branch 'master' into advanced-diagnosticsBernhard Schommer2016-08-291-2/+17
| |\
| * | Additional test for color output.Bernhard Schommer2016-08-051-26/+27
| | | | | | | | | | | | | | | | | | Color output is only enabled if stderr is a tty, and the environment variable TERM is not empty or dumb. Bug 18004
| * | Classified all warnings and added various options.Bernhard Schommer2016-07-291-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now each warning either has a name and can be turned on/off, made into an error,etc. or is a warning that always will be triggered. The message of the warnings are similar to the ones emited by gcc/clang and all fit into one line. Furthermore the diagnostics are now colored if colored output is available. Bug 18004
* | | Added option to specify sdump folder. Fix 19816.Bernhard Schommer2016-09-161-2/+7
| |/ |/|
* | fix merge conflictsMichael Schmidt2016-08-171-0/+1
|\ \
| * \ Merge pull request #107 from AbsInt/add-fileXavier Leroy2016-08-171-0/+1
| |\ \ | | | | | | | | Add support for response files
| | * | Added responsefile support for commandline.Bernhard Schommer2016-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commandline can now be passed in a file specifed with @file on the Commandline. The quoting convention is similar to the one used by gcc, etc. Options are separated by whitespaces and options with whitespaecs need to be quoted. Bug 18303
* | | | Implement support for big endian arm targets.Bernhard Schommer2016-08-051-1/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | Adds support for the big endian arm targets by making the target endianess flag configurable, adding support for the big endian calling conventions, rewriting memory access patterns and adding big endian versions of the runtime functions. Bug 19418
* | / Added -dall which enables all tracing.Bernhard Schommer2016-08-021-0/+12
| |/ |/|
* | add missing asmexpand step to cminor handler in driverMichael Schmidt2016-07-011-21/+27
|/
* Also add braces for arm. Bug 19197Bernhard Schommer2016-06-241-2/+2
|
* Moved assembler and linker into own files.Bernhard Schommer2016-06-241-110/+9
| | | | | | The function to call the assembler and the linker are now in own files like the preprocessor. Bug 19197
* Deactivate options target dependend.Bernhard Schommer2016-06-241-62/+82
| | | | | | Options only available for gnu systems or arm target arch are no longer displayed in the help and cannot be selected any longer. Bug 19197
* Added version string to Clightgen.Bernhard Schommer2016-05-241-1/+1
| | | | | | Clightgen now also prints a version string. Also the CompCert version string is now similar in both modes. Bug 18768.
* Moved shared frontend code in own file.Bernhard Schommer2016-05-241-275/+105
| | | | | | | Clightgen and CompCert share the code for preprocessing as well as parsing C files. The code as well as command line switches is moved in the new module Frontend. Bug 18768
* Moved some system functions into own module.Bernhard Schommer2016-05-241-68/+1
| | | | | | The process handling is now in its own file, like the output name generation etc. Bug 18768
* Added option to pass linker options to gcc.Bernhard Schommer2016-05-131-0/+2
| | | | | | | | Some gcc options have influence on the linking (especially -march, etc.). The new -WUl options allows it to pass the options to the gcc called for linking instead of passing them to the linker directly. Bug 18949.
* bug 18004, fix file extensions for dparse optionMichael Schmidt2016-04-251-1/+1
|
* Enabled Werror via command line option.Bernhard Schommer2016-04-251-0/+1
| | | | | | The new command line option -Werror activates the treatment of warnings as errors. Bug 18004
* Deactivate warning 27 and added back removed code.Bernhard Schommer2016-03-151-5/+5
| | | | | | The code was mostly there for documentation effort. So warning 27 is deactivated again. Bug 18349
* Code cleanup.Bernhard Schommer2016-03-101-14/+14
| | | | | | Removed some unused variables, functions etc. and resolved some problems which occur if all warnings except 3,4,9 and 29 are active. Bug 18394.
* Added more support for gcc options.Bernhard Schommer2016-03-021-4/+75
| | | | | | | | | | | | | | | | | | | | | | | Added the gcc options for the preprocessor: -Xpreprocessor -M -MM -MF -MG -MP -MT -MQ -nostdinc -imacros -idirafter -isystem -iquote -P -C -CC Also warn for not supported GCC options in the diab case. Bug 18066
* Added gcc's Xassembler option.Bernhard Schommer2016-02-291-3/+8
| | | | | | | The Xassembler option passes one option to the assembler and can be used to pass options to the underlying assembler that the gcc driver does not recognize. Bug 18066
* Fixed typo. Bug 18066Bernhard Schommer2016-02-291-3/+4
|
* Added some gcc linker options.Bernhard Schommer2016-02-261-0/+22
| | | | | | | | | | | CompCert now recognizes the gcc linker options: -nostartfiles -nodefaultlibs -nostdlib -s -Xlinker <opt> -u <symb> Bug 18066.