aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Interoperability tests passed (no va_arg yet)Cyril SIX2018-11-2314-0/+355
|
* Fixed andd test not consistent with the restCyril SIX2018-11-231-1/+1
|
* Mise à jour vis à vis de CompCert 3.4Cyril SIX2018-11-211-2/+16
|
* Merge tag 'v3.4' into mppa_k1cCyril SIX2018-11-2117-65/+1166
|\ | | | | | | | | Conflicts: .gitignore
| * Attach _Alignas to names and refactor _Alignas checks (#133)Bernhard Schommer2018-09-102-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor common code of alignas. Instead of working on attributes the function now works directly on the type since the check always performed an extraction of attributes from a type. Bug 23393 * Attach _Alignas to the name. Bug 23393 * Attach "aligned" attributes to names So that __attribute((aligned(N))) remains consistent with _Alignas(N). gcc and clang apply "aligned" attributes to names, with a special case for typedefs: typedef __attribute((aligned(16))) int int_al_16; int_al_16 * p; __attribute((aligned(16))) int * q; For gcc, p is naturally-aligned pointer to 16-aligned int and q is 16-aligned pointer to naturally-aligned int. For CompCert with this commit, both p and q are 16-aligned pointers to naturally-aligned int. * Resurrect the alignment test involving typedef The test was removed because it involved an _Alignas in a typedef, which is no longer supported. However the same effect can be achieved with an "aligned" attribute, which is still supported in typedef.
| * Improve execution of regression testsXavier Leroy2018-08-244-16/+45
| | | | | | | | | | | | - Make it possible to skip tests on some platforms - Make it possible to expect a failure (typically: of the reference interpreter) - Stop on error
| * Harden the extasm.c test, continuedXavier Leroy2018-08-202-5/+5
| | | | | | | | | | Follow-up to b9a6a50. clang is not happy with COMPCERT_MODEL=32sse2 ("bad suffix on integer"), so use MODEL_32sse2 and ARCH_x86 instead.
| * Harden the extasm.c testXavier Leroy2018-08-202-2/+7
| | | | | | | | | | | | | | Pass more info from CompCert's configuration as #define on command line. Use this info to improve the "64 bit" detection in extasm.c. (Before it fails with powerpc-ppc64, which has 64-bit int regs but couldn't be detected with #ifdefs.)
| * Issue with packed structs and sizeof, alignof, offsetof in cparser/Xavier Leroy2018-08-173-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CompCert has two implementations of sizeof, alignof and offsetof (byte offset of a struct field): - the reference implementation, in Coq, from cfrontend/Ctypes.v - the implementation used during elaboration, in OCaml, from cparser/Cutil.ml The reference Coq implementation is used as much as possible, but sometimes during elaboration the size of a type must be computed (e.g. to compute array sizes), or the offset of a field (e.g. to evaluate __builtin_offsetof), in which case the OCaml implementation is used. This causes issues with packed structs. Currently, the cparser/Cutil.ml functions ignore the "packed" attribute on structs. Their results disagree with the "true" sizes, alignments and offsets computed by the cfrontend/Ctypes.v functions after source-to-source transformation of packed structs as done in cparser/PackedStruct.ml. For example: ``` struct __packed__(1) s { char c; short s; int i; }; assert (__builtin_offsetof(struct s, i) == 3); assert (sizeof(struct s) = sizeof(char[sizeof(struct s)])); ``` The two assertions fail. In the first assertion, __builtin_offsetof is elaborated to 4, because the packed attribute is ignored during elaboration. In the second assertion, the type `char[sizeof(struct s)]` is elaborated to `char[8]`, again because the packed attribute is ignored during elaboration, while the other `sizeof(struct s)` is computed as 7 after the source-to-source transformation of packed structs. This commit changes the cparser/Cutil.ml functions so that they take the packed attribute into account when computing sizeof, alignof, offsetof, and struct_layout. Related changes: * cparser/Cutil: add `packing_parameters` function to extract packing info from attributes * cparser/Cutil: refactor and share more code between sizeof_struct, offsetof, and struct_layout * cparser/Elab: check the alignment parameters given in packed attributes. (The check was previously done in cparser/PackedStruct.ml but now it would come too late.) * cparser/Elab: refactor the checking of alignment parameters between _Alignas, attribute((aligned)), __packed__, and attribute((packed)). * cparser/PackedStructs: simplify the code, some functionality was moved to cparser/Cutil, other to cparser/Elab * cfrontend/C2C: raise an "unsupported" error if a packed struct is defined and -fpacked-structs is not given. Before, the packed attribute would be silently ignored, but now doing so would cause inconsistencies between cfrontend/ and cparser/. * test/regression/packedstruct1.c: add tests to compare the sizes and the offsets produced by the elaborator with those obtained after elaboration.
| * Clean .foo.aux files created by coqcXavier Leroy2018-07-101-1/+1
| |
| * Remove the `_Alignas(expr)` construct (#125)Xavier Leroy2018-06-072-36/+32
| | | | | | | | The `_Alignas(expr)` construct is not C11, only `_Alignas(type)` is.
| * Don't depend on ../../clightgenXavier Leroy2018-06-021-3/+3
| | | | | | | | | | It's not really necessary, and under Windows it's really ../../clightgen.exe, which confuses make.
| * Add tests for clightgenXavier Leroy2018-06-015-0/+985
| | | | | | | | Also: add "parallel" entry to test/Makefile for parallel execution of tests.
| * Initialization of anonymous bit-fields in structsXavier Leroy2018-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For anonymous bit-fields in structs, carrier fields may be introduced which are not initialized since no default initializer are generated earlier. This cause the translation in C2C to throw an error since too few initializers are available. Example: struct s2 { int : 10; int a; int : 10; char b; int : 10; short c; int : 10; } s2 = { 42, 'a', 43 }; To work around this issue we need to generate a default inializer for every new member that does not have a translated member. Based on P#80, with more efficient algorithms. Bug 23362
| * Initialization of union bit fieldsXavier Leroy2018-04-252-0/+33
| | | | | | | | | | | | | | | | | | | | | | Bit fields in unions were initialized like normal fields, causing mismatch on the name of the field. Also: added function Bitfields.carrier_field and refactored. Patch by Bernhard Schommer. Bug 23362
* | Merge branch 'mppa_asmbloc_nobreg' into mppa_k1cCyril SIX2018-11-1484-353/+499
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mppa_k1c/Asm.v mppa_k1c/Asmexpand.ml mppa_k1c/TargetPrinter.ml test/mppa/Makefile test/mppa/builtins/clzll.c test/mppa/generate.sh
| * | Updated Sort Makefile + fixed compilation command bugCyril SIX2018-11-145-62/+123
| | |
| * | Changed mmult to avoid recomputing + fixed potential source of bug in instrCyril SIX2018-11-133-21/+39
| | |
| * | Lancement des tests à partir d'un même scriptCyril SIX2018-11-137-15/+61
| | |
| * | Revamped the instruction testsuite (all instructions work except umodd and ↵Cyril SIX2018-11-1361-110/+102
| | | | | | | | | | | | udivd)
| * | Fixed consistency between the different tests mmult, prng and sortCyril SIX2018-11-0916-181/+230
| | |
| * | Fixing PRNG testCyril SIX2018-11-091-4/+1
| | |
| * | Fixing k1-gcc becoming k1-mbr-gccCyril SIX2018-11-094-8/+8
| | |
* | | Added some comments on the MakefileCyril SIX2018-08-141-2/+22
| | |
* | | Added all the working builtins for ALU. Added BCU and LSU without testingCyril SIX2018-08-0111-11/+68
|/ /
* | Fixed CompCert library inclusion. Indirect fix for udivd and umoddCyril SIX2018-06-261-2/+1
| |
* | MPPA - Forgot to initialize variables in the testsCyril SIX2018-06-062-2/+3
| | | | | | | | Warning : the division and modulo currently do not pass the tests
* | WIP - Changed all the general tests to include PRNG (instead of small constants)Cyril SIX2018-06-0559-308/+394
| |
* | MPPA - Added Builtins support. Starting with clzll and stsudCyril SIX2018-06-052-0/+9
| |
* | MPPA - Added modulo and division 64 bits. Non certifiedCyril SIX2018-05-213-1/+17
| | | | | | | | | | | | | | 32 bits version are not yet there. Right now the code is directly from libgcc, compiled with k1-gcc because of builtins.
* | Code cleaningCyril SIX2018-05-091-4/+4
| |
* | MPPA - Updated asm_coverageCyril SIX2018-04-261-0/+0
| |
* | MPPA - mmult and sort Makefile now check on ccomp versionCyril SIX2018-04-263-5/+7
| |
* | MPPA - Added a lot more unit tests + refined coverageCyril SIX2018-04-2646-2/+240
| |
* | MPPA - we now compare the results of our tests with k1-gccCyril SIX2018-04-253-6/+10
| |
* | MPPA - Added coverage testCyril SIX2018-04-254-0/+57
| |
* | MPPA - Added test for division int by 2Cyril SIX2018-04-252-1/+23
| |
* | MPPA - Corrected messages on test/mppa/mmult/MakefileCyril SIX2018-04-251-2/+2
| |
* | MPPA - refined tests. Bug in mmult - need to generate O0 to debug easierCyril SIX2018-04-242-1/+7
| |
* | MPPA - Oshrximm + Mgetparam + FP is GPR10 + bugCyril SIX2018-04-201-17/+17
| | | | | | | | | | | | | | | | | | | | | | Added Oshrximm and Mgetparam -> mmult.c divide & conqueer generates FP is now GPR10 instead of being a mix of GPR30 and GPR32 Corrected a bug where Pgoto and Pj_l were given the same interpretation, where in fact there's a fundamental difference : Pgoto is supposed to have a function name (symbol), while Pj_l is supposed to have a label name (print_label). This led to having undefinite labels in the code.
* | MPPA - Added divide & conqueer test matmulCyril SIX2018-04-182-2/+87
| |
* | MPPA - added Oaddrsymbol -> now able to run the matrix mult testCyril SIX2018-04-183-37/+42
| |
* | MPPA - added a Matrix Multiply testCyril SIX2018-04-183-0/+140
| |
* | MPPA - Added Pmull -> now able to run the sort testCyril SIX2018-04-173-3/+8
| |
* | MPPA - More shiftsCyril SIX2018-04-171-1/+3
| |
* | MPPA - Forgot to uncomment debugging section of prng testCyril SIX2018-04-171-4/+2
| |
* | MPPA - added all shiftsCyril SIX2018-04-174-0/+12
| |
* | MPPA - Added CompCert testsCyril SIX2018-04-171-1/+16
| |
* | MPPA - added merge sort + corrected bug in insertion + testing them togetherCyril SIX2018-04-1710-38/+205
| |
* | MPPA - tests - added insertion sort and selection sortCyril SIX2018-04-175-0/+159
| |