aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/Asmexpand.ml
Commit message (Collapse)AuthorAgeFilesLines
* Add new powerpc builtins.Michael Schmidt2018-04-271-0/+20
| | | | | | New builtin for 64-bit load/store with byte reversal and 64-bit mul-high. Bug 23541
* New support for inserting ais-annotations.Bernhard Schommer2017-10-191-4/+4
| | | | | | | | | | | | The ais annotations can be inserted via the new ais variants of the builtin annotation. They mainly differe in that they have an address format specifier '%addr' which will be replaced by the adress in the binary. The implementation simply prints a label for the builtin call alongside a the text of the annotation as comment and inserts the annotation together as acii string in a separate section 'ais_annotations' and replaces the usages of the address format specifiers by the address of the label of the builtin call.
* Extend builtin arguments with a pointer addition operator, continuedXavier Leroy2017-07-061-85/+148
| | | | | | | | - Add support for PowerPC, with all addressing modes. - Add support for ARM, with "reg + ofs" addressing mode. - Add support for RISC-V, with the one addressing mode. - Constprop.v: forgot to recurse in BA_addptr - volatile4 test: more tests
* bug 20956, print correct error message depending on architectureMichael Schmidt2017-05-031-2/+8
|
* Hybrid 64bit/32bit PowerPC portBernhard Schommer2017-05-031-15/+60
| | | | | | | | | | | | | This commit adds code generation for 64bit PowerPC architectures which execute 32bit applications. The main difference to the normal 32bit PowerPC port is that it uses the available 64bit instructions instead of using the runtime library functions. However pointers are still 32bit and the 32bit calling convention is used. In order to use this port the target architecture must be either in Server execution mode or if in Embedded execution mode the high order 32 bits of GPRs must be implemented in 32-bit mode. Furthermore the operating system must preserve the high order 32 bits of GPRs.
* bug 19318, add implementation of __builtin_ctz, __builtin_ctzl and ↵Michael Schmidt2016-07-081-0/+26
| | | | __builtin_ctzll for PowerPC
* fix '__builtin_annot_val' to '__builtin_annot_intval', such that CompCert ↵Michael Schmidt2016-06-071-1/+1
| | | | can parse its own .compcert.c output, bug 18060
* Merge branch 'master' into cleanupBernhard Schommer2016-03-211-1/+1
|\
| * 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.
* | Added interface for the Asmexpansion.Bernhard Schommer2016-03-161-4/+4
| | | | | | | | | | | | Hide the reference used internally behind the interface and added some functions to access the needed values. Bug 18394
* | Deactivate warning 27 and added back removed code.Bernhard Schommer2016-03-151-2/+2
| | | | | | | | | | | | The code was mostly there for documentation effort. So warning 27 is deactivated again. Bug 18349
* | Revert "Removed unused parameter from is_small/rel_data."Bernhard Schommer2016-03-151-4/+4
| | | | | | | | This reverts commit bac2a0854ea51217690bc6f225da62053ed7ac06.
* | Removed unused parameter from is_small/rel_data.Bernhard Schommer2016-03-111-4/+4
| | | | | | | | | | | | The ofs parameter is no longer used. Adopted the proofs and ml code using it. Bug 18394
* | Code cleanup.Bernhard Schommer2016-03-101-4/+2
|/ | | | | | Removed some unused variables, functions etc. and resolved some problems which occur if all warnings except 3,4,9 and 29 are active. Bug 18394.
* powerpc/Asmexpand: fix expansion of __builtin_clzllXavier Leroy2015-12-201-2/+2
| | | | The original code produces wrong results if res and al are the same register.
* bug 17752, fix semantics of builtin_set_spr64Michael Schmidt2015-12-161-1/+1
|
* bug 17752, check target architecture for 64bit-builtinsMichael Schmidt2015-12-151-7/+13
|
* bug 17752, rename builtin64_X to __builtin_X64Michael Schmidt2015-12-151-6/+6
|
* bug 17752, add builtin64_set_spr and builtin64_get_spr for PowerPCMichael Schmidt2015-12-151-2/+17
|
* bug 17752, add builtin_mr for PowerPCMichael Schmidt2015-12-141-2/+23
|
* bug 17752, add builtin_clzl and builtin_clzll for PowerPCMichael Schmidt2015-12-111-1/+12
|
* bug 17752, add builtin_nop for PowerPCMichael Schmidt2015-12-111-0/+0
|
* bug 17752, add builtin_nop for PowerPCMichael Schmidt2015-12-111-0/+3
|
* bug 17752, add builtin_uisel as unsigned version of builtin_iselMichael Schmidt2015-12-091-2/+2
|
* Added special treatment for large stack size for ppc.Bernhard Schommer2015-10-231-3/+3
| | | | | | Since the stacksize is casted to signed int in the alloc frame function large stacksize lead to assembler containing overflows. Bug 17473.
* Merge remote-tracking branch 'origin/master' into named-externalsBernhard Schommer2015-10-201-3/+52
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix minor typo introduced by refactoring of debug information.Bernhard Schommer2015-10-121-1/+1
| | | | | | | | | | The base register for the stack allocated variables should be r1 and not r2 under powerpc. Bug 17392
| * Merge branch 'master' into ppc64Xavier Leroy2015-10-111-17/+100
| |\ | | | | | | | | | Resolved conflicts in:configure powerpc/Asmexpand.ml
| * | Use PowerPC 64 bits instructions (when available) for int<->FP conversions.Xavier Leroy2015-09-131-2/+51
| | | | | | | | | | | | | | | | | | Also: implement __builtin_isel on non-EREF platforms with a branch-free instruction sequence. Also: extend ./configure so that it recognizes "ppc64-" and "e5500-" platforms in addition to "ppc-".
* | | Use Coq strings instead of idents to name external and builtin functions.Xavier Leroy2015-10-111-1/+1
| |/ |/| | | | | | | | | | | | | | | | | 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-091-23/+2
| | | | | | | | | | | | 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-9/+3
| | | | | | | | | | | | 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.
* | Added versions of the tranform_* functions in AST to work with functionsBernhard Schommer2015-10-081-22/+1
| | | | | | | | | | | | | | | | taking the ident as argument. This functions are currently not used inside the proven part but it is nice to have them already there, when they are used by some future pass. They also come equiped with the corresponding proofs.
* | Moved expandation of debug information to Asmexpandaux.Bernhard Schommer2015-10-081-66/+5
| | | | | | | | | | | | The function is generalized to work for all backends and takes as additional arguments functions for the printing of the simple instructions and the translation function for the arguments.
* | Removed the debug output for the debug information.Bernhard Schommer2015-10-011-2/+1
| |
* | Use also fucntion id for local variables since atom is not unique.Bernhard Schommer2015-10-011-3/+3
| |
* | Do not move the line directives.Bernhard Schommer2015-10-011-5/+9
| |
* | Merge pull request #56 from AbsInt/debug_locationsBernhard Schommer2015-09-301-6/+144
|\ \ | | | | | | Debug locations
| * | Fixed minor issue with parameters that get put on the stack, madeBernhard Schommer2015-09-301-2/+4
| | | | | | | | | | | | the code more robust and added indentation for convertCompositeDef
| * | Added location for the formal parameters and move the end of allBernhard Schommer2015-09-281-2/+8
| | | | | | | | | | | | scopes before the last statement.
| * | Added back again the emitting of the debuging annotations for debugingBernhard Schommer2015-09-271-3/+4
| | | | | | | | | | | | purpose.
| * | Added translation of the range lists to location entries.Bernhard Schommer2015-09-251-1/+1
| | |
| * | Added support for the locations of stack allocated local variables.Bernhard Schommer2015-09-251-40/+72
| | | | | | | | | | | | | | | 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-241-6/+103
| | | | | | | | | | | | | | | In order to avoid the usage of too many labels we replace the debug statements during the Asmexpand phase.
* | | Use R10 in atomic compare and exchange for the rlwinm.Bernhard Schommer2015-09-221-2/+2
| | |
* | | Fix typo dest -> dstMichael Schmidt2015-09-221-9/+9
| | |
* | | Merge pull request #54 from AbsInt/atomic-builtinsBernhard Schommer2015-09-211-5/+56
|\ \ \ | |/ / |/| | Atomic builtins
| * | Removed unnecessary move register and use the correct register as base value ↵Bernhard Schommer2015-09-211-3/+2
| | | | | | | | | | | | for the rlwinm.
| * | Applied a few simplification for temporary registers.Bernhard Schommer2015-09-211-13/+14
| | |
| * | Integrated the fix of commit de40fce9c16ced8d23389cbcfc55ef6d99466fe8 for ↵Bernhard Schommer2015-09-171-11/+3
| | | | | | | | | | | | the atomics.