summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/cpu_model.c
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add cpu detection for cannonlake.Craig Topper2017-11-191-0/+7
| | | | | | This uses the same encoding for cannonlake in the proposed gcc patches here. https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00551.html llvm-svn: 318610
* [X86] Add Knights Mill CPU to cpu_indicator support to match libgcc.Craig Topper2017-10-111-0/+5
| | | | llvm-svn: 315505
* [X86][builtins] Sync getX86CpuIDAndInfoEx with llvm's Host.cpp again.Craig Topper2017-07-191-29/+10
| | | | | | We now use __cpuidex intrinsics intead of inline asm on 32-bit Windows. We already used it on 64-bit. llvm-svn: 308420
* [compiler-rt][X86] Match the detection of cpu's for __cpu_model to the ↵Craig Topper2017-07-131-309/+109
| | | | | | | | | | | | | | | | | | | | | latest version of gcc Summary: We were missing many feature flags that newer gcc supports and we had our own set of feature flags that gcc didnt' support that were overlapping. Clang's implementation assumes gcc's features list so a mismatch here is problematic. I've also matched the cpu type/subtype lists with gcc and removed all the cpus that gcc doesn't support. I've also removed the fallback autodetection logic that was taken from Host.cpp. It was the main reason we had extra feature flags relative to gcc. I don't think gcc does this in libgcc. Once this support is in place we can consider implementing __builtin_cpu_is in clang. This could also be needed for function dispatching that Erich Keane is working on. Reviewers: echristo, asbirlea, RKSimon, erichkeane, zvi Reviewed By: asbirlea Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D35214 llvm-svn: 307878
* [X86] Sync a few more things from llvm's Host.cpp to cpu_model.Craig Topper2017-07-101-42/+32
| | | | | | This syncs the cpuid functions and adds breaks to the appropriate spots in the CPU decoding switches. Also a few formatting tweaks. llvm-svn: 307561
* [X86] Resync cpu_model.c with llvm's Host.cpp in preparation for making it ↵Craig Topper2017-07-101-34/+55
| | | | | | compatible with newer gcc. llvm-svn: 307558
* [builtins] Fix MSVC buildReid Kleckner2017-04-071-6/+13
| | | | | | | | | | Avoid __attribute__((constructor)) in cpu_model.c. Use more C99 _Complex emulation in divtc3.c. Joerg Sonnenberger added this builtin just after the last round of C99 _Complex emulation landed in r249514 (Oct 2015). llvm-svn: 299784
* [compiler-rt] Change all asm directives to __asm__ in cpu_model.Alina Sbirlea2016-07-171-36/+36
| | | | | | | | | | | | | | Summary: Aiming to resolve failure in sanitizer bot by changning all asm directives to __asm__. Also, consistency. Reviewers: llvm-commits, echristo, vitalybuka Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D22446 llvm-svn: 275740
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-141-0/+797
| | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX and built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Previously reverted, up for review again to iron out outstanding issues. Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D22181 llvm-svn: 275484
* Revert "Add runtime support for __cpu_model (__builtin_cpu_supports)"Alina Sbirlea2016-07-081-799/+0
| | | | | | This reverts commit r274873 until additional fixes are resolved. llvm-svn: 274944
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-081-0/+799
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified. Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Note: See additional comments on D20988 (committed as r271921). Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential revision: http://reviews.llvm.org/D21033 llvm-svn: 274873
* Revert r274865-r274870Alina Sbirlea2016-07-081-799/+0
| | | | llvm-svn: 274872
* Added comments identifing code sourceAlina Sbirlea2016-07-081-0/+4
| | | | llvm-svn: 274870
* Check cpuid supported for i386.Alina Sbirlea2016-07-081-1/+29
| | | | | | | | | | Summary: Reviewers: Subscribers: llvm-svn: 274868
* Add default initialization. Add unit test.Alina Sbirlea2016-07-081-1/+1
| | | | llvm-svn: 274867
* clang-format itAlina Sbirlea2016-07-081-40/+38
| | | | llvm-svn: 274866
* Add runtime support for __cpu_model (__builtin_cpu_supports)Alina Sbirlea2016-07-081-0/+769
Summary: This aims to add support for __cpu_model and address Bug 25510. It uses the code from lib/Support/Host.cpp for cpu detection, and creates __cpu_model with that info. Tested on OSX, it builts successfully, but the current version does *not* resolve Bug 25510. The __cpu_model symbol is present in the library but it only gets loaded with -all_load. This patch will not land until this issue is clarified. Built on Linux as well (though libgcc is the default). The use of "asm" required -std=gnu99, hence the cmake change. Corrections on better addressing this are welcome. Note: See additional comments on D20988 (committed as r271921). Reviewers: llvm-commits, joerg, echristo, mehdi_amini Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D21033 llvm-svn: 274865
OpenPOWER on IntegriCloud