aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Clflags.ml
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'towards_2.10' of ../towards_3.10 into kvx-workDavid Monniaux2021-09-301-1/+0
|\
| * Merge branch 'master' of https://github.com/AbsInt/CompCert into towards_3.10David Monniaux2021-09-241-1/+0
| |\
| | * Native support for bit fields (#400)Xavier Leroy2021-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This big PR adds support for bit fields in structs and unions to the verified part of CompCert, namely the CompCert C and Clight languages. The compilation of bit field accesses to normal integer accesses + shifts and masks is done and proved correct as part of the Cshmgen pass. The layout of bit fields in memory is done by the functions in module Ctypes. It follows the ELF ABI layout algorithm. As a bonus, basic soundness properties of the layout are shown, such as "two different bit fields do not overlap" or "a bit field and a regular field do not overlap". All this replaces the previous emulation of bit fields by source-to-source rewriting in the unverified front-end of CompCert (module cparse/Bitfield.ml). This emulation was prone to errors (see nonstandard layout instead. The core idea for the PR is that expressions in l-value position denote not just a block, a byte offset and a type, but also a bitfield designator saying whether all the bits of the type are accessed (designator Full) or only some of its bits (designator Bits). Designators of the Bits kind appear when the l-value is a bit field access; the bit width and bit offset in Bits are computed by the functions in Ctypes that implement the layout algorithm. Consequently, both in the semantics of CompCert C and Clight and in the SimplExpr, SimplLocals and Cshmgen compilation passes, pairs of a type and a bitfield designator are used in a number of places where a single type was used before. The introduction of bit fields has a big impact on static initialization (module cfrontend/Initializers.v), which had to be rewritten in large part, along with its soundness proof (cfrontend/Initializersproof.v). Both static initialization and run-time manipulation of bit fields are tested in test/abi using differential testing against GCC and randomly-generated structs. This work exposed subtle interactions between bit fields and the volatile modifier. Currently, the volatile modifier is ignored when accessing a bit field (and a warning is printed at compile-time), just like it is ignored when accessing a struct or union as a r-value. Currently, the natural alignment of bit fields and their storage units cannot be modified with the aligned attribute. _Alignas on bit fields is rejected as per C11, and the packed modifier cannot be applied to a struct containing bit fields.
* | | activate non trapping loads on the KVXDavid Monniaux2021-09-281-1/+1
|/ /
* | - make non trapping loads in scheduling dependent on option (which was ↵David Monniaux2021-09-141-1/+1
| | | | | | | | | | | | ignored on BTL) - set this option to false, since Kalray still ships a buggy runtime system
* | activate register pressure by defaultDavid Monniaux2021-07-161-1/+1
| |
* | use a more recognizable option nameDavid Monniaux2021-07-161-1/+1
| |
* | Change temporary solution (see prev commits), and add option for itnicolas.nardino2021-06-281-0/+1
| |
* | Changed default threshold value following testsnicolas.nardino2021-06-221-1/+1
| |
* | Add option to set thresold and support for riscvnicolas.nardino2021-06-171-0/+1
| |
* | Adding both RV expansion methods in kvx-workLéo Gourdin2021-05-191-0/+2
| |
* | Remove flagsLéo Gourdin2021-04-091-2/+0
| |
* | Compiler options to manage expansionsLéo Gourdin2021-03-261-1/+1
| |
* | Adding a flag to test fp_init_expLéo Gourdin2021-03-021-0/+1
| |
* | Adding a compiler option -fexpanse-rtlcondLéo Gourdin2021-02-161-0/+1
| |
* | Conditions now propagated by CSE3David Monniaux2021-01-201-1/+3
|\ \ | | | | | | | | | Merge remote-tracking branch 'origin/kvx-better2-cse3' into kvx-work
| * | begin implementing -fcse3-conditionsDavid Monniaux2020-12-091-0/+2
| | |
| * | CSE3 compiles again, but some admitted lemmasDavid Monniaux2020-12-091-1/+1
| | |
| * | Merge remote-tracking branch 'origin/kvx-work' into kvx-better2-cse3David Monniaux2020-12-081-0/+1
| |\ \
| * | | start checking for bugsDavid Monniaux2020-12-021-1/+1
| | | |
* | | | Merge branch 'kvx-work' into aarch64-peepholeSylvain Boulmé2020-12-171-0/+1
|\ \ \ \ | | |/ / | |/| |
| * | | Merge branch 'kvx-work' into kvx-work-merge3.8Cyril SIX2020-12-041-0/+7
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile configure
| * | | Merge branch 'master' (Absint 3.8) into kvx-work-merge3.8David Monniaux2020-11-181-0/+1
| |\ \ \ | | | |/ | | |/|
| | * | Add -main option to specify entrypoint function in interpreter mode (#374)Xavier Leroy2020-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When running unit tests with the CompCert reference interpreter, it's nice to be able to start execution at a given test function instead of having to write a main function. This PR adds a -main command-line option to give the name of the entry point function. The default is still main. Frama-C has a similar option. The function specified with -main is called with no arguments. If its return type is int, its return value is the exit status of the program. Otherwise, its return value is ignored and the program exits with status 0.
* | | | set prepass by defaultDavid Monniaux2020-11-271-1/+1
| |_|/ |/| |
* | | Merge remote-tracking branch 'origin/kvx-work' into kvx-test-prepassDavid Monniaux2020-11-031-0/+1
|\| |
| * | Loop Rotate with -flooprotateCyril SIX2020-11-031-0/+1
| | |
* | | Merge remote-tracking branch 'origin/kvx-work' into kvx-test-prepassDavid Monniaux2020-10-311-0/+1
|\| |
| * | refining CSE3 nodesDavid Monniaux2020-10-311-0/+1
| | |
| * | deactivate LICMDavid Monniaux2020-10-281-1/+1
| | |
* | | Merge remote-tracking branch 'origin/kvx-work' into kvx-test-prepassDavid Monniaux2020-10-271-0/+2
|\| |
| * | new option for CSE3 (trivial ops)David Monniaux2020-10-271-0/+2
| | |
* | | deactivate LICM by defaultDavid Monniaux2020-10-271-1/+1
| | |
* | | -mtune=David Monniaux2020-10-221-0/+2
| | |
* | | Merge remote-tracking branch 'origin/kvx-work' into kvx-test-prepassDavid Monniaux2020-10-181-3/+11
|\| |
| * | Loop body unrolling with -funrollbody nCyril SIX2020-10-161-0/+1
| | |
| * | new flags: -fpredict, -ftailduplicate n, -funrollsingle n instead of just ↵Cyril SIX2020-10-091-3/+7
| | | | | | | | | | | | -fduplicate n
* | | command line selection of prepass schedulerDavid Monniaux2020-07-111-0/+1
| | |
* | | use a command-line optionDavid Monniaux2020-07-081-0/+1
|/ /
* | k1c -> kvx changesDavid Monniaux2020-05-261-1/+1
| |
* | -fcse3-glbDavid Monniaux2020-05-061-0/+1
| |
* | CSE3 across mergesDavid Monniaux2020-05-061-0/+1
| |
* | Merge branch 'mppa-work' of ↵David Monniaux2020-04-231-2/+13
|\ \ | | | | | | | | | gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-work
| * \ Merge remote-tracking branch 'origin/mppa-licm' into mppa-featuresDavid Monniaux2020-04-231-2/+3
| |\ \
| | * | CSE3 across callsDavid Monniaux2020-04-231-1/+2
| | | |
| | * | Merge remote-tracking branch 'origin/mppa-cse3' into mppa-licmDavid Monniaux2020-04-231-0/+1
| | |\ \
| | | * | make tracing output optionalDavid Monniaux2020-04-231-0/+1
| | | | |
| * | | | Merge remote-tracking branch 'origin/mppa-fast-div' into mppa-featuresDavid Monniaux2020-04-201-0/+2
| |\ \ \ \
| | * \ \ \ Merge remote-tracking branch 'origin/mppa-work' into mppa-fast-divDavid Monniaux2020-04-201-2/+12
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | (unfinished)
| | * | | | | added -fdiv-i32 and -fdiv-i64 optionsDavid Monniaux2019-05-291-0/+3
| | | | | | |