[PATCH] D21033: Add runtime support for __cpu_model (__builtin_cpu_supports)
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 12:10:00 PDT 2016
asbirlea created this revision.
asbirlea added reviewers: llvm-commits, joerg, echristo, mehdi_amini.
Herald added a subscriber: mehdi_amini.
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).
http://reviews.llvm.org/D21033
Files:
lib/builtins/CMakeLists.txt
lib/builtins/cpu_model.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21033.59758.patch
Type: text/x-patch
Size: 25309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160606/d7d2776b/attachment.bin>
More information about the llvm-commits
mailing list