summaryrefslogtreecommitdiffstats
path: root/clang/test/Headers
Commit message (Collapse)AuthorAgeFilesLines
* Make ms-intrin.cpp test require the x86 target.Nico Weber2015-09-231-0/+2
| | | | llvm-svn: 248355
* Add bug number to FIXME comment.Nico Weber2015-09-221-1/+1
| | | | llvm-svn: 248235
* ms Intrin.h: Fix __movsw's and __stosw's inline asm.Nico Weber2015-09-221-2/+34
| | | | | | | | | | | Before, clang's internal assembler would reject the inline asm in clang's Intrin.h. To make sure this doesn't happen for other Intrin.h functions using __asm__ blocks, add 32-bit and 64-bit codegen tests for Intrin.h. Sadly, these tests discovered that __readcr3 and __writecr3 have bad implementations in 64-bit builds. This will have to be fixed in a follow-up. llvm-svn: 248234
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-1/+1
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-1/+1
| | | | | | failures. llvm-svn: 241642
* Update testcases that use precompiled headers to require a target afterAdrian Prantl2015-07-071-1/+1
| | | | | | r241620. llvm-svn: 241623
* Move xtest to its own file to match the gcc header organization.Eric Christopher2015-06-171-0/+4
| | | | llvm-svn: 239926
* Fix clang/test/Headers/x86intrin-2.c. _readfsbase_u32() is provided in not ↵NAKAMURA Takumi2015-06-171-0/+2
| | | | | | i686 but x86-64. llvm-svn: 239896
* Update the intel intrinsic headers to use the target attribute support.Eric Christopher2015-06-173-120/+144
| | | | | | | | | | | | | | | | | | | This involved removing the conditional inclusion and replacing them with target attributes matching the original conditional inclusion and checks. The testcase update removes the macro checks for each file and replaces them with usage of the __target__ attribute, e.g.: int __attribute__((__target__(("sse3")))) foo(int a) { _mm_mwait(0, 0); return 4; } This usage does require the enclosing function have the requisite __target__ attribute for inlining and code generation - also for any macro intrinsic uses in the enclosing function. There's no change for existing uses of the intrinsic headers. llvm-svn: 239883
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-161-1/+1
| | | | llvm-svn: 239791
* [PowerPC] This revision adds 68 of the missing "Predefined Functions for ↵Bill Seurer2015-06-041-2/+2
| | | | | | | | | | | | Vector Programming" from appendix A of the OpenPOWER ABI for Linux Supplement document. I also added tests for the new functions and updated another test that was looking for specific line numbers in error messages from altivec.h. https://llvm.org/bugs/show_bug.cgi?id=23679 http://reviews.llvm.org/D10131 llvm-svn: 239066
* This patch adds support for the vector quadword add/sub instructions introducedKit Barton2015-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | in POWER8. These are the Clang-related changes for http://reviews.llvm.org/D9081 vadduqm vaddeuqm vaddcuq vaddecuq vsubuqm vsubeuqm vsubcuq vsubecuq All builtins are added in altivec.h, and guarded with the POWER8_VECTOR and powerpc64 macros. http://reviews.llvm.org/D9903 llvm-svn: 238145
* [PPC64] Add vector pack/unpack support from ISA 2.07Bill Schmidt2015-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following new instructions in the Power ISA 2.07: vpksdss vpksdus vpkudus vpkudum vupkhsw vupklsw These instructions are available through the vec_packs, vec_packsu, vec_unpackh, and vec_unpackl built-in interfaces. These are lane-sensitive instructions, so the built-ins have different implementations for big- and little-endian, and the instructions must be marked as killing the vector swap optimization for now. The first three instructions perform saturating pack operations. The fourth performs a modulo pack operation, which means it can be represented with a vector shuffle, and conversely the appropriate vector shuffles may cause this instruction to be generated. The other instructions are only generated via built-in support for now. I noticed during patch preparation that the macro __VSX__ was not previously predefined when the power8-vector or direct-move features are requested. This is an error, and I've corrected that here as well. Appropriate tests have been added. There is a companion patch to llvm for the rest of this support. llvm-svn: 237500
* [modules] Fix a #include cycle when building a module for our builtin headers.Richard Smith2015-05-142-0/+14
| | | | | | | | | | xmmintrin.h includes emmintrin.h and vice versa if SSE2 is enabled. We break this cycle for a modules build, and instead make the xmmintrin.h module re-export the immintrin.h module. Also included is a fix for an assert in the serialization code if a module exports another module that was declared later in the same module map. llvm-svn: 237321
* Make this test not rely on a backend being registered.Eric Christopher2015-04-031-9/+5
| | | | llvm-svn: 233993
* Add builtins for the 64-bit vector integer arithmetic instructions added in ↵Kit Barton2015-03-111-2/+2
| | | | | | | | | | POWER8. These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959. Phabricator review: http://reviews.llvm.org/D8041 llvm-svn: 231931
* Restore the libc++ definition of max_align_t on Apple platformsDmitri Gribenko2015-02-243-0/+249
| | | | | | | | | | | | | Clang has introduced ::max_align_t in stddef.h in r201729, but libc++ was already defining std::max_align_t on Darwin because there was none in the global namespace. After that Clang commit though, libc++ started defining std::max_align_t to be a typedef for ::max_align_t, which has a different definition. This changed the ABI. This commit restores the previous definition. rdar://19919394 rdar://18557982 llvm-svn: 230292
* Add more feature flags to the x86 instrinsic test.Craig Topper2014-12-271-0/+27
| | | | llvm-svn: 224878
* [PowerPC] Add VSX builtins for vec_divBill Schmidt2014-11-141-2/+2
| | | | | | | | | | | | This patch adds builtin support for xvdivdp and xvdivsp, along with a new test case. The builtins are accessed using vec_div in altivec.h. Builtins are listed (mostly) alphabetically there, so inserting these changed the line numbers for deprecation warnings tested in test/Headers/altivec-intrin.c. There is a companion patch for LLVM. llvm-svn: 221984
* Remove definitions from Intrin.h that already exist in one of the other x86 ↵Craig Topper2014-11-031-0/+5
| | | | | | intrinsic headers. Add a run line with Broadwell as the cpu type to ms-intrin.cpp test to catch some of these in the future. llvm-svn: 221127
* Update for llvm api change.Rafael Espindola2014-10-151-0/+1
| | | | llvm-svn: 219797
* [AVX512] Added VPCMPEQ intrinisics to headers.Robert Khasanov2014-10-081-0/+6
| | | | | | | | Added tests. Patch by Maxim Blumenthal <maxim.blumenthal@intel.com> llvm-svn: 219319
* [PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endianBill Schmidt2014-10-061-0/+18
| | | | | | | | | | | | | | | | | | | | | The use of the vec_lvsl and vec_lvsr interfaces are discouraged for little endian targets since Power8 hardware is a minimum requirement, and Power8 provides reasonable performance for unaligned vector loads and stores. Up till now we have not provided "correct" (i.e., big- endian-compatible) code generation for these interfaces, as to do so produces poorly performing code. However, this has become the source of too many questions. With this patch, LLVM will now produce compatible code for these interfaces, but will also produce a deprecation warning message for PPC64LE when one of them is used. This should make the porting direction clearer to programmers. A similar patch has recently been committed to GCC. This patch includes a test for the warning message. There is a companion patch that adds two unit tests to projects/test-suite. llvm-svn: 219137
* Fix interaction of max_align_t and modules.Richard Smith2014-10-031-1/+1
| | | | | | | | | When building with modules enabled, we were defining max_align_t as a typedef for a different anonymous struct type each time it was included, resulting in an error if <stddef.h> is not covered by a module map and is included more than once in the same modules-enabled compilation of C11 or C++11 code. llvm-svn: 218931
* Fix bugs in cpuid.h.Akira Hatanaka2014-09-201-0/+18
| | | | | | | | | | | | | | | This commit makes two changes: - Remove the push and pop instructions that were saving and restoring %ebx before and after cpuid in 32-bit pic mode. We were doing this to ensure we don't lose the GOT address in pic register %ebx, but this isn't necessary because the GOT address is kept in a virtual register. - In 64-bit mode, preserve base register %rbx around cpuid. This fixes PR20311 and rdar://problem/17686779. llvm-svn: 218173
* Add a module cache path to test/Headers/cxx11Ben Langmuir2014-08-121-1/+2
| | | | | | Don't depend on the serialization format remaining the same. llvm-svn: 215454
* AVX-512: Added intrinsics to clang.Elena Demikhovsky2014-07-221-0/+6
| | | | | | | The set is small, that what I have right now. Everybody is welcome to add more. llvm-svn: 213641
* Driver: bifurcate extended and basic MSC versioningSaleem Abdulrasool2014-07-163-6/+6
| | | | | | | | | | | | | | | | | | | | | | | This restores the original behaviour of -fmsc-version. The older option remains as a mechanism for specifying the basic version information. A secondary option, -fms-compatibility-version permits the user to specify an extended version to the driver. The new version takes the value as a dot-separated value rather than the major * 100 + minor format that -fmsc-version format. This makes it easier to specify the value as well as a more flexible manner for specifying the value. Specifying both values is considered an error. The older parameter is left solely as a driver option, which is normalised into the newer parameter. This allows us to retain a single code path in the compiler itself whilst preserving the semantics of the old parameter as well as avoid having to determine which of two formats are being used by the invocation. The test changes are due to the fact that the compiler no longer supports the old option, and is a direct conversion to the new option. llvm-svn: 213119
* Headers: add hint intrinsics to arm_acle.hSaleem Abdulrasool2014-07-121-4/+6
| | | | | | | | This adds the ARM ACLE hint intrinsic wrappers to arm_acle.h. These need to be protected with a !defined(_MSC_VER) since MSVC (and thus clang in compatibility mode) provide these wrappers as proper builtin intrinsics. llvm-svn: 212891
* test: merge arm-intrin into ms-intrin, fix invocationSaleem Abdulrasool2014-07-082-6/+5
| | | | | | | | This merges the two tests into one since there is no real reason to separate them. It also fixes the test invocation to specify -fms-compatibility without which we would end up without an Intrin.h header. llvm-svn: 212563
* Headers: conditionalise more declarationsSaleem Abdulrasool2014-07-081-0/+6
| | | | | | | | Protect MMX specific declarations under a __MMX__ guard. This header can be included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA. Use the preprocessor to prevent these declarations from being processed. llvm-svn: 212512
* Introduce arm_acle.h supporting existing LLVM builtin intrinsicsYi Kong2014-06-271-0/+7
| | | | | | | | | | | | | | Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64. Reviewers: t.p.northover, compnerd, rengolin Reviewed By: compnerd, rengolin Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits Differential Revision: http://reviews.llvm.org/D4296 llvm-svn: 211962
* Recommit r209532 with -ffreestanding.Akira Hatanaka2014-05-231-0/+13
| | | | | | This is a test case for r209489. llvm-svn: 209559
* Remove test while I investigate why the test is breaking the bots.Akira Hatanaka2014-05-231-14/+0
| | | | llvm-svn: 209558
* XFAIL test which is breaking some of the build bots.Akira Hatanaka2014-05-231-0/+1
| | | | llvm-svn: 209556
* Test case for r209489.Akira Hatanaka2014-05-231-0/+13
| | | | llvm-svn: 209532
* Split out header integration testsAlp Toker2014-05-043-42/+0
| | | | | | | | | | | | These are somewhat arbitrary tests that check if "thing goes fine" when processing various platform-specific headers. Also move warn-sysheader.cpp to Misc where the other diagnostics infrastructure tests live. File moves only. llvm-svn: 207936
* Add a triple to new test.Nico Weber2014-04-301-1/+1
| | | | | | NULL is just 0 on Windows, so the Wsentinel part of the test doesn't pass there. llvm-svn: 207607
* Let stddef.h respect __need_{wchar_t, size_t, NULL, ptrdiff_t, wint_t}.Nico Weber2014-04-301-0/+69
| | | | | | | | | | | | | | | | glibc expects that stddef.h only defines a single thing if either of these defines is set. For example, before this change, a C file containing #include <stdlib.h> int ptrdiff_t = 0; would compile with gcc but not with clang. Now it compiles with clang too. This also fixes PR12997, where older versions of the Linux headers would define NULL incorrectly, and glibc would define __need_NULL and expect stddef.h to redefine NULL with the correct definition. llvm-svn: 207606
* Revert r207482; I fail at reading IRC.Nico Weber2014-04-291-20/+0
| | | | llvm-svn: 207483
* Let stddef.h redefine NULL if __need_NULL is set, as needed by glibc, PR12997.Nico Weber2014-04-291-0/+20
| | | | | | | | | See the bug and the cfe-commits thread "[patch] Let stddef.h redefine NULL if __need_NULL is set" for discussion. Fixes PR12997 and is similar to the __need_wint_t bits already in this file. llvm-svn: 207482
* Move ObjC Cocoa.h header test to HeadersAlp Toker2014-04-191-0/+5
| | | | | | | This tests for broad compatibility with platform SDK headers using the clang driver and so belongs alongside the other header ingtegration tests. llvm-svn: 206687
* Re-enable the C++11 modules integration test on OS XAlp Toker2014-04-191-2/+2
| | | | | | | | | | XCode 5.1.1 has shipped with fixed SDK headers. This reverts commit r200256. Fixes PR18322. llvm-svn: 206686
* MS intrinsics: don't declare __readeflags and __writeeflags in Intrin.hHans Wennborg2014-03-121-0/+5
| | | | | | | | They're already defined in ia32intrin.h, and this would cause including Intrin.h in 64-bit mode to fail because of conflicting types. Update ms-intrin.cpp to also run in 64-bit mode to catch things like this. llvm-svn: 203714
* Add -fmodules-cache-path to test/Headers/c11.cBen Langmuir2014-03-101-1/+2
| | | | | | | | This started failing for me the last time someone modified the AST file format. It would be nice if we could just have lit take care of the module cache used during testing for us, but this helps in the meantime. llvm-svn: 203511
* Update for llvm change.Rafael Espindola2014-03-051-2/+5
| | | | llvm-svn: 203000
* Headers: Provide an ABI compatible max_align_t when _MSC_VER is definedDavid Majnemer2014-03-041-0/+5
| | | | | | | | | | | | | | | | Summary: Our usual definition of max_align_t wouldn't match up with MSVC if it was used in a template argument. Reviewers: chandlerc, rsmith, rnk Reviewed By: chandlerc CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2924 llvm-svn: 202911
* Revert r201734 and r201742.Daniel Jasper2014-02-201-16/+0
| | | | | | | | | | | | | | | | | | | | | This breaks backwards compatibility with existing code. Previously, this was defined as #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel))) Which basically accepts any pointer. Changing this to char* simply breaks a lot of existing code. I have tried changing char* to "const void*", which seems to be the right thing as per Intel specification this should work on basically any pointer. However, apparently this breaks windows compatibility (because of a conflicting declaration in windows.h). So, we probably need to #ifdef this based on whether clang is compiling for windows. According to Chandler, this might be done by introducing an additional symbol to a fake type in BuiltinsX86.def and then condition the type expansion on the platform. llvm-svn: 201775
* Revert r201772 as it breaks things on WindowsTimur Iskhodzhanov2014-02-201-1/+1
| | | | | | We should probably use different argument types on different platforms? llvm-svn: 201774
* Change parameter type of _mm_prefetch to "const void *".Daniel Jasper2014-02-201-1/+1
| | | | | | | Otherwise, this is not backwards compatible to the existing macro and can break existing code. llvm-svn: 201772
OpenPOWER on IntegriCloud