aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/CBuiltins.ml
Commit message (Collapse)AuthorAgeFilesLines
* [BROKEN] Merge with v3.9 : something broken for __builtin_expect in ↵Cyril SIX2021-06-011-4/+5
| | | | cfrontend/C2C.ml
* Move declarations of __builtin_clz* and __builtin_ctz* to C2C.mlXavier Leroy2020-07-271-12/+0
| | | | These functions are now available on all targets.
* Remove the cparser/Builtins moduleXavier Leroy2019-07-171-2/+2
| | | | | | | | | Move its definitions to modules C (the type `builtins`) and Env (the operations that deal with the initial environment). Reasons for the refactoring: 1- The name "Builtins" will soon be reused for a Coq module 2- `Env.initial()` makes more sense than `Builtins.environment()`.
* Add builtin isel (conditional move) for int64, uint64 and _Bool (#140)Bernhard Schommer2018-09-181-0/+9
| | | | | New builtin isel variants to support conditional moves for 64bit integers and _Bool values. Bug 24516
* Add new powerpc builtins.Michael Schmidt2018-04-271-2/+12
| | | | | | New builtin for 64-bit load/store with byte reversal and 64-bit mul-high. Bug 23541
* Moved common buitlins to C2C gernic_builtins.Bernhard Schommer2017-09-261-8/+0
|
* bug 19318, add implementation of __builtin_ctz, __builtin_ctzl and ↵Michael Schmidt2016-07-081-0/+6
| | | | __builtin_ctzll for PowerPC
* The return type of __builtin_clz() et al is "int", as documented and for GCC ↵v2.6Xavier Leroy2015-12-211-3/+3
| | | | compatibility, and not "unsigned int", as previously implemented.
* bug 17752, rename builtin64_X to __builtin_X64Michael Schmidt2015-12-151-2/+2
|
* bug 17752, add builtin64_set_spr and builtin64_get_spr for PowerPCMichael Schmidt2015-12-151-0/+5
|
* bug 17752, add builtin_mr for PowerPCMichael Schmidt2015-12-141-1/+1
|
* bug 17752, add builtin_mr for PowerPCMichael Schmidt2015-12-141-1/+4
|
* bug 17752, add builtin_clzl and builtin_clzll for PowerPCMichael Schmidt2015-12-111-0/+4
|
* 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-0/+3
|
* Updated PR by removing whitespaces. Bug 17450.Bernhard Schommer2015-10-201-6/+6
|
* Use fix registers for atomic builtins.Bernhard Schommer2015-09-141-1/+2
| | | | | | In order to avoid clashes during register allocation etc. The builtins now use fixed registers and mark additional registers as destroyed for temporaries.
* Added builtin for atomic compare and exchange.Bernhard Schommer2015-09-101-1/+4
| | | | | | 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-101-2/+1
|\ | | | | | | | | Conflicts: powerpc/CBuiltins.ml
| * Changed the first argument of builtin_isel to bool.Bernhard Schommer2015-09-101-1/+1
| |
* | Add builtin for atomic load.Bernhard Schommer2015-09-091-1/+4
| | | | | | | | | | | | 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-091-1/+4
|/ | | | | 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.
* Added builtin for isel.Bernhard Schommer2015-09-081-1/+4
| | | | | 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-071-1/+6
| | | | | | 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-071-0/+2
|
* Added builtin for mbar instruction.Bernhard Schommer2015-09-031-0/+2
| | | | This commit adds a builtin function for the mbar instruction.
* New builtin for dcbz instruction.Bernhard Schommer2015-09-031-0/+2
| | | | | | 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-021-0/+2
| | | | This commit adds a builtin for the icbtls instruction.
* Added builtin for dcbtlsBernhard Schommer2015-09-021-0/+2
| | | | | | 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-011-0/+2
| | | | | | 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.
* Adapt the PowerPC port to the new builtin representation.Xavier Leroy2015-08-211-1/+6
| | | | | | | __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.
* Added builtin for the dcbf instructionBernhard Schommer2015-08-171-0/+2
|
* Added builtin for the dcbi instruction.Bernhard Schommer2015-08-171-0/+2
|
* Added builitin for the icbi instruction.Bernhard Schommer2015-08-141-1/+4
|
* Added builtin for the lwsync barrier.Bernhard Schommer2015-08-141-0/+2
|
* Experiment: support a subset of GCC's extended asm statements.Xavier Leroy2015-04-171-0/+4
|
* Cold feet: suppress builtins for load with reservation/store conditional, ↵xleroy2014-08-281-5/+1
| | | | | | use case is unclear. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2622 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Rename __builtin_cntlz to __builtin_clz.xleroy2014-08-271-1/+1
| | | | | | | IA32: add __builtin_clz, __builtin_ctz. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2619 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Add builtins for load with reservation and conditional store.xleroy2014-08-201-1/+5
| | | | git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2613 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Fine hair splitting depending on whether va_list is a scalar type (IA32, ↵xleroy2014-01-011-0/+1
| | | | | | ARM) or an array type (PowerPC). git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2395 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Experimental support for <stdarg.h>, the GCC way. Works on IA32. To be ↵xleroy2014-01-011-1/+6
| | | | | | tested on PowerPC and ARM. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2394 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Add __builtin_bswap16 and __builtin_bswap32 to all ports.xleroy2013-04-201-0/+4
| | | | | | | | | Remove __builtin_{read,write}_reversed from IA32 and ARM ports. Machregs: tighten destroyed_by_builtin Packedstructs: use bswap if read/write-reversed not available. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2208 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Add __builtin_fcti (double -> int conversion w/ round to nearest)xleroy2012-11-241-0/+4
| | | | git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2071 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* checklink: first import of Valentin Robert's validator for asm and linkxleroy2012-03-281-1/+0
| | | | | | | cparser: renamed Errors to Cerrors; removed packing into Cparser. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1856 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* PowerPC: remove the fmadd and fmsub operators/Asm instructionsxleroy2012-03-071-0/+8
| | | | | | | | (definitely not semantics-preserving; hard to justify). CPragmas: make sure SDAs are not recognized on MacOSX. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1836 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Revised emulation of packed structsxleroy2011-10-161-4/+4
| | | | git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1729 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* More builtins for ARM and PowerPCxleroy2011-08-051-1/+3
| | | | git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1697 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* cparser: support for attributes over struct and union.xleroy2011-05-121-2/+2
| | | | | | | | cparser: added experimental emulation of packed structs (PackedStruct.ml) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1650 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
* Add "fabs" (floating-point absolute value) as a unary operator inxleroy2010-05-021-2/+0
| | | | | | | Clight and C#minor. Recognize __builtin_fabs and turn it into this operator. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1329 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e