aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/AsmToJSON.ml
Commit message (Collapse)AuthorAgeFilesLines
* Merge github.com:AbsInt/CompCert into kvx-workv3.8_kvx_instructions_fixedDavid Monniaux2020-12-081-3/+0
|\
| * Remove Pfcfi, Pfcfiu, Pfctiu pseudoinstructionsXavier Leroy2020-12-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove the Ofloatofint, Ofloatofintu, and Ointuoffloat PowerPC operations. The pseudoinstructions were used to implement these operations, as follows: Pfcfi : Ofloatofint i.e. the conversion signed int32 -> float64 Pfcfiu : Ofloatofintu i.e. the conversion unsigned int32 -> float64 Pfctiu : Ointuoffloat i.e. the conversion float64 -> unsigned int32 These pseudoinstructions were expanded (in Asmexpand.ml) in terms of Pfcfid : signed int64 -> float64 Pfctidz : float64 -> signed int64 and int32/int64 conversions. This commit performs this expansion during instruction selection (SelectOp.vp): floatofint(n) becomes floatoflong(longofint(n)) floatofintu(n) becomes floatoflong(longuofint(n)) intuoffloat(n) becomes cast32unsigned(longoffloat(n)) Then there is no need for the 3 removed operations and the 3 removed pseudoinstructions. More importantly, the correctness of these expansions is now proved as part of instruction selection, using the corresponding results from Floats.v.
* | missing cases preventing compilationDavid Monniaux2020-04-081-0/+1
|/
* Reworked json export.Bernhard Schommer2019-09-121-31/+32
| | | | | | | | | | | | | | The json export prints formatted json, which takes a lot of additional time, however the result is only consumed by other tools and not meant for human reading. This commit implements several small changes in order to speedup the json export: * Removal of usage of the Format Module * Replacing `fprintf` calls by calls to function that print directly, such as `output_string`, etc. * Replacing list of all instruction names by a set of all instructions
* Provide a float select operation for PowerPC. (#173)Bernhard Schommer2019-05-281-0/+1
| | | | | | The FP select for PowerPC stores both addresses in two subsequent stack slots and loads them using an offset created from the result of the comparison.
* Add new powerpc builtins.Michael Schmidt2018-04-271-2/+4
| | | | | | New builtin for 64-bit load/store with byte reversal and 64-bit mul-high. Bug 23541
* Print symbols as symbols.Bernhard Schommer2018-03-081-16/+19
| | | | | | This allows us to replacing them by their address in valex and additionally checking them. Bug 22438
* Use binary output.Bernhard Schommer2018-03-071-1/+1
| | | | | | This should avoid problems when newlines are used in string constants etc. Bug 23172
* Refactor the handling of errors and warnings (#44)Bernhard Schommer2018-02-081-1/+1
| | | | | | | | | | | | | | | | | * Module Cerrors is now called Diagnostic and can be used in parts of CompCert other than cparser/ * Replaced eprintf error. Instead of having eprintf msg; exit 2 use the functions from the Diagnostics module. * Raise on error before calling external tools. * Added diagnostics to clightgen. * Fix error handling of AsmToJson. * Cleanup error handling of Elab and C2C. *The implementation of location printing (file & line) is simplified and correctly prints valid filenames with invalid lines.
* Change AsmToJson to be similar to other printers.Bernhard Schommer2018-01-051-3/+11
|
* New json printing interface.Bernhard Schommer2017-11-141-143/+18
| | | | | The common json export functionallity is moved into an own File. Bug 22472
* New support for inserting ais-annotations.Bernhard Schommer2017-10-191-3/+8
| | | | | | | | | | | | 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.
* Make the list unique. Bug 22239Bernhard Schommer2017-09-261-177/+22
|
* Added dump-mnemonics option.Bernhard Schommer2017-09-251-0/+184
| | | | | | This option allows it to dump a list of all used mnemonics into a file. Bug 22239
* Disallow usage of default pattern for AsmToJSON.Bernhard Schommer2017-09-221-2/+11
| | | | | | | In order to ensure that no new instruction is added without adding it to the Json export we enforce warning 4 for the instruction printer and removed all default pattern matchings. Bug 22239
* Fixed typo.Bernhard Schommer2017-08-241-1/+1
|
* Added annot to json dump.Bernhard Schommer2017-07-241-3/+20
|
* Adopted section names in AsmToJson.Bernhard Schommer2017-06-291-10/+23
|
* Formatted json printing.Bernhard Schommer2017-06-281-314/+306
| | | | | | | | | Instead of just dumping the json output it is now a little bit formatted for better reading. Furthermore the AsmToJson function for the non powerpc targets now prints the json value "null" sucht that the resulting json file is valid json.
* Added pseudo instruction for inline asm.Bernhard Schommer2017-06-201-0/+15
| | | | | | The inline assembler instructions are numbered with consecutives id's per compilation unit. Bug 21689
* Print 64bit constants for rldimn and rldimi.Bernhard Schommer2017-05-051-2/+2
|
* More asserts.Bernhard Schommer2017-05-031-1/+1
|
* Hybrid 64bit/32bit PowerPC portBernhard Schommer2017-05-031-13/+61
| | | | | | | | | | | | | 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.
* Assert instead of unit.Bernhard Schommer2017-04-101-6/+6
| | | | | | Instructions expanded by Asmexpand should never end up in AsmToJSON. Bug 21345
* Filter out functions earlier. Bug 21343Bernhard Schommer2017-04-101-24/+27
|
* Fix name of function. Bug 21378Bernhard Schommer2017-04-071-1/+1
|
* Do not generate code for "inline definitions"Bernhard Schommer2017-04-071-21/+23
| | | | | | | | | ISO C99 states that "inline defintions", functions with inline specifier that are not extern, does not provide an external definition and another compilation unit can contain an external definition. Thus in the case of non-static inline functions no code should be generated. Bug 21343
* Added warning for inline asm in sdump. Bug 20593Bernhard Schommer2016-12-141-1/+6
|
* Reverted name for entry back to the old one.Bernhard Schommer2016-03-211-1/+1
| | | | | Valex expects Fun Section Literals and not Fun Section Literal. Bug 18394
* Change atom printer to use the common function.Bernhard Schommer2016-03-161-1/+1
| | | | | | The printer for atom constants should also use the printer for singleton objects. Bug 18394
* Cleanup of AsmToJSON.Bernhard Schommer2016-03-161-118/+83
| | | | | | 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-151-9/+9
| | | | | | The code was mostly there for documentation effort. So warning 27 is deactivated again. Bug 18349
* Code cleanup.Bernhard Schommer2016-03-101-17/+17
| | | | | | 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.
* Also print braces around the registers.Bernhard Schommer2016-02-041-2/+7
|
* Fixed missing \" in json printing for registers.Bernhard Schommer2016-02-041-2/+2
|
* Added printer for Configuration and finished Clflags.Bernhard Schommer2016-01-251-66/+70
|
* Started implementing a printer for Clflags.Bernhard Schommer2016-01-251-12/+5
|
* Bug 17752, add rldicr instruction for PowerPCMichael Schmidt2015-12-151-0/+1
|
* bug 17544, use json-printer function for mfcr instructionMichael Schmidt2015-11-091-3/+2
|
* Removed unused p_char_list function. Bug 17544.Bernhard Schommer2015-11-031-2/+0
|
* Changed the name of a few ppc instructions. Bug 17544Bernhard Schommer2015-11-031-3/+3
|
* Simplify the Json export.Bernhard Schommer2015-11-031-166/+183
| | | | | | Instead of having a function for each instruction we now use a generic function to print the arguments. Bug 17544.
* Few simple rewrite for the AsmToJSON printer.Bernhard Schommer2015-10-291-155/+147
| | | | | | In a first step all the print commands for the names are replaced by a more safe variant that avoids missing \". Bug 17328
* Another typo in AsmToJson.Bernhard Schommer2015-10-291-1/+1
| | | | Bug 17473
* Fixed some minor types in the asm printer.Bernhard Schommer2015-10-291-1/+1
| | | | Bug 17473
* Fixed typo in AsmToJson.Bernhard Schommer2015-10-261-1/+1
| | | | Bug 17473.
* Implemented the usage of DW_AT_ranges for non-contiguous address ranges.Bernhard Schommer2015-10-161-0/+1
| | | | | | | | | | 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.
* bug 17392: remove trailing whitespace in source filesMichael Schmidt2015-10-141-16/+16
|
* Implement the usage of the debug_str section for the gcc backend.Bernhard Schommer2015-10-131-1/+2
| | | | | | | | 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.
* Merge branch 'master' into ppc64Xavier Leroy2015-10-111-3/+5
|\ | | | | | | Resolved conflicts in:configure powerpc/Asmexpand.ml