aboutsummaryrefslogtreecommitdiffstats
path: root/ia32
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into cleanupBernhard Schommer2016-03-214-64/+37
|\
| * Merge pull request #93 from AbsInt/separate-compilationXavier Leroy2016-03-203-62/+32
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pull request implements "approach A" to separate compilation in CompCert from the paper Lightweight verification of separate compilation by Jeehoon Kang, Yoonseung Kim, Chung-Kil Hur, Derek Dreyer, Viktor Vafeiadis, POPL 2016, pages 178-190 In a nutshell, semantic preservation is still stated and proved in terms of a whole C program and a whole assembly program. However, the whole C program can be the result of syntactic linking of several C compilation units, each unit being separated compiled by CompCert to produce assembly unit, and these assembly units being linked together to produce the whole assembly program. This way, the statement of semantic preservation and its proof now take into account the fact that each compilation unit is compiled separately, knowing only a fragment of the whole program (i.e. the current compilation unit) rather than the whole program.
| | * Update the back-end proofs to the new linking framework.Xavier Leroy2016-03-062-61/+31
| | |
| | * Add support for EF_runtime externalsXavier Leroy2016-03-061-1/+1
| | | | | | | | | | | | Also: in Events, use Senv.equiv to state invariance wrt changes of global envs.
| * | Print floating-point numbers with more digits in debug outputsXavier Leroy2016-03-151-2/+2
| | | | | | | | | | | | | | | | | | As suggested in GPR#84, use '%.15F' to force the printing of more significant digits. (The '%F' format previously used prints only 6.) This is enough to represent the FP number exactly most of the time (but not always). Once OCaml 4.03 is out and CompCert switches to this version of OCaml, we'll be able to use hexadecimal floats for printing.
| * | GPR#84: add missing IA32 operators to PrintOpXavier Leroy2016-03-151-0/+3
| |/
* | Added interface for the Asmexpansion.Bernhard Schommer2016-03-161-2/+2
| | | | | | | | | | | | Hide the reference used internally behind the interface and added some functions to access the needed values. Bug 18394
* | Cleanup of AsmToJSON.Bernhard Schommer2016-03-161-0/+13
| | | | | | | | | | | | Removed unused code, factored out common functions and added an interface file. Bug 18394
* | Deactivate warning 27 and added back removed code.Bernhard Schommer2016-03-153-11/+12
| | | | | | | | | | | | The code was mostly there for documentation effort. So warning 27 is deactivated again. Bug 18349
* | Clean up of ia32 target dependend code.Bernhard Schommer2016-03-103-56/+17
|/ | | | | Removed some unused functions and opens. Bug 18394
* Add CLZ builtins for ARM and IA32Xavier Leroy2015-12-222-2/+33
| | | | | | | ARM: add __builtin_clzl, __builtin_clzll IA32: add __builtin_clzl, __builtin_clzll, __builtin_ctzl, __builtin_ctzll Add corresponding tests in tests/regression/
* The return type of __builtin_clz() et al is "int", as documented and for GCC ↵v2.6Xavier Leroy2015-12-211-2/+2
| | | | compatibility, and not "unsigned int", as previously implemented.
* Do not print cfi_sections for bsd.Bernhard Schommer2015-12-171-1/+1
| | | | | The binutils in bsd seem to support cfi directives but not the cfi_sections directive.
* Print cfi_sections only if cfi is supported.Bernhard Schommer2015-12-151-1/+1
| | | | | | On older version of the binutils the cfi directives are not always supported so we only print cfi_sections if the corresponding .ini setting is set to true.
* bug 17752, builtin_nop for ia32Michael Schmidt2015-12-142-0/+6
|
* Also replace extern_atom by camlstring_of_coqstring for ia32/TargetPrinter.ml.Bernhard Schommer2015-10-201-2/+2
| | | | Bug 17450
* Merge remote-tracking branch 'origin/master' into named-externalsBernhard Schommer2015-10-202-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arm/TargetPrinter.ml backend/CMparser.mly backend/SelectLongproof.v backend/Selectionproof.v cfrontend/C2C.ml checklink/Asm_printers.ml checklink/Check.ml checklink/Fuzz.ml common/AST.v debug/DebugInformation.ml debug/DebugInit.ml debug/DwarfPrinter.ml debug/DwarfTypes.mli debug/Dwarfgen.ml exportclight/ExportClight.ml ia32/TargetPrinter.ml powerpc/Asm.v powerpc/SelectOpproof.v powerpc/TargetPrinter.ml
| * Fixed typos in the arm and ia32 section printing.Bernhard Schommer2015-10-161-2/+2
| | | | | | | | Bug 17392
| * Implemented the usage of DW_AT_ranges for non-contiguous address ranges.Bernhard Schommer2015-10-161-1/+4
| | | | | | | | | | | | | | | | | | | | The gcc produces DW_AT_ranges for non-contiguous address ranges, like compilation units containing functions which are placed in different ELF-sections or lexical scopes that are split up. With this commit CompCert also uses this DWARF v3 feature for gnu backend based targets. In order to ensure backward compability a flag is added which avoids this and produces debug info in DWARF v2 format. Bug 17392.
| * First step to implemente address ranges for the gnu backend.Bernhard Schommer2015-10-151-6/+0
| | | | | | | | | | | | | | | | | | In contrast to the dcc, the gcc uses address ranges to express non-contiguous range of addresses. As a first step we set the start and end addresses for the different address ranges for the compilation unit by using the start and end addresses of functions. Bug 17392.
| * Use section type also for other targets.Bernhard Schommer2015-10-151-2/+2
| | | | | | | | Bug 17392.
| * bug 17392: remove trailing whitespace in source filesMichael Schmidt2015-10-1414-562/+562
| |
| * bug 17392: fix typo in OS nameMichael Schmidt2015-10-141-1/+1
| |
| * bug 17392: remove trailing whitespace in source filesMichael Schmidt2015-10-143-61/+61
| |
| * Implement the usage of the debug_str section for the gcc backend.Bernhard Schommer2015-10-131-2/+5
| | | | | | | | | | | | | | | | GCC prints all string larger than 3 characters in the debug_str section which reduces the size of the debug information since entries containing the same string now map to the same string in the debug_str sections. Bug 17392.
* | Updated PR by removing whitespaces. Bug 17450.Bernhard Schommer2015-10-2017-621/+621
| |
* | Use Coq strings instead of idents to name external and builtin functions.Xavier Leroy2015-10-113-18/+11
|/ | | | | | | | | | The AST.ident type represents source-level identifiers as unique positive numbers. However, the mapping identifiers <-> AST.ident differs between runs of CompCert on different source files. This is problematic when we need to produce or recognize external functions and builtin functions with fixed names, for example: * in $ARCH/Machregs.v to define the register conventions for builtin functions; * in the VST program logic from Princeton to treat thread primitives specially. So far, we used AST.ident_of_string to recover the ident associated with a string. However, this function is defined in OCaml and doesn't execute within Coq. This is a problem both for VST and for future executability of CompCert within Coq. This commit replaces "ident" by "string" in the arguments of EF_external, EF_builtin, EF_inline_asm, EF_annot, and EF_annot_val. This provides stable names for externals and builtins, as needed. For inline asm and annotations, it's a matter of taste, but using strings feels more natural. EF_debug keeps using idents, since some kinds of EF_debug annotations talk about program variables.
* Filled in missing functions for debug information on ia32.Bernhard Schommer2015-10-092-38/+63
| | | | | | Like for arm and ppc the functions for section names and start and end addresses of compilation units are defined and the print_annot function is moved to Asmexpandaux.ml.
* Filled in the rest of the funciton needed for thte debug info under arm.Bernhard Schommer2015-10-091-1/+4
| | | | | | The name_of_section function no returns the correct name for the debug sections, the prologue and epilogue directives are added and the labels for the live ranges are introduced in the Asmexpand pass.
* Fixed minor typos in the comments.Bernhard Schommer2015-10-041-1/+1
|
* Add the forgotten Fileinfo also to arm and ia32 TargetPrinter.mlBernhard Schommer2015-10-021-0/+1
|
* Cleanup of now no longer needed functions.Bernhard Schommer2015-10-011-10/+0
|
* Change the way the debug sections are printed.Bernhard Schommer2015-09-281-3/+5
| | | | | | If a user uses the #pragma use_section for functions the diab linker requires a separate debug_info section for each entry. This commit adds functionality to emulate this behavior.
* Added printing the reference address for the LocRef and started refactoring oldBernhard Schommer2015-09-271-8/+0
| | | | | | | | Debuging code. The old functions to store the symbol for the Global variables and retrive this is no longer needed since the atom is stored in DebugInformation. Also the Debug.Abbrev module is no longer needed.
* Added support for the locations of stack allocated local variables.Bernhard Schommer2015-09-251-0/+1
| | | | | This commit adds furher support for location information for local variables and starts with the implementation of the debug_loc section.
* Record the scope structure during unblocking.Bernhard Schommer2015-09-221-0/+2
| | | | | | Instead of creating separate annotations for the local variables we call the Debug.add_lvar_scope and we construct a mapping from function id + scope id to scope information.
* Revert "Startet implementation of new Debug interface."Bernhard Schommer2015-09-101-1/+0
| | | | This reverts commit 861292a6c5e58b4f78bef207c717b801b3fc1fed.
* Startet implementation of new Debug interface.Bernhard Schommer2015-09-061-0/+1
| | | | | | Added a new file debug/Debug.ml which will be the interface between for generating and printing the debuging information. Currently it contains only the code for the line directived.
* XBernhard Schommer2015-09-068-177/+178
|\ | | | | | | Merge branch 'master' into debug_locations
| * Improve error reporting in Asmexpand.Xavier Leroy2015-08-241-10/+38
| |
| * Track the locations of local variables using EF_debug annotations.Xavier Leroy2015-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SimplLocals: - record locations of stack-allocated variables with annotations (of kind 5) at the beginning of the function; - mark every assignment to non-stack-allocated variables with an annotation of kind 2. Debugvar: (new pass!) - perform availability analysis for debug annotations of kind 2 - insert "start of live range" and "end of live range" annotations (kind 3 and 4) to delimit intervals of PCs where the location of a local variable is known.
| * Renaming {BA,BR}_longofwords -> {BA,BR}_splitlong.Xavier Leroy2015-08-224-25/+18
| | | | | | | | | | | | | | | | Use EF_debug instead of EF_annot for line number annotations. Introduce PrintAsmaux.print_debug_info (very incomplete). powerpc/Asmexpand: revise expand_memcpy_small.
| * Adapt the PowerPC port to the new builtin representation.Xavier Leroy2015-08-211-2/+0
| | | | | | | | | | | | | | __builtin_get_spr() and __builtin_set_spr() work, but horrible error message if the SPR argument is not a constant. powerpc/AsmToJSON.ml needs updating.
| * Simplify the handling of extended inline asm, taking advantage of the new, ↵Xavier Leroy2015-08-211-3/+1
| | | | | | | | structured builtin arguments and results.
| * Merge branch 'master' into 'new-builtins'Xavier Leroy2015-08-213-164/+170
| |\
| * | Refactoring of builtins and annotations in the back-end.Xavier Leroy2015-08-218-161/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, the back-end languages had distinct instructions - Iannot for annotations, taking structured expressions (annot_arg) as arguments, and producing no results' - Ibuiltin for other builtins, using simple pseudoregs/locations/registers as arguments and results. This branch enriches Ibuiltin instructions so that they take structured expressions (builtin_arg and builtin_res) as arguments and results. This way, - Annotations fit the general pattern of builtin functions, so Iannot instructions are removed. - EF_vload_global and EF_vstore_global become useless, as the same optimization can be achieved by EF_vload/vstore taking a structured argument of the "address of global" kind. - Better code can be generated for builtin_memcpy between stack locations, or volatile accesses to stack locations. Finally, this commit also introduces a new kind of external function, EF_debug, which is like EF_annot but produces no observable events. It will be used later to transport debug info through the back-end, without preventing optimizations.
* | | Merge branch 'master' into debug_locationsBernhard Schommer2015-08-263-176/+173
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: debug/CtoDwarf.ml debug/DwarfPrinter.ml debug/DwarfTypes.mli
| * | Asmexpand for ARM: fixed bug in Pfreeframe.Xavier Leroy2015-08-211-2/+2
| | | | | | | | | | | | Plus: update comments and credit Bernhard Schommer.
| * | Consistent naming of "P" instructions and consistent ordering of argumentsXavier Leroy2015-08-213-174/+171
| | | | | | | | | | | | according to Intel convention (instr destination, argument).
* | | Added symbol functions for printing of the location for global variables.Bernhard Schommer2015-08-211-0/+6
|/ /