| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Fixed a comment.
|
|/ |
|
|\
| |
| | |
Introduce register pairs to describe calling conventions more precisely
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit changes the loc_arguments and loc_result functions that describe calling conventions so that each argument/result can be mapped either to a single location or (in the case of a 64-bit integer) to a pair of two 32-bit locations.
In the current CompCert, all arguments/results of type Tlong are systematically split in two 32-bit halves. We will need to change this in the future to support 64-bit processors. The alternative approach implemented by this commit enables the loc_arguments and loc_result functions to describe precisely which arguments need splitting. Eventually, the remainder of CompCert should not assume anything about splitting 64-bit types in two halves.
Summary of changes:
- AST: introduce the type "rpair A" of register pairs
- Conventions1, Conventions: use it when describing calling conventions
- LTL, Linear, Mach, Asm: honor the new calling conventions when observing external calls
- Events: suppress external_call', no longer useful
- All passes from Allocation to Asmgen: adapt accordingly.
|
|\ \
| |/
|/| |
Driver refactoring
|
| |
| |
| |
| |
| |
| | |
Clightgen now also prints a version string. Also the CompCert version
string is now similar in both modes.
Bug 18768.
|
| |
| |
| |
| | |
Bug 18768.
|
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
The process handling is now in its own file, like the output name
generation etc.
Bug 18768
|
|
|
|
| |
restricted to 15bit signed immediate offsets
|
|
|
|
|
|
| |
GNU make under windows seems to have a restriction to 8192 characters
for commandline arguments. The dependency generation of compcert is
too large. Thus we split it into two steps.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Earlier versions of Menhir run into "string too long" errors in Coq when building on a 32-bit platform.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
memory blocks
Trees are slightly more efficient than Maps, and avoid maintaining the invariant on the default value.
lib/Maps: add a generic construction of a (partial) Tree module from an indexed type; use it to define ZTrees (trees indexed by Z integers).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
architectures
The original Stacking pass and its proof hard-wire assumptions about the processor and the register allocation, namely that integer registers are 32 bit wide and that all stack slots have natural alignment 4, which precludes having stack slots of type Tlong. Those assumptions become false if the target processor has 64-bit integer registers.
This commit makes minimal adjustments to the Stacking pass so as to lift these assumptions:
- Stack slots of type Tlong (or more generally of natural alignment 8) are supported. For slots produced by register allocation, the alignment is validated a posteriori in Lineartyping. For slots produced by the calling conventions, alignment is proved as part of the "loc_argument_acceptable" property in Conventions1.
- The code generated by Stacking to save and restore used callee-save registers no longer assumes 32-bit integer registers. Actually, it supports any combination of sizes for registers.
- To support the new save/restore code, Bounds was changed to record the set of all callee-save registers used, rather than just the max index of callee-save registers used.
On CompCert's current 32-bit target architectures, the new Stacking pass should generate pretty much the same code as the old one, modulo minor differences in the layout of the stack frame. (E.g. padding could be introduced at different places.)
The bulk of this big commit is related to the proof of the Stacking phase. The old proof strategy was painful and not obviously adaptable to the new Stacking phase, so I rewrote Stackingproof entirely, using an approach inspired by separation logic. The new library common/Separation.v defines assertions about memory states that can be composed using a separating conjunction, just like pre- and post-conditions in separation logic. Those assertions are used in Stackingproof to describe the contents of the stack frames during the execution of the generated Mach code, and relate them with the Linear location maps.
As a further simplification, the callee-save/caller-save distinction is now defined in Conventions1 by a function is_callee_save: mreg -> bool, instead of lists of registers of either kind as before. This eliminates many boring classification lemmas from Conventions1. LTL and Lineartyping were adapted accordingly.
Finally, this commit introduces a new library called Decidableplus to prove some propositions by reflection as Boolean computations. It is used to further simplify the proofs in Conventions1.
|
| |
|
|
|
|
|
|
| |
The new command line option -Werror activates the treatment of
warnings as errors.
Bug 18004
|
|
|
|
| |
For informative purposes, the FP value of Init_float* constants is printed as a comment in the generated asm file. However, for Init_float32, it was wrongly printed as a double-precision FP instead of a single-precision FP.
|
| |
|
|
|
|
|
|
|
| |
The iso646 header defines some macros that expand to common
operators. Both clang and gcc ship with them and they are required
by the standard.
Bug 18645.
|
|
|
|
| |
(§6.7.8), bug 18000
|
|
|
|
| |
(§6.7.8), bug 18000
|
| |
|
|
|
|
| |
strings, bug 18000
|
| |
|
| |
|
|\
| |
| | |
Added the _Noreturn keyword.
|
| |
| |
| |
| |
| |
| |
| |
| | |
CompCert now recognizes the C11 _Noreturn function specifier and
emits a simple warning for functions declared _Noreturn containing
a return statement. Also the stdnoreturn header and additionally
the stdalign header are added.
Bug 18541
|
|/ |
|
|\
| |
| | |
Fix a bug in the pre-parser.
|
|/ |
|
| |
|
|\ |
|
| |
| |
| |
| | |
The test was failing as a consequence of the split casm -> casm / casm_options.
|
|/
|
|
|
| |
Valex expects Fun Section Literals and not Fun Section Literal.
Bug 18394
|
|\
| |
| | |
This PR activates more OCaml warnings and turns all warnings into errors. Also some unused functions, variables and types are removed.
|
| |\ |
|
| | |
| | |
| | |
| | | |
This reverts commit 771d8576fbae8bd48f6bc80c74722ce1c7cc5259.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The default of the diab compiler is to interpret the alignment
as power of two.
Bug 18490.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The interface hides the implementation details, like the huge
number of Hashtbls from the rest of the implementatio.
Bug 18394
|
| | |
| | |
| | |
| | |
| | |
| | | |
Hide the reference used internally behind the interface and added
some functions to access the needed values.
Bug 18394
|
| | |
| | |
| | |
| | |
| | |
| | | |
The printer for atom constants should also use the printer
for singleton objects.
Bug 18394
|
| | |
| | |
| | |
| | |
| | |
| | | |
Removed unused code, factored out common functions and added an
interface file.
Bug 18394
|