[llvm-commits] [PATCH]Implement getHostCPUFeatures for ARM Linux platform

Hao Liu Hao.Liu at arm.com
Sun Dec 9 18:44:58 PST 2012


Hi,

 

Attached is a patch to define getHostCPUFeatures for ARM Linux platform in
Host.cpp. Currently the CPU features have default values. The
getHostCPUFeatures function do nothing and only return false.

 

The implementation is like getHostCPUName for ARM Linux platform in
Host.cpp:

1)       Read /proc/cpuinfo and get the 'Features' line.

2)       For each feature which has corresponding feature in LLVM, translate
the feature name in /proc/cpuinfo to LLVM feature key name in ARM.td .

3)       Add all features to StringMap and set value to true.

4)       If success, return true, otherwise return false.

 

 

Thanks,

-Hao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121210/e6e26d17/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ARMLinuxFeatures.patch
Type: application/octet-stream
Size: 2006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121210/e6e26d17/attachment.obj>


More information about the llvm-commits mailing list