aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Added builtin for atomic compare and exchange.Bernhard Schommer2015-09-104-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new __builtin_atomic_compare_exchange(int *ptr,int *exp,int *dsr); writes dsr into ptr if ptr is equal to exp and returns true if ptr is not equal to exp it writes ptr into exp and returns false.
| * | | | | | Merge branch 'master' into atomic-builtinsBernhard Schommer2015-09-103-4/+41
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: powerpc/CBuiltins.ml
| * | | | | | | Add builtin for atomic load.Bernhard Schommer2015-09-092-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the new __builtin_atomic_load(int *a, int *b); which stores *a in *b. This differs from the atomic_load of the GCC, since the PPC ISA manual states that you must jump before the load again if it fails.
| * | | | | | | Added an builtin for the atomic exchange operation.Bernhard Schommer2015-09-095-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new builtin __builtin_atomic_exchange(int *a, int *b, int *c) stores *b in *a and sets *c to the old value of *a.
* | | | | | | | 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.
* | | 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
|\ \ \ | |_|/ |/| |
| * | Upgrade the ARM port to the new builtins.Xavier Leroy2015-08-249-211/+260
| | |
| * | Improve error reporting in Asmexpand.Xavier Leroy2015-08-243-31/+74
| | |
| * | Some "feel good" proofs about avail sets.Xavier Leroy2015-08-231-0/+171
| | |
| * | Track the locations of local variables using EF_debug annotations.Xavier Leroy2015-08-2312-45/+1030
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2227-125/+114
| | | | | | | | | | | | | | | | | | | | | | | | 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-2111-260/+285
| | | | | | | | | | | | | | | | | | | | | __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-213-14/+30
| | | | | | | | | | | | structured builtin arguments and results.
| * | Merge branch 'master' into 'new-builtins'Xavier Leroy2015-08-2112-185/+206
| |\ \
| * | | Refactoring of builtins and annotations in the back-end.Xavier Leroy2015-08-2164-2044/+2181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Improve printing of internal compiler errors.Xavier Leroy2015-08-251-2/+2
| | | |
* | | | Fixed the -T option.Bernhard Schommer2015-08-251-1/+1
| | | | | | | | | | | | | | | | The diab compiler expected -Wm<pathname> without whitespace.
* | | | Fixed abbreviation of DW_TAG_formal_parameter.Bernhard Schommer2015-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Dwarf debuging entries for formal parameters were printed as variables. This could lead to confusion in function pointer types and later with local variables.
* | | | Fixed error in handling of anonymous struct/union/enum types.Bernhard Schommer2015-08-241-8/+15
| | | | | | | | | | | | | | | | Composite types should be always handled by the composite_type_info table and not by the normal type table.
* | | | Also change the order of high and low pc in the compilation unit tag.Bernhard Schommer2015-08-241-1/+1
| | | |
* | | | Count number of input files and do not use number of source files for ↵Bernhard Schommer2015-08-241-12/+14
| | | | | | | | | | | | | | | | warning about no input.
* | | | Added error message when no input file is specified.Bernhard Schommer2015-08-231-0/+5
| | | |
* | | | Revert "Added support for the location of non static global variables."Bernhard Schommer2015-08-233-9/+2
| | | | | | | | | | | | | | | | This reverts commit b4846ffadfa3fbb73ffa7d9c43e5218adeece8da.
* | | | Do not add subsize tag to array types without size such as flexible array ↵Bernhard Schommer2015-08-231-10/+14
| | | | | | | | | | | | | | | | members.