aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/kvx_fp_division' into kvx-workDavid Monniaux2022-03-072-0/+68
|\
| * experiments in divisionDavid Monniaux2022-02-112-0/+68
| |
* | new expansion exampleLéo Gourdin2022-02-281-3/+9
|/
* ccomp profilingLéo Gourdin2022-01-055-16/+36
|
* Merge branch 'towards_2.10' of ../towards_3.10 into kvx-workDavid Monniaux2021-09-3024-47/+492
|\
| * Merge branch 'master' of https://github.com/AbsInt/CompCert into towards_3.10David Monniaux2021-09-2710-12/+24
| |\
| | * Add support to clightgen for generating Csyntax AST as .v filesXavier Leroy2021-09-2210-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | As proposed in #404. This is presented as a new option `-clight` to the existing `clightgen` tool. Revise clightgen testing to test the Csyntax output in addition to the Clight output.
| | * Refactor clightgenXavier Leroy2021-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Split reusable parts of ExportClight.ml off, into ExportBase.ml and ExportCtypes.ml. Rename exportclight/ directory to export/
| * | Merge remote-tracking branch 'origin/csmith' into towards_3.10David Monniaux2021-09-242-1/+24
| |\ \
| | * \ Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-239-10/+122
| | |\ \ | | | | | | | | | | | | | | | into csmith
| | * | | union passingDavid Monniaux2021-09-231-0/+23
| | | | |
| | * | | add union passingDavid Monniaux2021-09-231-1/+1
| | | | |
| | * | | Merge remote-tracking branch 'origin/kvx-work' into csmithDavid Monniaux2021-09-171-0/+313
| | |\ \ \
| * | \ \ \ Merge branch 'master' of https://github.com/AbsInt/CompCert into towards_3.10David Monniaux2021-09-2414-34/+444
| |\ \ \ \ \ | | |_|_|/ / | |/| | | / | | | |_|/ | | |/| |
| | * | | clightgen: handle empty names given to padding bit fieldsXavier Leroy2021-09-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Clight AST, padding bit fields (such as `int : 6;`) in composite declarations are given an ident that corresponds to the empty string. Previously, clightgen would give name `_` to this ident, but this is not valid Coq. This commit gives name `empty_ident` to the empty ident. This name does not start with an underscore, so it cannot conflict with the names for regular idents, which all start with `_`.
| | * | | Native support for bit fields (#400)Xavier Leroy2021-08-2213-34/+431
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Elab bitfields: check size of type <=32bit rather than checking rank (#387)Amos Robinson2021-04-193-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When desugaring a bitfield, allow any integral type that is 32 bits or smaller. Previously this was checking the rank of the type rather than the size. This rank check caused issues with standard headers that declare `uint32_t` to be an `unsigned long` rather than an `unsigned int`. Here, any bitfields declared as `uint32_t` were failing to compile even though they are still actually 32 bits. Co-authored-by: Amos Robinson <amos@gh.st>
* | | | | run csmith on -O3David Monniaux2021-09-291-1/+18
| | | | |
* | | | | tests_O3David Monniaux2021-09-291-1/+21
|/ / / /
* | | | fix for running x86-64David Monniaux2021-09-231-2/+2
| | | |
* | | | try with even more stackDavid Monniaux2021-09-231-1/+1
| | | |
* | | | Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-221-4/+5
|\ \ \ \ | | | | | | | | | | | | | | | into csmith
| * | | | attempt at printing stuffDavid Monniaux2021-09-211-4/+5
| | | | |
* | | | | csmith | creduce breaks on RISC-V 64David Monniaux2021-09-221-0/+36
| | | | |
* | | | | fix typoDavid Monniaux2021-09-211-1/+1
| | | | |
* | | | | grep for ASAN errorsDavid Monniaux2021-09-211-5/+9
| | | | |
* | | | | do not allow arbitrary conversionsDavid Monniaux2021-09-211-4/+4
|/ / / /
* | | | no packed structDavid Monniaux2021-09-211-1/+1
| | | |
* | | | Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-212-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | into csmith
| * | | | -WerrorDavid Monniaux2021-09-211-1/+1
| | | | |
| * | | | wrong curl commandDavid Monniaux2021-09-201-1/+1
| | | | |
| * | | | Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-201-5/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into csmith
| * | | | | don't use unionsDavid Monniaux2021-09-201-1/+1
| | | | | |
* | | | | | better testDavid Monniaux2021-09-201-3/+8
| |/ / / / |/| | | |
* | | | | keep only checksumDavid Monniaux2021-09-201-5/+5
|/ / / /
* | | | Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-202-4/+15
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | into csmith Z
| * \ \ \ Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-201-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into csmith
| | * \ \ \ Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert ↵David Monniaux2021-09-201-0/+9
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | into csmith
| | * | | | | do 500 of themDavid Monniaux2021-09-201-1/+1
| | | | | | |
| * | | | | | separate wget/curlDavid Monniaux2021-09-201-2/+4
| | |/ / / / | |/| | | |
| * | | | | fix issue 244Léo Gourdin2021-09-191-0/+9
| |/ / / /
| * | | | fix for x86-64David Monniaux2021-09-181-1/+1
| | | | |
| * | | | reduce number of csmith testsDavid Monniaux2021-09-181-1/+1
| | | | |
* | | | | better predicateDavid Monniaux2021-09-201-4/+4
| | | | |
* | | | | use clang, better error reportingDavid Monniaux2021-09-201-3/+3
| | | | |
* | | | | RiscVDavid Monniaux2021-09-191-3/+3
| | | | |
* | | | | fix script to answer 0 if differencesDavid Monniaux2021-09-191-1/+4
| | | | |
* | | | | creduce scriptsDavid Monniaux2021-09-192-0/+40
|/ / / /
* | | | target ccDavid Monniaux2021-09-171-1/+4
| | | |
* | | | some csmith testsDavid Monniaux2021-09-171-4/+9
| | | |