Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merging r344824: | Tom Stellard | 2018-10-22 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r344824 | ctopper | 2018-10-19 18:30:00 -0700 (Fri, 19 Oct 2018) | 14 lines [X86] When checking the bits in cpu_features for function multiversioning dispatcher in the resolver, make sure all the required bits are set. Not just one of them Summary: The multiversioning code repurposed the code from __builtin_cpu_supports for checking if a single feature is enabled. That code essentially performed (_cpu_features & (1 << C)) != 0. But with the multiversioning path, the mask is no longer guaranteed to be a power of 2. So we return true anytime any one of the bits in the mask is set not just all of the bits. The correct check is (_cpu_features & mask) == mask Reviewers: erichkeane, echristo Reviewed By: echristo Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53460 ------------------------------------------------------------------------ llvm-svn: 344923 | ||||
* | [X86] Add support for __builtin_cpu_init | Craig Topper | 2017-08-28 | 1 | -0/+4 |
| | | | | | | | | | | This adds builtin_cpu_init which will emit a call to cpu_indicator_init in libgcc or compiler-rt. This is needed to support builtin_cpu_supports/builtin_cpu_is in an ifunc resolver. Differential Revision: https://reviews.llvm.org/D36336 llvm-svn: 311874 | ||||
* | Fix CHECK directives that weren't checking. | Hans Wennborg | 2015-08-31 | 1 | -1/+1 |
| | | | | llvm-svn: 246492 | ||||
* | Add support for the x86 builtin __builtin_cpu_supports. | Eric Christopher | 2015-06-29 | 1 | -0/+16 |
This matches the implementation of the gcc support for the same feature, including checking the values set up by libgcc at runtime. The structure looks like this: unsigned int __cpu_vendor; unsigned int __cpu_type; unsigned int __cpu_subtype; unsigned int __cpu_features[1]; with a set of enums to match various fields that are field out after parsing the output of the cpuid instruction. This also adds a set of errors checking for valid input (and cpu). compiler-rt support for this and the other builtins in this family (__builtin_cpu_init and __builtin_cpu_is) are forthcoming. llvm-svn: 240994 |