aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Added support for the locations of stack allocated local variables.Bernhard Schommer2015-09-2516-98/+318
| | | | | This commit adds furher support for location information for local variables and starts with the implementation of the debug_loc section.
* Added placing labels for live ranges etc.Bernhard Schommer2015-09-245-9/+152
| | | | | In order to avoid the usage of too many labels we replace the debug statements during the Asmexpand phase.
* Also convert the fun stamp + scope id to debug id Hashtable in anBernhard Schommer2015-09-231-4/+6
| | | | atom + scope id Hashtable.
* Added support for printing local variables and fixed issue with .textBernhard Schommer2015-09-236-11/+27
| | | | | | Local variables are now added with bogus lexical scopes to reflect the actually lexical scopes. Also this commit fixes assembler problems of the das when a user section with the name ".text" is defined.
* Merge branch 'debugscopes' into debug_locationsBernhard Schommer2015-09-232-38/+40
|\ | | | | | | | | Conflicts: cparser/Unblock.ml
| * Continuing experiment: track the scopes of local variables via __builtin_debugXavier Leroy2015-09-212-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | As observed by B. Schommer, it is not enough to track scopes for every source line, as blocks can occur on a single line (think macros). Hence: - Revert debug annotations of kind 1 to contain only line number info. Generate them only when the line number changes. - Use debug annotations of kind 6 to record the list of active scopes (as BA_int integer arguments to __builtin_annot). Generate them before every nontrivial statement, even if on the same line as others. - Remove the generation of "variable x is declared in scope N" debug annotations. This can be tracked separately and more efficiently.
* | Record the scope structure during unblocking.Bernhard Schommer2015-09-2214-65/+173
| | | | | | | | | | | | 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.
* | Merge branch 'debugscopes' into debug_locationsBernhard Schommer2015-09-2127-177/+342
|\| | | | | | | | | | | Conflicts: debug/CtoDwarf.ml debug/DwarfPrinter.ml
| * Experiment: track the scopes of local variables via __builtin_debug.Xavier Leroy2015-09-205-74/+181
| | | | | | | | | | | | | | | | | | | | | | C2C: the code that insert debug builtins with the line numbers is now in Unblock. Handle calls to __builtin_debug. Unblock: generate __builtin_debug(1) for line numbers, carrying the list of active scopes as extra arguments. Generate __builtin_debug(6) for local variable declarations, carrying the corresponding scope number as extra argument. Constprop: avoid duplicating debug arguments that are constants already. PrintAsmaux: show this extra debug info as comments.
| * Ctypes.composite_of_def: make sure it computes within Coq.Xavier Leroy2015-09-181-3/+3
| | | | | | | | (Suggested by A. Appel.)
| * correct error message for __builtin_dcbtlsMichael Schmidt2015-09-181-1/+1
| |
| * Added support for bitfields in unions.Bernhard Schommer2015-09-171-6/+42
| | | | | | | | | | The transformation is the same as the one used for structs but packing always stops after each member.
| * Isuue #50: outdated comment on type RTL.function.Xavier Leroy2015-09-151-2/+1
| |
| * Issue with ignoring the result of non-void builtin functions.Xavier Leroy2015-09-156-15/+32
| | | | | | | | In RTL and beyond, the result of a builtin function that has return type different from "void" must be BR, never BR_none. Otherwise, we get compile-time fatal errors, either in Asmexpand or in Lineartyping.
| * Use standard headers instead of defining our own ptrdiff_t and uintptr_t.Xavier Leroy2015-09-141-2/+2
| |
| * Fix uninitialized array in do_bench (report by V. Laporte).Xavier Leroy2015-09-141-1/+1
| |
| * Name of stwcx. instruction should be printed Pstwcx_.Bernhard Schommer2015-09-101-1/+1
| |
| * Changed the first argument of builtin_isel to bool.Bernhard Schommer2015-09-101-1/+1
| |
| * Global register variables result in fatal error.Bernhard Schommer2015-09-081-1/+1
| | | | | | | | | | If they only report an error an assertion failure in Reame.ml was triggered.
| * Added builtin for isel.Bernhard Schommer2015-09-085-1/+13
| | | | | | | | | | The builtin_isel function takes a _Bool as first argument and returns either the second or the third depending on the value of the _Bool.
| * Added builtins for call frame and return address.Bernhard Schommer2015-09-076-9/+29
| | | | | | | | | | | | This builtins can be used to get the call frame address and the return address. To correctly compute the load address of the return address the allocframe is extended to contain the offset of the return address.
| * Added builtin for the cmpb instruction.Bernhard Schommer2015-09-075-0/+9
| |
| * Various changes in the debug printer.Bernhard Schommer2015-09-074-11/+11
| | | | | | | | | | | | The debug printer now uses udata for member sizes since structs can have a size larger than 255 bytes. Also functions that are inlined no longer have an high and low pc in their abbreviation entry.
| * Set structure declaration field to None.Bernhard Schommer2015-09-071-4/+4
| | | | | | | | | | In the case of a structure definition we do not need to set the structure declaration field set to false.
| * Simplified generation of builtins for cache instructions.Bernhard Schommer2015-09-072-60/+21
| | | | | | | | | | | | The cache instructions need no special constraint on the address argument. Therefore also the generation of the address is no longer needed.
* | New version of adding scopes etc.Bernhard Schommer2015-09-204-16/+63
| | | | | | | | | | Instead of reimplementing the whole scope handling in the debug information use the existing functionality and fill the scopes explicitly in the functions.
* | Started implementing the scope for the Debug Informations.Bernhard Schommer2015-09-186-13/+109
| | | | | | | | | | | | Scopes will be handled by a stack of all open scopes. This stack then can also be used to generate the debug directives to track the scopes through the rest of the passes.
* | First version with computation of dwarf info from debug info.Bernhard Schommer2015-09-1714-636/+370
| | | | | | | | | | Introduced a new dwarf generation from the information collected in the DebugInformation and removed the old CtODwarf translation.
* | Move more functionality in the new interface.Bernhard Schommer2015-09-1615-75/+120
| | | | | | | | | | | | Added functions to add more information to the debuging interface, like the struct layout with offsets, bitifiled layout and removed the no longer needed mapping from stamp to atom.
* | Add the debug interface file.Bernhard Schommer2015-09-165-12/+177
| | | | | | | | | | | | | | | | The new file Debug.ml contains the interface for generating and printing debug information. In order to generate debug information the init function initializes the necessary functions depending on the -g flag. If the -g is not there all functions are dummy functions which do nothing.
* | Further function to add debug information.Bernhard Schommer2015-09-151-31/+67
| | | | | | | | | | Added the rest of the global declarations and started adding functions to fill in the missing information about struct and union fields etc.
* | Started adding function information to the debug information.Bernhard Schommer2015-09-151-3/+48
| |
* | Implemented insert_type function and started implementing add declaration.Bernhard Schommer2015-09-141-13/+206
| | | | | | | | | | | | The insert_type function add types by adding their subtypes. Also currently the structs or unions are added as empty skeletopn and later during filled during the inserting of the declarations.
* | Started implementing the typ insert methods.Bernhard Schommer2015-09-112-50/+99
| | | | | | | | | | | | In contrast to CtoDwarf this time we use the name to identify everything. To make this work we print the full identifier with stamp to avoid the problems with anonymous structs and unions.
* | Started implementing the types needed for storing the debug information.Bernhard Schommer2015-09-112-1/+110
| |
* | Revert "Startet implementation of new Debug interface."Bernhard Schommer2015-09-108-95/+76
| | | | | | | | This reverts commit 861292a6c5e58b4f78bef207c717b801b3fc1fed.
* | Startet implementation of new Debug interface.Bernhard Schommer2015-09-068-76/+95
| | | | | | | | | | | | 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-0693-2601/+4136
|\| | | | | | | Merge branch 'master' into debug_locations
| * Fixed typo in AsmToJSON for instruction Pstfdu.Bernhard Schommer2015-09-041-1/+1
| |
| * Added json printing of Pbctr.Bernhard Schommer2015-09-031-1/+1
| |
| * Fixed minor typo in printing of the Plbzx instruction in AsmToJSON.Bernhard Schommer2015-09-031-1/+1
| |
| * Fixed minor typo in AsmToJSON.Bernhard Schommer2015-09-031-1/+1
| |
| * Added builtin for mbar instruction.Bernhard Schommer2015-09-036-0/+15
| | | | | | | | This commit adds a builtin function for the mbar instruction.
| * New builtin for dcbz instruction.Bernhard Schommer2015-09-035-24/+33
| | | | | | | | | | | | This commit adds a builtin for the dcbz instructions. Additionally the dcbt,dcbtst,dcbtls and icbtls instruction are changed to their actually form all taking one additional register in Asm.v.
| * Added builtin for the icbtls instruction.Bernhard Schommer2015-09-026-0/+19
| | | | | | | | This commit adds a builtin for the icbtls instruction.
| * Allow only CT values of 0 and 2 in dcbtls instruction.Bernhard Schommer2015-09-022-4/+4
| | | | | | | | | | The dcbtls instruction allows only the values 0 and 2 according to the PPC Isa.
| * Print p_int_constant instead of p_int in AsmToJSON.Bernhard Schommer2015-09-021-5/+5
| |
| * Added builtin for dcbtlsBernhard Schommer2015-09-026-13/+63
| | | | | | | | | | | | THis commit adds a builtin function for the dcbtls instruction. Additionaly it changes the printing of the dcbt and dcbtst instruction to embedded mode and adds support for different address variants.
| * Added the gcc builtin prefetch.Bernhard Schommer2015-09-016-0/+25
| | | | | | | | | | | | This commit implements the gcc __builtin_prefetch in a form with all arguments for the powerpc architecture. The resulting instructions are the dcbt and dcbtst instructions in Server Category.
| * Merge branch 'new-builtins'Bernhard Schommer2015-09-0193-2597/+4014
| |\