diff options
author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2014-06-30 18:23:58 +0000 |
---|---|---|
committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2014-06-30 18:23:58 +0000 |
commit | eb606a3c279cc2dba8cdd1084405652013c4b9db (patch) | |
tree | 08e7b81a075f1aceca9342835ec906100c777cea /clang/test/CodeGen/builtins-x86.c | |
parent | d0e0f0aea060e5bc655b3f739df7045fb540fb49 (diff) | |
download | bcm5719-llvm-eb606a3c279cc2dba8cdd1084405652013c4b9db.tar.gz bcm5719-llvm-eb606a3c279cc2dba8cdd1084405652013c4b9db.zip |
[x86] Add Clang support for intrinsic __rdpmc.
This patch adds intrinsic __rdpmc to header file 'ia32intrin.h'.
Intrinsic __rdmpc can be used to read performance monitoring counters. It is
implemented as a direct call to __builtin_ia32_rdpmc.
It takes as input a value representing the index of the performance counter to
read. The value of the performance counter is then returned as a unsigned
64-bit quantity.
llvm-svn: 212053
Diffstat (limited to 'clang/test/CodeGen/builtins-x86.c')
-rw-r--r-- | clang/test/CodeGen/builtins-x86.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/CodeGen/builtins-x86.c b/clang/test/CodeGen/builtins-x86.c index 8443574c528..0f038b87355 100644 --- a/clang/test/CodeGen/builtins-x86.c +++ b/clang/test/CodeGen/builtins-x86.c @@ -266,6 +266,7 @@ void f0() { tmp_i = __builtin_ia32_rdtsc(); tmp_i = __builtin_ia32_rdtscp(&tmp_Ui); + tmp_LLi = __builtin_ia32_rdpmc(tmp_i); #ifdef USE_64 tmp_LLi = __builtin_ia32_cvtss2si64(tmp_V4f); #endif |